qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [Qemu-devel] [PATCH RFC 13/17] hw/pci: inform bios if the sys


From: Marcel Apfelbaum
Subject: [Qemu-ppc] [Qemu-devel] [PATCH RFC 13/17] hw/pci: inform bios if the system has more than one pci bridge
Date: Thu, 22 Jan 2015 21:52:39 +0200

From: Marcel Apfelbaum <address@hidden>

The bios looks for 'etc/extra-pci-roots' to decide if
is going to scan further buses after bus 0 tree.

Signed-off-by: Marcel Apfelbaum <address@hidden>
---
 hw/i386/pc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e07f1fa..9ef0917 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1073,9 +1073,22 @@ typedef struct PcGuestInfoState {
 static
 void pc_guest_info_machine_done(Notifier *notifier, void *data)
 {
+    PCIHostState *host;
+    int hosts = 0;
     PcGuestInfoState *guest_info_state = container_of(notifier,
                                                       PcGuestInfoState,
                                                       machine_done);
+    HOST_BRIDGE_FOREACH(host) {
+        hosts++;
+    }
+
+    if (hosts && guest_info_state->info.fw_cfg) {
+        uint64_t *val = g_malloc(sizeof(*val));
+        *val = cpu_to_le64(hosts - 1);
+        fw_cfg_add_file(guest_info_state->info.fw_cfg,
+                        "etc/extra-pci-roots", val, sizeof(*val));
+    }
+
     acpi_setup(&guest_info_state->info);
 }
 
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]