mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
pc: export applesmc IO port/len
IO port and length will be used in following patch to correctly generate SMC ACPI device in SSDT. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
7056045332
commit
1142e45ffd
3 changed files with 12 additions and 6 deletions
|
@ -21,10 +21,17 @@
|
|||
#define ISA_BUS(obj) OBJECT_CHECK(ISABus, (obj), TYPE_ISA_BUS)
|
||||
|
||||
#define TYPE_APPLE_SMC "isa-applesmc"
|
||||
#define APPLESMC_MAX_DATA_LENGTH 32
|
||||
#define APPLESMC_PROP_IO_BASE "iobase"
|
||||
|
||||
static inline bool applesmc_find(void)
|
||||
static inline uint16_t applesmc_port(void)
|
||||
{
|
||||
return object_resolve_path_type("", TYPE_APPLE_SMC, NULL);
|
||||
Object *obj = object_resolve_path_type("", TYPE_APPLE_SMC, NULL);
|
||||
|
||||
if (obj) {
|
||||
return object_property_get_int(obj, APPLESMC_PROP_IO_BASE, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
typedef struct ISADeviceClass {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue