Commit graph

10370 commits

Author SHA1 Message Date
cinap_lenrek
04d6a2acec devuart: fix wrong opens count in case of uartenable() error 2023-11-12 21:49:07 +00:00
cinap_lenrek
8e3abc0cce devuart: make sure consuart was enabled before setting serialoq 2023-11-12 21:06:10 +00:00
cinap_lenrek
5cecf46e87 devuart: handle software flow control (XON/XOFF) in devuart alone
No need for Physuart.kick() to check Uart.blocked state,
already handled by devuart().
2023-11-12 20:47:23 +00:00
Jacob Moody
34821e8b4c /sys/lib/dist/mkfile: include /386/mbr et al in disk images 2023-11-12 19:34:57 +00:00
cinap_lenrek
0ff5b74c25 devuart: cleanup uart console code
Some ports used a messy uarti8250 clone that had its
own backdoor unbuffered uart interface (serialputc()...),
which is really not needed at all, as devuart provides
one with uartputc(), once one sets uartcons variable.

There was some ugly interleaving of prints for mpinit,
which was because uartreset() (called from chandevreset)
would set serialoq ealy before the clocks are ticking,
so the coming up processors would use the buffered uart
while cpuidprint uses the unbufferd one...

Instead, we set serialoq in uartini() (called from
chandevinit) which is guaranteed to be done after
mpinit has completed.
2023-11-12 19:32:57 +00:00
cinap_lenrek
e2ddc61fed zynq: remove uartconsole() function, already done by devuart internally 2023-11-12 17:13:40 +00:00
cinap_lenrek
ddbe5dd29a zynq: fix print format in emmc driver 2023-11-12 17:13:01 +00:00
Jacob Moody
02ebad7043 diff: make distproto copies tests
Using the .1 and .2 file extensions was
causing distproto to conflate them for
object files (from skip=) and not copy
them to the install iso.
2023-11-11 18:29:00 +00:00
Jacob Moody
70a9df6c59 ape: libap: do not set objtype in amd64 mkfile
None of the other arch specific mkfiles do
this and it causes a mk nuke run with any other
objtype to always nuke amd64.
2023-11-11 16:58:43 +00:00
Ori Bernstein
c69d458ecc patch: delete files for tests before test run
we shouldn't mutate the stae of checked in files in place
in tests
2023-11-11 16:28:22 +00:00
cinap_lenrek
4705576f84 bcm64, imx8: provide more flexible MPIDR_EL1 CPUID to machno mapping
Handle the mapping from MPIDR_EL1 to machno with a
mpidindex() function, that uses a new MPIDMASK
constant from mem.h that signifies the cpuid bits.

This way, other affinity arrangements can be supported
by just changing the MPIDMASK constant.
2023-11-11 16:07:06 +00:00
cinap_lenrek
44c0e72598 kernel: fix SEGMAXSIZE macro, force 64-bit result 2023-11-11 00:01:44 +00:00
Jacob Moody
57bf8f165d distproto: include /lib/ucd in releases
The move from /lib/unicode to /lib/ucd was
not reflected in the proto files.
2023-11-10 00:01:38 +00:00
cinap_lenrek
9973c9276d nusb/ether: implement link status detection for smsc and lan78xx 2023-11-05 22:23:07 +00:00
cinap_lenrek
616f62253e nusb/ether: make stats file compatible to stats(8) 2023-11-05 21:17:25 +00:00
cinap_lenrek
e269212796 stats(8): drop 802.11, consider *ALL* /net/ether*/stats
The 802.11 signal strength was specific to the
pcmcia wavelan driver. I do not think anyone
has one at this point.

Ethernet used to only consider /net/ether0/stats file,
but with usb ethernets or multiple ethernet devices
it seems misleading and arbitrary.

Instead, sum up all the statistics counters of
all ethernet devices found and preset that for the graph.
2023-11-05 20:56:31 +00:00
Ori Bernstein
b51b623725 ircrc: fix pong message (thanks mkf)
when connecting to ngircd, we can get disconnected
with a 'Spoofed prefix' message; this fixes the problem.
2023-11-05 20:46:40 +00:00
cinap_lenrek
c0a7fbea1f bcm, bcm64: handle disk activity led from sdmmc
We don't want to blink the disk activity led for wifi,
so handle the disk activity LED from sdmmc when it
is actually used as a disk.
2023-11-05 18:52:50 +00:00
cinap_lenrek
901a176a03 Add missing sd/mmc controller dependencies to /sys/src/9/port/sd.h 2023-11-05 17:53:07 +00:00
cinap_lenrek
1a4dfffb5e sdhost: remove coherence() for RD() and cleanup 2023-11-05 16:53:48 +00:00
cinap_lenrek
6a3c510a4e i2cbcm: use core clock rate from vcore instead of hardcoding 250Mhz 2023-11-05 16:39:54 +00:00
cinap_lenrek
9b68b42610 pi3: implement sdhost controller driver so we can use wifi always 2023-11-05 16:37:32 +00:00
cinap_lenrek
019a935f6b ether4330: annex sdM for emmc (changed order) 2023-11-04 19:02:08 +00:00
cinap_lenrek
dc0f1ae102 pi3, pi4: change the order of emmc and sdhc for ether4330
Keep emmc as sdM and sdhc as sdN (pi4 only), so ether4330
works in both pi3 and pi4 configurations.

ether4330 is commented out in pi3 config as we'r currenly
lacking a sdhost driver so we loose the sdcard if we use it.
2023-11-04 18:58:46 +00:00
cinap_lenrek
6022f37f0a plan9.ini(8): document $wpaopts 2023-11-04 18:45:35 +00:00
cinap_lenrek
af0488a8bc arm64: remove hz/mhz from conf, not needed. 2023-11-04 18:39:20 +00:00
cinap_lenrek
eb4ec3ad97 9/boot/net.rc: allow setting additional flags to aux/wpa with $wpaopts in plan9.ini 2023-11-04 18:38:27 +00:00
cinap_lenrek
14b3bcbc49 devsd, sdmmc, ether4330: improve infrastructure for sdio
devsd/sdmmc: provide annexsdio() function to take over a
sdio controller from devsd. this removes the tight
coupling between ether4330.

devsd: get rid of legacy function pointer in SDifc struct.

ether4330: cleanup code, fix bugs, set bus speed to 50Mhz,
provide multicast and promiscuous mode support.
2023-11-04 18:37:49 +00:00
cinap_lenrek
70dfc2d756 ndb/dns: fix memory leak in dnzone() 2023-11-02 00:00:22 +00:00
cinap_lenrek
f67c4c8523 ndb/dns: add -L flag for local-recursive server
One might think that specifying the listen address
is enougth to prevent running a open resolver,
but this does not work for global IPv6 addresses.

The -L flag allows answering recursive queries
ONLY for IP addresses that are directly reachable
on a interface.
2023-11-01 21:57:08 +00:00
cinap_lenrek
eb8fe8137b ndb/dns: better handling of extended response code 2023-11-01 19:25:27 +00:00
cinap_lenrek
453d3c3d4c ndb/dns: make sure theres only a single Topt option in getednsopt(). 2023-10-30 22:18:07 +00:00
cinap_lenrek
78eff200d8 ndb/dns: implement EDNS(0) extension (rfc6891)
To properly handle TCP fallback for servers,
we have to avoid sending responses too big
for the client to accept.

We used to accept up to 8K of UDP requests
(and responses when resolving).

Instead, we now advertise a UDP response size
of 1232 (assuming 1280 MTU) to the client
and take even smaller values into account
from clients (tho not smaller than 512).

This makes sure we truncate packets, signaling
the client that it must retry with TCP.

Note that we still accept up to 8K of
UDP data regardless (for lucky clients).
2023-10-30 21:43:00 +00:00
Ori Bernstein
466cf20d35 git/branch: avoid null list errors 2023-10-29 19:56:13 +00:00
cinap_lenrek
c9309329eb arm64: mem.c doesnt need sysreg.h 2023-10-29 17:54:14 +00:00
cinap_lenrek
aab7b5ae8b bcm64: dont need sysreg.h in mem.c 2023-10-29 17:51:07 +00:00
cinap_lenrek
1fd5f5205d bcm64: use generic 9/arm64/mmu.c 2023-10-29 17:43:24 +00:00
cinap_lenrek
015180f99b imx8: share generic arm64 mmu.c
Split layout specific code into mem.c from mmu.c,
so generic mmu code can be shared.
2023-10-29 17:23:23 +00:00
cinap_lenrek
515f4d59b1 bcm64: remove sysreg.c 2023-10-29 16:39:24 +00:00
cinap_lenrek
8b1e81d71f bcm64: use generic 9/arm64/* files 2023-10-29 16:36:51 +00:00
cinap_lenrek
abe9dad953 imx8: use generic 9/arm64/sysreg.h 2023-10-29 16:15:17 +00:00
cinap_lenrek
3c1b0ad9d3 imx8: use generic 9/arm64/^(init9.s rebootcode.s) 2023-10-29 15:39:34 +00:00
cinap_lenrek
57277ea614 imx8: use generic 9/arm64/cache.v8.s 2023-10-29 15:30:10 +00:00
cinap_lenrek
1acc9028ba imx8: use generic 9/arm64/trap.c 2023-10-29 15:22:02 +00:00
cinap_lenrek
e2a17587b9 imx8: use generic 9/arm64/sysreg.c 2023-10-29 15:19:58 +00:00
cinap_lenrek
f1aa66eb2a imx8: use generic 9/arm64/fpu.c 2023-10-29 15:18:08 +00:00
cinap_lenrek
64d062acdb ndb/dns: remove leftover #pragma varargck argpos dnsdebug 1 2023-10-29 14:40:00 +00:00
cinap_lenrek
3d9e9827c1 ip/snoopy: fix missing break rrfmt() in (tho, harmless as of rrsupported() check) 2023-10-29 14:38:31 +00:00
cinap_lenrek
81c251f558 ether(3): document "bypass" ctl message. 2023-10-29 14:16:18 +00:00
cinap_lenrek
54c94a93f0 listen(8): remove tcp53 reference, remove !tcp53 template 2023-10-29 13:56:47 +00:00