feat(usb): every xHCI controller is driven, not only the first
boards/BRINGUP.md A1, FABRIC-3 SXLII. xhci.c keeps a table of controllers (up to 8) and services each; kernel_main brings up index 0, 1, ... until there is none. repl.c's and blkio_usb.c's per-slot state is per controller now (a slot ID is a controller's own), and each USB keyboard keeps its own last report and lights; an unplugged keyboard releases what it held. Test first: keyboard and identity on a second controller behind a bridge, Zuse on the first -- before, only Zuse; after, all three, on all three ISAs. Hot-plug and unplug on the second controller. Acceptance unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
739cb9c163
commit
e729c64ba3
@@ -793,9 +793,16 @@ static void kernel_main_deep(BootInfo *boot_info) {
|
||||
* xhci_poll_events()'s own doc comment for why this driver is polled
|
||||
* rather than interrupt-driven. */
|
||||
{
|
||||
static xhci_dev_t xhci_dev;
|
||||
(void)(xhci_find_and_map(&xhci_dev) == 0 &&
|
||||
xhci_bringup(&xhci_dev) == 0);
|
||||
/* Every xHCI controller, not only the first (2026-10-14): a PC has
|
||||
* several, each with its own ports, and a stick or keyboard may be
|
||||
* in any of them. One that fails is skipped; the next is tried. */
|
||||
static xhci_dev_t xhci_devs[XHCI_MAX_CONTROLLERS];
|
||||
unsigned xi;
|
||||
for (xi = 0; xi < XHCI_MAX_CONTROLLERS; xi++) {
|
||||
int rc = xhci_find_and_map(&xhci_devs[xi], xi);
|
||||
if (rc == 1) break;
|
||||
if (rc == 0) (void)xhci_bringup(&xhci_devs[xi]);
|
||||
}
|
||||
}
|
||||
|
||||
/* FABRIC-0.md item 4.4g (decided 2026-08-11): console_fb_init() moved here,
|
||||
|
||||
Reference in New Issue
Block a user