2
0
Fork 0

Patch test-pci to show Virtio devices

This commit is contained in:
Ehmry - 2020-10-21 18:30:26 +02:00
parent b10ffb378c
commit 072fe9f6f8
1 changed files with 33 additions and 0 deletions

View File

@ -8,3 +8,36 @@ index c6d9e2012b..050de6136c 100644
log("--- Platform test finished ---");
+ env.parent().exit(0);
}
commit 03a5f469313e9fdc9ee1135ebf0b167e4d3d3266
Author: Emery Hemingway <ehmry@posteo.net>
Date: Wed Oct 21 15:16:34 2020 +0200
test-pci: recognize VirtIO vendor IDs
diff --git a/repos/os/src/test/pci/test.cc b/repos/os/src/test/pci/test.cc
index c6d9e2012b..9cc2a2ac4b 100644
--- a/repos/os/src/test/pci/test.cc
+++ b/repos/os/src/test/pci/test.cc
@@ -19,7 +19,10 @@
using namespace Genode;
-enum { INTEL_VENDOR_ID = 0x8086 };
+enum {
+ INTEL_VENDOR_ID = 0x8086,
+ VIRTIO_VENDOR_ID = 0x1af4,
+};
/**
@@ -45,7 +48,9 @@ static void print_device_info(Platform::Device_capability device_cap)
Hex(fun, Hex::OMIT_PREFIX), " "
"class=", Hex(class_code), " "
"vendor=", Hex(vendor_id), " ",
- (vendor_id == INTEL_VENDOR_ID ? "(Intel)" : "(unknown)"),
+ (vendor_id == INTEL_VENDOR_ID ? "(Intel)" :
+ vendor_id == VIRTIO_VENDOR_ID ? "(VirtIO)" :
+ "(unknown)"),
" device=", Hex(device_id));
for (int resource_id = 0; resource_id < 6; resource_id++) {