aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Hu <jia-cheng.hu@intel.com>2015-02-11 17:36:25 +0800
committerJason Hu <jia-cheng.hu@intel.com>2015-02-11 17:50:40 +0800
commit3d3067f1f630638c5bd8bcd20c604bec479f5663 (patch)
treecb13818910bb85b0e9b0e46de69ce0e2a9f33ae4
parent0e33151649c2103d5da5e043fc96fa665aa9feb2 (diff)
downloadqemu-android-3d3067f1f630638c5bd8bcd20c604bec479f5663.tar.gz
hw/i386: enabled goldfish events
enabled goldfish events device for x86/x86_64 - modified .dsl source file and update pre-generated .hex file - created the device during init Change-Id: Ide7f60a8b3d83c4d1591cb0d9a38179db7b74b4b Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
-rw-r--r--hw/i386/acpi-dsdt-goldfish.dsl16
-rw-r--r--hw/i386/acpi-dsdt.hex.generated108
-rw-r--r--hw/i386/pc_piix.c2
-rw-r--r--include/hw/acpi/goldfish_defs.h5
4 files changed, 125 insertions, 6 deletions
diff --git a/hw/i386/acpi-dsdt-goldfish.dsl b/hw/i386/acpi-dsdt-goldfish.dsl
index 42aacaae9b..c20afe019d 100644
--- a/hw/i386/acpi-dsdt-goldfish.dsl
+++ b/hw/i386/acpi-dsdt-goldfish.dsl
@@ -33,4 +33,20 @@ Scope(\_SB) {
}
})
}
+
+ /* Events */
+ Device(GFEV) {
+ Name(_HID, "GFSH0002")
+ Name(_STR, Unicode("goldfish events"))
+ Name(_CRS, ResourceTemplate() {
+ Memory32Fixed(ReadWrite,
+ GF_EVENTS_IOMEM_BASE,
+ GF_EVENTS_IOMEM_SIZE
+ )
+ Interrupt(, Edge, ActiveHigh) {
+ GF_EVENTS_IRQ
+ }
+ })
+ }
+
}
diff --git a/hw/i386/acpi-dsdt.hex.generated b/hw/i386/acpi-dsdt.hex.generated
index b95d01e5fb..d47b5aa506 100644
--- a/hw/i386/acpi-dsdt.hex.generated
+++ b/hw/i386/acpi-dsdt.hex.generated
@@ -3,12 +3,12 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x53,
0x44,
0x54,
-0x71,
+0xd1,
0xe,
0x0,
0x0,
0x1,
-0xfb,
+0xdd,
0x42,
0x58,
0x50,
@@ -31,8 +31,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x4e,
0x54,
0x4c,
-0x14,
-0x2,
+0x7,
+0x11,
0x14,
0x20,
0x10,
@@ -111,7 +111,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x42,
0x10,
0x48,
-0x6,
+0xc,
0x5f,
0x53,
0x42,
@@ -214,6 +214,102 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x0,
0x79,
0x0,
+0x5b,
+0x82,
+0x4e,
+0x5,
+0x47,
+0x46,
+0x45,
+0x56,
+0x8,
+0x5f,
+0x48,
+0x49,
+0x44,
+0xd,
+0x47,
+0x46,
+0x53,
+0x48,
+0x30,
+0x30,
+0x30,
+0x32,
+0x0,
+0x8,
+0x5f,
+0x53,
+0x54,
+0x52,
+0x11,
+0x23,
+0xa,
+0x20,
+0x67,
+0x0,
+0x6f,
+0x0,
+0x6c,
+0x0,
+0x64,
+0x0,
+0x66,
+0x0,
+0x69,
+0x0,
+0x73,
+0x0,
+0x68,
+0x0,
+0x20,
+0x0,
+0x65,
+0x0,
+0x76,
+0x0,
+0x65,
+0x0,
+0x6e,
+0x0,
+0x74,
+0x0,
+0x73,
+0x0,
+0x0,
+0x0,
+0x8,
+0x5f,
+0x43,
+0x52,
+0x53,
+0x11,
+0x1a,
+0xa,
+0x17,
+0x86,
+0x9,
+0x0,
+0x1,
+0x0,
+0x10,
+0x1,
+0xff,
+0x0,
+0x10,
+0x0,
+0x0,
+0x89,
+0x6,
+0x0,
+0x3,
+0x1,
+0x11,
+0x0,
+0x0,
+0x0,
+0x79,
+0x0,
0x10,
0x22,
0x5f,
@@ -3698,5 +3794,5 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x0
};
static unsigned short piix_dsdt_applesmc_sta[] = {
-0x3bc
+0x41c
};
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index cbe9dd112a..f77ca71a46 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -238,6 +238,8 @@ static void pc_init1(MachineState *machine,
#if 1 /* #ifdef CONFIG_ANDROID */
sysbus_create_simple("goldfish_battery", GF_BATTERY_IOMEM_BASE,
gsi[GF_BATTERY_IRQ]);
+ sysbus_create_simple("goldfish-events", GF_EVENTS_IOMEM_BASE,
+ gsi[GF_EVENTS_IRQ]);
#endif /* CONFIG_ANDROID */
pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
diff --git a/include/hw/acpi/goldfish_defs.h b/include/hw/acpi/goldfish_defs.h
index 2c74790168..c0d89b040a 100644
--- a/include/hw/acpi/goldfish_defs.h
+++ b/include/hw/acpi/goldfish_defs.h
@@ -27,4 +27,9 @@
#define GF_BATTERY_IOMEM_SIZE 0x00001000
#define GF_BATTERY_IRQ 16
+/* goldfish events */
+#define GF_EVENTS_IOMEM_BASE 0xff011000
+#define GF_EVENTS_IOMEM_SIZE 0x00001000
+#define GF_EVENTS_IRQ 17
+
#endif /* !ACPI_GOLDFISH_DEFS_H */