|
|
@@ -473,12 +473,17 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
command clones the live NebOS image. It detects a source by the MBR plus
|
|
|
the LBA-63 boot-sector signature (`NEBOS` OEM string, `kernel_lba` 64,
|
|
|
`pack_lba` 1088), computes the used length from the highest partition end,
|
|
|
- copies sectors 1..end in chunks, writes the source MBR **last**, flushes and
|
|
|
- verifies by checksum before remounting the target. The source can be
|
|
|
- `usb0` (USB mass storage), IDE, SATA or eMMC; the target is any non-floppy
|
|
|
- block device with enough sectors. It reuses `format_busy`; the copy holds
|
|
|
- the BKL so a USB source cannot be re-enumerated mid-install. It installs
|
|
|
- the flashed image, not runtime `cmds-dev` pack updates.
|
|
|
+ allocates a page buffer for the whole image and reads the source into RAM
|
|
|
+ first (LBA 1..62 are synthesized as zeros instead of read). It then writes
|
|
|
+ the target from RAM in chunks with the source no longer active, writes the
|
|
|
+ MBR **last**, flushes and verifies by checksum before remounting the
|
|
|
+ target. A source-read failure therefore leaves the target untouched. The
|
|
|
+ source read keeps the BKL (a USB3 stick must stay active across chunks);
|
|
|
+ the target writes release it per chunk so the WM/terminal stay responsive.
|
|
|
+ It reuses `format_busy`. The source can be `usb0` (USB mass storage), IDE,
|
|
|
+ SATA or eMMC; the target is any non-floppy block device with enough
|
|
|
+ sectors. It installs the flashed image, not runtime `cmds-dev` pack
|
|
|
+ updates.
|
|
|
- **`/share`**: `share.c/h` — writable, page-backed in-memory filesystem for
|
|
|
network uploads (the netbooted board may have no writable disk). Entries
|
|
|
are full relative paths (like the pack ramfs) plus explicit directory
|
|
|
@@ -603,7 +608,8 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
frame list at `0x3000`, one instance), `ohci.c` (MMIO OHCI, up to 4
|
|
|
instances, HCCA + ED/TD lists, polling), `ehci.c` (MMIO EHCI, QH/qTD
|
|
|
asynchronous schedule, up to 4 instances) and `xhci.c` (MMIO xHCI, USB2
|
|
|
- root ports; halt/HCH reset sequence and BIOS/OS handoff) implement it.
|
|
|
+ and USB3 root ports; halt/HCH reset sequence and BIOS/OS handoff)
|
|
|
+ implement it.
|
|
|
`lsusb.c` — the `lsusb` command (lists every controller and its tree).
|
|
|
`usbmsc.c/h` — USB mass-storage class driver (BOT/SCSI) exposed as
|
|
|
`usb0..`; its device probe is registered next to ASIX and `blk_scan()`
|
|
|
@@ -826,8 +832,8 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
`z-index`, `transform: translate`/`scale`/`rotate` with
|
|
|
`transform-origin` (paint-time box and inline-image transforms), flex rows
|
|
|
with `justify-content` (including `space-evenly`)/`align-items`, two-column
|
|
|
- grids, table colspan and
|
|
|
- percentage columns, and basic `float: left/right` columns.
|
|
|
+ grids, table colspan and percentage columns, and basic `float: left/right`
|
|
|
+ columns.
|
|
|
`@media (min-width/max-width)` blocks are evaluated against the browser
|
|
|
canvas width when the page is parsed; `@import`/`@keyframes` are skipped.
|
|
|
`@font-face` loads one regular TTF per family from a local path or HTTP URL
|
|
|
@@ -1212,8 +1218,10 @@ so addresses do not collide.
|
|
|
layouts put the USB function at 0:07.2 / 0:01.2) and ignores controllers
|
|
|
whose BARs the firmware left unassigned. One instance only.
|
|
|
- **xHCI**: MMIO BAR0 (PCI class `0c03:30`), one controller, polled. The
|
|
|
- Supported Protocol extended capabilities decide which root ports are USB2;
|
|
|
- USB3 SuperSpeed ports are left alone. `xhci_init()` waits for `CNR=0`,
|
|
|
+ Supported Protocol extended capabilities include both USB2 and USB3
|
|
|
+ protocol entries; direct SuperSpeed root-port devices are enumerated with
|
|
|
+ a 512-byte EP0 and the port speed in the slot context. USB3 hub
|
|
|
+ port-status decoding is not implemented. `xhci_init()` waits for `CNR=0`,
|
|
|
clears `RS` and waits for `USBSTS.HCH` **before** `HCRST` (the xHC may
|
|
|
ignore the reset while running), waits 1-2 ms after the HCRST write before
|
|
|
touching any other register (Intel CherryView/Braswell requires this, or
|
|
|
@@ -1254,14 +1262,16 @@ so addresses do not collide.
|
|
|
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),
|
|
|
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.
|
|
|
`blk_scan()` registers present devices as `usb0..` (`BLK_USB`), so
|
|
|
`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
|
|
|
companion is left unclaimed. The xHCI bulk-IN path arms one transfer per
|
|
|
call and does not auto re-arm, so a consumer can alternate CBW, data and
|
|
|
- CSW buffers. The installer reads the live image from `usb0`; USB3
|
|
|
- SuperSpeed ports (not driven by `xhci.c`) and UAS/4Kn sticks are not
|
|
|
- usable.
|
|
|
+ CSW buffers. The installer reads the live image from `usb0`; direct
|
|
|
+ USB3 root-port sticks work, while UHCI/OHCI bulk devices, USB3 hubs and
|
|
|
+ UAS/4Kn sticks are not usable.
|
|
|
- **Devices** (`usbhid.c`): every HID (class 3) interface with an
|
|
|
interrupt-IN endpoint gets its own interrupt slot (USB_HCD_INT_SLOTS = 6).
|
|
|
Boot interfaces (subclass 1, protocol 2/1) are used as-is in boot
|
|
|
@@ -1487,9 +1497,9 @@ and the WM falls back to polling (`io_keyboard_irq_masked()`).
|
|
|
11. The BKL serializes all kernel execution: a long FAT/disk operation, a
|
|
|
non-network driver wait or a big shadow-buffer operation can stall syscalls
|
|
|
on the other CPUs for its duration. `bkl_pause()`/`bkl_resume()` is used
|
|
|
- for serial/network waits and the format raw-sector loop; the installer
|
|
|
- holds the BKL for the copy so a USB source cannot be re-enumerated
|
|
|
- mid-install.
|
|
|
+ for serial/network waits, the format raw-sector loop and the installer's
|
|
|
+ target writes; the installer keeps the BKL only for its source-read burst
|
|
|
+ so a USB source cannot be re-enumerated mid-read.
|
|
|
12. Kernel threads (kworker, kexec/payload, kernel commands) are pinned to
|
|
|
the BSP. Only ring-3 processes use the APs, so a single CPU-bound kernel
|
|
|
driver still limits throughput.
|
|
|
@@ -1621,10 +1631,11 @@ and the WM falls back to polling (`io_keyboard_irq_masked()`).
|
|
|
is unsigned, so Secure Boot must be off. The loader needs a GOP mode with
|
|
|
BGRX or RGBX 32bpp, width ≤ 1280, `pitch * height` ≤ 8 MB and the
|
|
|
framebuffer below 4 GB; otherwise the kernel starts headless (serial only).
|
|
|
- xHCI drives USB2 root ports only (USB3 SuperSpeed devices are not
|
|
|
- handled), and EHCI only high-speed root ports (no transaction translator
|
|
|
- for low/full-speed devices behind a high-speed hub), so a USB3-only
|
|
|
- keyboard/mouse can still leave the UI without input (PS/2 may still work).
|
|
|
+ xHCI drives USB2 and USB3 root ports (USB3 hubs are not decoded), and
|
|
|
+ EHCI only high-speed root ports (no transaction translator for
|
|
|
+ low/full-speed devices behind a high-speed hub), so a full-speed device
|
|
|
+ behind a USB2 hub can still leave the UI without input (PS/2 may still
|
|
|
+ work).
|
|
|
There is no IOAPIC setup: OVMF delivers the ISA IRQs through the 8259
|
|
|
path, but a platform that routes them through the IOAPIC may need a
|
|
|
mask-all step after ACPI init. UEFI runtime services are not used, so
|
|
|
@@ -1716,9 +1727,10 @@ and the WM falls back to polling (`io_keyboard_irq_masked()`).
|
|
|
for `usb-efi.img`, ~8.5 MB for `usb.img`), so the rest of the target stays
|
|
|
unpartitioned and runtime `cmds-dev` pack updates are not part of the
|
|
|
clone. The source must be visible as a `blkdev`: USB mass storage is
|
|
|
- BOT/SCSI on EHCI/xHCI USB2 bulk only (no UHCI/OHCI bulk path, no USB3
|
|
|
- SuperSpeed ports, no UAS or 4Kn), so a USB3-only port or an unsupported
|
|
|
- stick leaves no source. The copy holds the BKL and can freeze the UI for
|
|
|
- its duration; a failed copy leaves an incomplete target. IDE, SATA and
|
|
|
- eMMC sources work without USB, but a target smaller than the image is
|
|
|
- refused.
|
|
|
+ BOT/SCSI on EHCI and xHCI bulk, including direct USB3 root-port devices
|
|
|
+ (no UHCI/OHCI bulk path, no USB3 hubs, no UAS or 4Kn), so an unsupported
|
|
|
+ stick or controller leaves no source. The installer needs ~17 MB of
|
|
|
+ free RAM for the source image (less for `usb.img`); a source-read failure
|
|
|
+ leaves the target untouched, while a target-write failure can leave it
|
|
|
+ incomplete (the MBR is written last). IDE, SATA and eMMC sources work
|
|
|
+ without USB, but a target smaller than the image is refused.
|