|
@@ -239,8 +239,9 @@ and `make net-dev`/`kernel-net-dev` reload over the network. `bootlog save
|
|
|
publish `vfs_scan_busy` → `wm_server_boot_ready()` → wait (idle `hlt`,
|
|
publish `vfs_scan_busy` → `wm_server_boot_ready()` → wait (idle `hlt`,
|
|
|
1 s cap) until the first terminal has presented → USB bring-up and scan
|
|
1 s cap) until the first terminal has presented → USB bring-up and scan
|
|
|
(non-preemptible, as before the WM existed: reset/SOF timing) → NIC probe
|
|
(non-preemptible, as before the WM existed: reset/SOF timing) → NIC probe
|
|
|
- → kworker → the `bootscan` kernel thread (storage scan + FAT mounts, then
|
|
|
|
|
- the `/data` WiFi autoconnect once the boot DHCP finished) → DHCP. So
|
|
|
|
|
|
|
+ → kworker → the `bootscan` kernel thread (non-USB storage scan + FAT
|
|
|
|
|
+ mounts, then the deferred USB mounts, then the `/data` WiFi autoconnect
|
|
|
|
|
+ once the boot DHCP finished) → DHCP. So
|
|
|
the terminal is on screen before USB, NIC and disks are probed; USB
|
|
the terminal is on screen before USB, NIC and disks are probed; USB
|
|
|
input, USB NICs and USB disks attach right after. The WM's
|
|
input, USB NICs and USB disks attach right after. The WM's
|
|
|
`SYS_NET_INFO` does not trigger the NIC probe (it reports "no NIC" until
|
|
`SYS_NET_INFO` does not trigger the NIC probe (it reports "no NIC" until
|
|
@@ -816,7 +817,23 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
are no-ops. A USB disk read by the rescan claims the USB bus
|
|
are no-ops. A USB disk read by the rescan claims the USB bus
|
|
|
(`usb_bus_claim()` in `usbmsc_read/write/flush`), so its HCD waits yield
|
|
(`usb_bus_claim()` in `usbmsc_read/write/flush`), so its HCD waits yield
|
|
|
as well (see the USB bullet). So `storage` no longer freezes the WM. `disk_probe()` skips
|
|
as well (see the USB bullet). So `storage` no longer freezes the WM. `disk_probe()` skips
|
|
|
- a floppy whose CMOS drive type (register `0x10`) is 0.
|
|
|
|
|
|
|
+ a floppy whose CMOS drive type (register `0x10`) is 0. `mount_device()`
|
|
|
|
|
+ recognises the NebOS MBR layout (`mbr_is_nebos_layout()`: active type-0x06
|
|
|
|
|
+ P1 at LBA 63 of 1024 sectors and P2 at LBA 1088) and skips P1 without
|
|
|
|
|
+ reading it, so scanning the boot stick costs only its MBR read; a valid MBR
|
|
|
|
|
+ whose partitions are all non-FAT is not probed as a superfloppy, and an
|
|
|
|
|
+ unreadable partition boot sector is skipped rather than mounted.
|
|
|
|
|
+ The boot call passes `skip_usb`: USB block devices are logged as `deferred`
|
|
|
|
|
+ and mounted later by `vfs_mount_usb()` after the boot-scan window has
|
|
|
|
|
+ closed, so a card reader or stick that NAKs its first media read for
|
|
|
|
|
+ seconds cannot delay the desktop, `/ramfs`, `/share` or the network. The
|
|
|
|
|
+ background pass appends to the existing mount table and skips devices that
|
|
|
|
|
+ are already mounted; the `storage` command's rescan still uses the full
|
|
|
|
|
+ scan (`vfs_mount_all(0)`). The background pass sets
|
|
|
|
|
+ `usbmsc_set_probe_only(1)`: a device's first media read gets one 5 s
|
|
|
|
|
+ attempt without the reset/retry chain, so a stuck USB disk cannot hold
|
|
|
|
|
+ `vfs_scan_busy` behind the boot. A later `storage` rescan uses the normal
|
|
|
|
|
+ 15 s first-read deadline and retries (`MSC_FIRST_READ_MS`).
|
|
|
- **Installer**: `install.c/h` — the privileged `install <target> [source|self]`
|
|
- **Installer**: `install.c/h` — the privileged `install <target> [source|self]`
|
|
|
command clones the live NebOS image or writes the running image. A clone
|
|
command clones the live NebOS image or writes the running image. A clone
|
|
|
detects a source by the MBR plus the LBA-63 boot-sector signature (`NEBOS`
|
|
detects a source by the MBR plus the LBA-63 boot-sector signature (`NEBOS`
|
|
@@ -856,7 +873,8 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
before the backend (`sys_fs_begin_w`). The app saves the table as
|
|
before the backend (`sys_fs_begin_w`). The app saves the table as
|
|
|
`MOUNTS.CFG` (`"NBMNT1\n\0"` + records) on the `NEBOSDATA` volume; the
|
|
`MOUNTS.CFG` (`"NBMNT1\n\0"` + records) on the `NEBOSDATA` volume; the
|
|
|
`bootscan` thread calls `sys_mount_load_config()` after `vfs_mount_all()`
|
|
`bootscan` thread calls `sys_mount_load_config()` after `vfs_mount_all()`
|
|
|
- and applies `/data/MOUNTS.CFG`. The data volume itself is not editable
|
|
|
|
|
|
|
+ and again after `vfs_mount_usb()`, applying a `/data/MOUNTS.CFG` that only
|
|
|
|
|
+ appeared with the deferred USB volume. The data volume itself is not editable
|
|
|
from the app (it stores the file). Format and install run the kernel
|
|
from the app (it stores the file). Format and install run the kernel
|
|
|
commands with `-y` (which skips their raw-keyboard y/n prompt; the app
|
|
commands with `-y` (which skips their raw-keyboard y/n prompt; the app
|
|
|
confirms in its own dialog) through `SYS_SPAWN_KCMD` on a private tty and
|
|
confirms in its own dialog) through `SYS_SPAWN_KCMD` on a private tty and
|
|
@@ -1053,8 +1071,8 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
known SSID replaces its record and moves it to the front, and a full list
|
|
known SSID replaces its record and moves it to the front, and a full list
|
|
|
drops the least recently used network. Each record leaves the BSSID zero
|
|
drops the least recently used network. Each record leaves the BSSID zero
|
|
|
so a mesh/repeater AP with the same SSID still works. After the storage
|
|
so a mesh/repeater AP with the same SSID still works. After the storage
|
|
|
- scan and the boot DHCP attempt the `bootscan` thread spawns
|
|
|
|
|
- `/ramfs/bin/wifi autoconnect` when that file exists. Autoconnect leaves a
|
|
|
|
|
|
|
+ scan, the deferred USB mount pass and the boot DHCP attempt the `bootscan`
|
|
|
|
|
+ thread spawns `/ramfs/bin/wifi autoconnect` when that file exists. Autoconnect leaves a
|
|
|
wired link that is physically up alone, and an already-linked WiFi card
|
|
wired link that is physically up alone, and an already-linked WiFi card
|
|
|
too. Otherwise it scans once and joins the strongest network present whose
|
|
too. Otherwise it scans once and joins the strongest network present whose
|
|
|
SSID is in the saved list, moves on to the other saved networks found if
|
|
SSID is in the saved list, moves on to the other saved networks found if
|
|
@@ -1532,7 +1550,10 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
`serial_putc()` passes every COM1 character through `bootcon_scan_char()`,
|
|
`serial_putc()` passes every COM1 character through `bootcon_scan_char()`,
|
|
|
which keeps only the owning thread's output (CRs dropped) in a 16 KB
|
|
which keeps only the owning thread's output (CRs dropped) in a 16 KB
|
|
|
frame-allocated ring. The ring survives the thread, so a later manual
|
|
frame-allocated ring. The ring survives the thread, so a later manual
|
|
|
- `bootscan` launch still shows the completed scan. `SYS_BOOTLOG` (122, STAT
|
|
|
|
|
|
|
+ `bootscan` launch still shows the completed scan. The deferred USB mount
|
|
|
|
|
+ pass runs after `bootcon_scan_end()`, so its lines go to COM1/netmon but
|
|
|
|
|
+ not into the window; the window's scan completes before the slow USB
|
|
|
|
|
+ probe. `SYS_BOOTLOG` (122, STAT
|
|
|
fills `struct sys_bootlog` with total/start/capacity/active, READ copies
|
|
fills `struct sys_bootlog` with total/start/capacity/active, READ copies
|
|
|
one 1 KB chunk from an absolute offset) is the ring-3 view. The WM spawns
|
|
one 1 KB chunk from an absolute offset) is the ring-3 view. The WM spawns
|
|
|
the window before the terminal, waits (2 s bound) for it to appear and
|
|
the window before the terminal, waits (2 s bound) for it to appear and
|
|
@@ -2477,7 +2498,14 @@ briefly reporting disconnected.
|
|
|
Disabling clears ASE and acknowledges `STS_IAA`; leaving the IAA doorbell
|
|
Disabling clears ASE and acknowledges `STS_IAA`; leaving the IAA doorbell
|
|
|
status set stalls the next enable. Bulk `in`/`out` use one qTD per call
|
|
status set stalls the next enable. Bulk `in`/`out` use one qTD per call
|
|
|
(up to five 4 KB buffer pages), which is enough for the ASIX AX88772 RX/TX
|
|
(up to five 4 KB buffer pages), which is enough for the ASIX AX88772 RX/TX
|
|
|
- path.
|
|
|
|
|
|
|
+ path. The HCD vtable's optional `bulk_reset` disarms the endpoint's qTD,
|
|
|
|
|
+ clears its data toggle and drops the bulk state, so a timed-out bulk-IN
|
|
|
|
|
+ transfer cannot leave the endpoint permanently armed; xHCI stops the
|
|
|
|
|
+ endpoint before dropping its ring. After an async-transfer gap of 100 ms
|
|
|
|
|
+ (and before cancelling a stuck bulk transfer) the EHCI driver rings the
|
|
|
|
|
+ async-advance doorbell (`IAAD`) and waits for `STS_IAA`: the MCP79 can
|
|
|
|
|
+ keep a halted QH's old qTD cached, and without the handshake the first
|
|
|
|
|
+ USB-disk read after enumeration/`kexec` stays ACTIVE and times out.
|
|
|
There is no transaction translator: low/full-speed devices behind a
|
|
There is no transaction translator: low/full-speed devices behind a
|
|
|
high-speed hub stay invisible to EHCI (use the companion controller for
|
|
high-speed hub stay invisible to EHCI (use the companion controller for
|
|
|
them).
|
|
them).
|
|
@@ -2577,8 +2605,20 @@ briefly reporting disconnected.
|
|
|
with SCSI INQUIRY + READ CAPACITY. Commands use BOT CBW/CSW with LUN 0,
|
|
with SCSI INQUIRY + READ CAPACITY. Commands use BOT CBW/CSW with LUN 0,
|
|
|
512-byte blocks and at most 62 sectors per data stage; READ(10), WRITE(10),
|
|
512-byte blocks and at most 62 sectors per data stage; READ(10), WRITE(10),
|
|
|
SYNCHRONIZE CACHE, a BOT reset and endpoint-halt clear are implemented.
|
|
SYNCHRONIZE CACHE, a BOT reset and endpoint-halt clear are implemented.
|
|
|
- Short bulk-IN chunks are accumulated within a BOT data stage; a failed
|
|
|
|
|
- READ(10) gets REQUEST SENSE, three retries and a 1-sector fallback.
|
|
|
|
|
|
|
+ Short bulk-IN chunks are accumulated within a BOT data stage; a READ(10)
|
|
|
|
|
+ that completed with a non-zero CSW status gets REQUEST SENSE (a transport
|
|
|
|
|
+ timeout goes straight to the reset), then three retries and a 1-sector
|
|
|
|
|
+ fallback. A timed-out bulk-IN transfer is cancelled through the HCD's
|
|
|
|
|
+ `bulk_reset` and the BOT reset clears both host-side data toggles after
|
|
|
|
|
+ the CLEAR_FEATURE requests, matching the device's DATA0 state (QEMU
|
|
|
|
|
+ tolerates the mismatch, real EHCI hardware does not; without this a single
|
|
|
|
|
+ timeout/unit-attention wedged every later transfer). After the first
|
|
|
|
|
+ failed attempt the driver also re-applies SET_CONFIGURATION once, which
|
|
|
|
|
+ resets the device's endpoints/toggles without a port reset while keeping
|
|
|
|
|
+ its address and endpoint numbers. The boot background pass sets
|
|
|
|
|
+ `usbmsc_set_probe_only(1)` so a stuck first media read is abandoned after
|
|
|
|
|
+ 5 s instead of running the reset/retry chain; a `storage` rescan uses the
|
|
|
|
|
+ full path.
|
|
|
`blk_scan()` registers present devices as `usb0..` (`BLK_USB`), so
|
|
`blk_scan()` registers present devices as `usb0..` (`BLK_USB`), so
|
|
|
`storage`, the VFS mount path, `format` and `install` can use them. Bulk
|
|
`storage`, the VFS mount path, `format` and `install` can use them. Bulk
|
|
|
transfers exist only on EHCI and xHCI; a storage device on a UHCI/OHCI
|
|
transfers exist only on EHCI and xHCI; a storage device on a UHCI/OHCI
|