[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv8 04/16] Add get_fw_dev_path callback to ISA bus in
From: |
Gleb Natapov |
Subject: |
[Qemu-devel] [PATCHv8 04/16] Add get_fw_dev_path callback to ISA bus in qdev. |
Date: |
Wed, 8 Dec 2010 13:34:57 +0200 |
Use device ioports to create unique device path.
Signed-off-by: Gleb Natapov <address@hidden>
---
hw/isa-bus.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index c0ac7e9..c423c1b 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -31,11 +31,13 @@ static ISABus *isabus;
target_phys_addr_t isa_mem_base = 0;
static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent);
+static char *isabus_get_fw_dev_path(DeviceState *dev);
static struct BusInfo isa_bus_info = {
.name = "ISA",
.size = sizeof(ISABus),
.print_dev = isabus_dev_print,
+ .get_fw_dev_path = isabus_get_fw_dev_path,
};
ISABus *isa_bus_new(DeviceState *dev)
@@ -188,4 +190,18 @@ static void isabus_register_devices(void)
sysbus_register_withprop(&isabus_bridge_info);
}
+static char *isabus_get_fw_dev_path(DeviceState *dev)
+{
+ ISADevice *d = (ISADevice*)dev;
+ char path[40];
+ int off;
+
+ off = snprintf(path, sizeof(path), "%s", qdev_fw_name(dev));
+ if (d->nioports) {
+ snprintf(path + off, sizeof(path) - off, "@%04x", d->ioports[0]);
+ }
+
+ return strdup(path);
+}
+
device_init(isabus_register_devices)
--
1.7.2.3
- [Qemu-devel] [PATCHv8 00/16] boot order specification, Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 02/16] Introduce new BusInfo callback get_fw_dev_path., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 15/16] Add notifier that will be called when machine is fully created., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 03/16] Keep track of ISA ports ISA device is using in qdev., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 05/16] Store IDE bus id in IDEBus structure for easy access., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 14/16] Add bootindex for option roms., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 16/16] Pass boot device list to firmware., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 09/16] Record which USBDevice USBPort belongs too., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 08/16] Add get_fw_dev_path callback for pci bus., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 11/16] Add get_fw_dev_path callback to scsi bus., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 04/16] Add get_fw_dev_path callback to ISA bus in qdev.,
Gleb Natapov <=
- [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device, Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 07/16] Add get_fw_dev_path callback for system bus., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 06/16] Add get_fw_dev_path callback to IDE bus., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 13/16] Change fw_cfg_add_file() to get full file path as a parameter., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 10/16] Add get_fw_dev_path callback for usb bus., Gleb Natapov, 2010/12/08
- [Qemu-devel] [PATCHv8 01/16] Introduce fw_name field to DeviceInfo structure., Gleb Natapov, 2010/12/08
- [Qemu-devel] Re: [PATCHv8 00/16] boot order specification, Blue Swirl, 2010/12/11