2
0
Fork 0

Patch the x86 platform driver to assign devices by index

This commit is contained in:
Ehmry - 2020-11-10 15:43:10 +01:00
parent 3edba94bef
commit 9db7dd0099
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From c5de002f7d021af594c6b527e61d40a2d6357e66 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Tue, 10 Nov 2020 12:51:12 +0100
Subject: [PATCH] drivers/platform/x86: move PCI capabilities to PCI report
sub-nodes
---
.../os/src/drivers/platform/spec/x86/pci_session_component.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/repos/os/src/drivers/platform/spec/x86/pci_session_component.h b/repos/os/src/drivers/platform/spec/x86/pci_session_component.h
index a7439a224d..2093aef9f2 100644
--- a/repos/os/src/drivers/platform/spec/x86/pci_session_component.h
+++ b/repos/os/src/drivers/platform/spec/x86/pci_session_component.h
@@ -1110,7 +1110,9 @@ class Platform::Root : public Genode::Root_component<Session_component>
for (Genode::uint16_t val = 0; cap; cap = val >> 8) {
val = config.read(config_access, cap, Platform::Device::ACCESS_16BIT);
- xml.attribute("cap", String<8>(Hex(val & 0xff)));
+ xml.node("cap", [&] () {
+ xml.attribute("value", String<8>(Hex(val & 0xff)));
+ });
}
} catch (...) {
xml.attribute("cap", "failed to read");
--
2.28.0