diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-27 00:32:18 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-27 00:35:45 +0100 |
commit | be6222437bef9955c9dc3b136e56ac70f080bf47 (patch) | |
tree | 4514e93a90770c8f916eb306e072f2fc1ad2d4b1 /stage3/shell.c | |
parent | 241857a79e1a42e23ec29389862f39c92a5dc93e (diff) | |
download | cuddles-be6222437bef9955c9dc3b136e56ac70f080bf47.tar.xz |
store pci enumeration results
Diffstat (limited to 'stage3/shell.c')
-rw-r--r-- | stage3/shell.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/stage3/shell.c b/stage3/shell.c index 28de4f9..c2fd377 100644 --- a/stage3/shell.c +++ b/stage3/shell.c @@ -93,7 +93,16 @@ static void cmd_img(str arg) static void cmd_lspci(str arg) { (void) arg; - pci_enumerate(); + for (usize i = 0; i < pci_num_devices; i++) { + pci_dev *dev = &pci_devices[i]; + print(S("bus: ")); print_num_pad(dev->bus, 16, 2, ' '); + print(S(" dev: ")); print_num_pad(dev->dev, 16, 1, ' '); + print(S(" vendor: ")); print_num_pad(dev->vendor, 16, 4, ' '); + print(S(" id: ")); print_num_pad(dev->id, 16, 4, ' '); + print(S(" class: ")); print_num_pad(dev->class, 16, 2, ' '); + print(S(" subclass: ")); print_num_pad(dev->subclass, 16, 2, ' '); + print(S("\n")); + } } static void cmd_run(str arg) |