diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2007-02-02 11:48:19 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:22 -0500 |
commit | ad71860a17ba33eb0e673e9e2cf5ba0d8e3e3fdd (patch) | |
tree | 9f60547a2e8782c04d7cd1c41bc874047008458c | |
parent | a4bbb810dedaecf74d54b16b6dd3c33e95e1024c (diff) |
ACPICA: minimal patch to integrate new tables into Linux
Signed-off-by: Len Brown <len.brown@intel.com>
31 files changed, 191 insertions, 453 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index cbcb2c27f48b..9adabc4dba70 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -716,33 +716,26 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) | |||
716 | printk(KERN_WARNING PREFIX "Unable to map FADT\n"); | 716 | printk(KERN_WARNING PREFIX "Unable to map FADT\n"); |
717 | return 0; | 717 | return 0; |
718 | } | 718 | } |
719 | /* initialize sci_int early for INT_SRC_OVR MADT parsing */ | ||
720 | acpi_fadt.sci_int = fadt->sci_int; | ||
721 | |||
722 | /* initialize rev and apic_phys_dest_mode for x86_64 genapic */ | ||
723 | acpi_fadt.revision = fadt->revision; | ||
724 | acpi_fadt.force_apic_physical_destination_mode = | ||
725 | fadt->force_apic_physical_destination_mode; | ||
726 | 719 | ||
727 | #ifdef CONFIG_X86_PM_TIMER | 720 | #ifdef CONFIG_X86_PM_TIMER |
728 | /* detect the location of the ACPI PM Timer */ | 721 | /* detect the location of the ACPI PM Timer */ |
729 | if (fadt->revision >= FADT2_REVISION_ID) { | 722 | if (fadt->header.revision >= FADT2_REVISION_ID) { |
730 | /* FADT rev. 2 */ | 723 | /* FADT rev. 2 */ |
731 | if (fadt->xpm_tmr_blk.address_space_id != | 724 | if (fadt->xpm_timer_block.space_id != |
732 | ACPI_ADR_SPACE_SYSTEM_IO) | 725 | ACPI_ADR_SPACE_SYSTEM_IO) |
733 | return 0; | 726 | return 0; |
734 | 727 | ||
735 | pmtmr_ioport = fadt->xpm_tmr_blk.address; | 728 | pmtmr_ioport = fadt->xpm_timer_block.address; |
736 | /* | 729 | /* |
737 | * "X" fields are optional extensions to the original V1.0 | 730 | * "X" fields are optional extensions to the original V1.0 |
738 | * fields, so we must selectively expand V1.0 fields if the | 731 | * fields, so we must selectively expand V1.0 fields if the |
739 | * corresponding X field is zero. | 732 | * corresponding X field is zero. |
740 | */ | 733 | */ |
741 | if (!pmtmr_ioport) | 734 | if (!pmtmr_ioport) |
742 | pmtmr_ioport = fadt->V1_pm_tmr_blk; | 735 | pmtmr_ioport = fadt->pm_timer_block; |
743 | } else { | 736 | } else { |
744 | /* FADT rev. 1 */ | 737 | /* FADT rev. 1 */ |
745 | pmtmr_ioport = fadt->V1_pm_tmr_blk; | 738 | pmtmr_ioport = fadt->pm_timer_block; |
746 | } | 739 | } |
747 | if (pmtmr_ioport) | 740 | if (pmtmr_ioport) |
748 | printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", | 741 | printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index ef2fe474f107..aa6f96720984 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -76,7 +76,7 @@ const char *acpi_get_sysname(void) | |||
76 | { | 76 | { |
77 | #ifdef CONFIG_IA64_GENERIC | 77 | #ifdef CONFIG_IA64_GENERIC |
78 | unsigned long rsdp_phys; | 78 | unsigned long rsdp_phys; |
79 | struct acpi20_table_rsdp *rsdp; | 79 | struct acpi_table_rsdp *rsdp; |
80 | struct acpi_table_xsdt *xsdt; | 80 | struct acpi_table_xsdt *xsdt; |
81 | struct acpi_table_header *hdr; | 81 | struct acpi_table_header *hdr; |
82 | 82 | ||
@@ -87,8 +87,8 @@ const char *acpi_get_sysname(void) | |||
87 | return "dig"; | 87 | return "dig"; |
88 | } | 88 | } |
89 | 89 | ||
90 | rsdp = (struct acpi20_table_rsdp *)__va(rsdp_phys); | 90 | rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys); |
91 | if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { | 91 | if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) { |
92 | printk(KERN_ERR | 92 | printk(KERN_ERR |
93 | "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); | 93 | "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); |
94 | return "dig"; | 94 | return "dig"; |
@@ -96,7 +96,7 @@ const char *acpi_get_sysname(void) | |||
96 | 96 | ||
97 | xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); | 97 | xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); |
98 | hdr = &xsdt->header; | 98 | hdr = &xsdt->header; |
99 | if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { | 99 | if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) { |
100 | printk(KERN_ERR | 100 | printk(KERN_ERR |
101 | "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); | 101 | "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); |
102 | return "dig"; | 102 | return "dig"; |
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index d4dd8f4b6b8d..65979f1fb353 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "xtalk/xwidgetdev.h" | 25 | #include "xtalk/xwidgetdev.h" |
26 | #include <linux/acpi.h> | 26 | #include <linux/acpi.h> |
27 | #include <asm/sn/sn2/sn_hwperf.h> | 27 | #include <asm/sn/sn2/sn_hwperf.h> |
28 | #include <asm/sn/acpi.h> | ||
29 | 28 | ||
30 | extern void sn_init_cpei_timer(void); | 29 | extern void sn_init_cpei_timer(void); |
31 | extern void register_sn_procfs(void); | 30 | extern void register_sn_procfs(void); |
@@ -37,7 +36,6 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64); | |||
37 | extern void sn_io_acpi_init(void); | 36 | extern void sn_io_acpi_init(void); |
38 | extern void sn_io_init(void); | 37 | extern void sn_io_init(void); |
39 | 38 | ||
40 | |||
41 | static struct list_head sn_sysdata_list; | 39 | static struct list_head sn_sysdata_list; |
42 | 40 | ||
43 | /* sysdata list struct */ | 41 | /* sysdata list struct */ |
@@ -50,6 +48,15 @@ int sn_ioif_inited; /* SN I/O infrastructure initialized? */ | |||
50 | 48 | ||
51 | struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ | 49 | struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ |
52 | 50 | ||
51 | int sn_acpi_base_support() | ||
52 | { | ||
53 | struct acpi_table_header *header; | ||
54 | (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); | ||
55 | if (header && header->oem_revision >= 0x20101) | ||
56 | return 1; | ||
57 | return 0; | ||
58 | } | ||
59 | |||
53 | /* | 60 | /* |
54 | * Hooks and struct for unsupported pci providers | 61 | * Hooks and struct for unsupported pci providers |
55 | */ | 62 | */ |
@@ -286,7 +293,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev) | |||
286 | list_add_tail(&pcidev_info->pdi_list, | 293 | list_add_tail(&pcidev_info->pdi_list, |
287 | &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); | 294 | &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); |
288 | 295 | ||
289 | if (SN_ACPI_BASE_SUPPORT()) | 296 | if (sn_acpi_base_support()) |
290 | sn_acpi_slot_fixup(dev, pcidev_info); | 297 | sn_acpi_slot_fixup(dev, pcidev_info); |
291 | else | 298 | else |
292 | sn_more_slot_fixup(dev, pcidev_info); | 299 | sn_more_slot_fixup(dev, pcidev_info); |
@@ -498,7 +505,7 @@ void __devinit | |||
498 | sn_pci_fixup_bus(struct pci_bus *bus) | 505 | sn_pci_fixup_bus(struct pci_bus *bus) |
499 | { | 506 | { |
500 | 507 | ||
501 | if (SN_ACPI_BASE_SUPPORT()) | 508 | if (sn_acpi_base_support()) |
502 | sn_acpi_bus_fixup(bus); | 509 | sn_acpi_bus_fixup(bus); |
503 | else | 510 | else |
504 | sn_bus_fixup(bus); | 511 | sn_bus_fixup(bus); |
@@ -546,7 +553,7 @@ sn_io_early_init(void) | |||
546 | 553 | ||
547 | printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", | 554 | printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", |
548 | acpi_gbl_DSDT->oem_revision); | 555 | acpi_gbl_DSDT->oem_revision); |
549 | if (SN_ACPI_BASE_SUPPORT()) | 556 | if (sn_acpi_base_support()) |
550 | sn_io_acpi_init(); | 557 | sn_io_acpi_init(); |
551 | else | 558 | else |
552 | sn_io_init(); | 559 | sn_io_init(); |
diff --git a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c index 4aa4f301d56d..b1a47da118b1 100644 --- a/arch/ia64/sn/kernel/iomv.c +++ b/arch/ia64/sn/kernel/iomv.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
@@ -16,7 +16,6 @@ | |||
16 | #include <asm/sn/pda.h> | 16 | #include <asm/sn/pda.h> |
17 | #include <asm/sn/sn_cpuid.h> | 17 | #include <asm/sn/sn_cpuid.h> |
18 | #include <asm/sn/shub_mmr.h> | 18 | #include <asm/sn/shub_mmr.h> |
19 | #include <asm/sn/acpi.h> | ||
20 | 19 | ||
21 | #define IS_LEGACY_VGA_IOPORT(p) \ | 20 | #define IS_LEGACY_VGA_IOPORT(p) \ |
22 | (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) | 21 | (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) |
@@ -26,9 +25,12 @@ | |||
26 | * @port: port to convert | 25 | * @port: port to convert |
27 | * | 26 | * |
28 | * Legacy in/out instructions are converted to ld/st instructions | 27 | * Legacy in/out instructions are converted to ld/st instructions |
29 | * on IA64. This routine will convert a port number into a valid | 28 | * on IA64. This routine will convert a port number into a valid |
30 | * SN i/o address. Used by sn_in*() and sn_out*(). | 29 | * SN i/o address. Used by sn_in*() and sn_out*(). |
31 | */ | 30 | */ |
31 | |||
32 | extern int sn_acpi_base_support(); | ||
33 | |||
32 | void *sn_io_addr(unsigned long port) | 34 | void *sn_io_addr(unsigned long port) |
33 | { | 35 | { |
34 | if (!IS_RUNNING_ON_SIMULATOR()) { | 36 | if (!IS_RUNNING_ON_SIMULATOR()) { |
@@ -37,7 +39,7 @@ void *sn_io_addr(unsigned long port) | |||
37 | /* On sn2, legacy I/O ports don't point at anything */ | 39 | /* On sn2, legacy I/O ports don't point at anything */ |
38 | if (port < (64 * 1024)) | 40 | if (port < (64 * 1024)) |
39 | return NULL; | 41 | return NULL; |
40 | if (SN_ACPI_BASE_SUPPORT()) | 42 | if (sn_acpi_base_support()) |
41 | return (__ia64_mk_io_addr(port)); | 43 | return (__ia64_mk_io_addr(port)); |
42 | else | 44 | else |
43 | return ((void *)(port | __IA64_UNCACHED_OFFSET)); | 45 | return ((void *)(port | __IA64_UNCACHED_OFFSET)); |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 5cc76d0d331f..335cc91c49b7 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -498,7 +498,7 @@ static unsigned long get_cmos_time(void) | |||
498 | { | 498 | { |
499 | unsigned int year, mon, day, hour, min, sec; | 499 | unsigned int year, mon, day, hour, min, sec; |
500 | unsigned long flags; | 500 | unsigned long flags; |
501 | unsigned extyear = 0; | 501 | unsigned century = 0; |
502 | 502 | ||
503 | spin_lock_irqsave(&rtc_lock, flags); | 503 | spin_lock_irqsave(&rtc_lock, flags); |
504 | 504 | ||
@@ -510,9 +510,9 @@ static unsigned long get_cmos_time(void) | |||
510 | mon = CMOS_READ(RTC_MONTH); | 510 | mon = CMOS_READ(RTC_MONTH); |
511 | year = CMOS_READ(RTC_YEAR); | 511 | year = CMOS_READ(RTC_YEAR); |
512 | #ifdef CONFIG_ACPI | 512 | #ifdef CONFIG_ACPI |
513 | if (acpi_fadt.revision >= FADT2_REVISION_ID && | 513 | if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && |
514 | acpi_fadt.century) | 514 | acpi_gbl_FADT.century) |
515 | extyear = CMOS_READ(acpi_fadt.century); | 515 | century = CMOS_READ(acpi_gbl_FADT.century); |
516 | #endif | 516 | #endif |
517 | } while (sec != CMOS_READ(RTC_SECONDS)); | 517 | } while (sec != CMOS_READ(RTC_SECONDS)); |
518 | 518 | ||
@@ -530,10 +530,10 @@ static unsigned long get_cmos_time(void) | |||
530 | BCD_TO_BIN(mon); | 530 | BCD_TO_BIN(mon); |
531 | BCD_TO_BIN(year); | 531 | BCD_TO_BIN(year); |
532 | 532 | ||
533 | if (extyear) { | 533 | if (century) { |
534 | BCD_TO_BIN(extyear); | 534 | BCD_TO_BIN(century); |
535 | year += extyear; | 535 | year += century * 100; |
536 | printk(KERN_INFO "Extended CMOS year: %d\n", extyear); | 536 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); |
537 | } else { | 537 | } else { |
538 | /* | 538 | /* |
539 | * x86-64 systems only exists since 2002. | 539 | * x86-64 systems only exists since 2002. |
@@ -954,7 +954,7 @@ __cpuinit int unsynchronized_tsc(void) | |||
954 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { | 954 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { |
955 | #ifdef CONFIG_ACPI | 955 | #ifdef CONFIG_ACPI |
956 | /* But TSC doesn't tick in C3 so don't use it there */ | 956 | /* But TSC doesn't tick in C3 so don't use it there */ |
957 | if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 1000) | 957 | if (acpi_gbl_FADT.header.length > 0 && acpi_gbl_FADT.C3latency < 1000) |
958 | return 1; | 958 | return 1; |
959 | #endif | 959 | #endif |
960 | return 0; | 960 | return 0; |
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 396140bbbe57..31ad70a6e22e 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * Pontus Fuchs - Helper functions, cleanup | 26 | * Pontus Fuchs - Helper functions, cleanup |
27 | * Johann Wiesner - Small compile fixes | 27 | * Johann Wiesner - Small compile fixes |
28 | * John Belmonte - ACPI code for Toshiba laptop was a good starting point. | 28 | * John Belmonte - ACPI code for Toshiba laptop was a good starting point. |
29 | * Éric Burghard - LED display support for W1N | 29 | * �ic Burghard - LED display support for W1N |
30 | * | 30 | * |
31 | */ | 31 | */ |
32 | 32 | ||
@@ -1128,7 +1128,6 @@ static int asus_model_match(char *model) | |||
1128 | static int asus_hotk_get_info(void) | 1128 | static int asus_hotk_get_info(void) |
1129 | { | 1129 | { |
1130 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 1130 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
1131 | struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
1132 | union acpi_object *model = NULL; | 1131 | union acpi_object *model = NULL; |
1133 | int bsts_result; | 1132 | int bsts_result; |
1134 | char *string = NULL; | 1133 | char *string = NULL; |
@@ -1142,11 +1141,9 @@ static int asus_hotk_get_info(void) | |||
1142 | * HID), this bit will be moved. A global variable asus_info contains | 1141 | * HID), this bit will be moved. A global variable asus_info contains |
1143 | * the DSDT header. | 1142 | * the DSDT header. |
1144 | */ | 1143 | */ |
1145 | status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); | 1144 | status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus_info); |
1146 | if (ACPI_FAILURE(status)) | 1145 | if (ACPI_FAILURE(status)) |
1147 | printk(KERN_WARNING " Couldn't get the DSDT table header\n"); | 1146 | printk(KERN_WARNING " Couldn't get the DSDT table header\n"); |
1148 | else | ||
1149 | asus_info = dsdt.pointer; | ||
1150 | 1147 | ||
1151 | /* We have to write 0 on init this far for all ASUS models */ | 1148 | /* We have to write 0 on init this far for all ASUS models */ |
1152 | if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { | 1149 | if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { |
@@ -1358,8 +1355,6 @@ static void __exit asus_acpi_exit(void) | |||
1358 | acpi_bus_unregister_driver(&asus_hotk_driver); | 1355 | acpi_bus_unregister_driver(&asus_hotk_driver); |
1359 | remove_proc_entry(PROC_ASUS, acpi_root_dir); | 1356 | remove_proc_entry(PROC_ASUS, acpi_root_dir); |
1360 | 1357 | ||
1361 | kfree(asus_info); | ||
1362 | |||
1363 | return; | 1358 | return; |
1364 | } | 1359 | } |
1365 | 1360 | ||
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index f9c972b26f4f..bdc169bc054a 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -44,7 +44,7 @@ struct acpi_blacklist_item { | |||
44 | char oem_id[7]; | 44 | char oem_id[7]; |
45 | char oem_table_id[9]; | 45 | char oem_table_id[9]; |
46 | u32 oem_revision; | 46 | u32 oem_revision; |
47 | acpi_table_type table; | 47 | char *table; |
48 | enum acpi_blacklist_predicates oem_revision_predicate; | 48 | enum acpi_blacklist_predicates oem_revision_predicate; |
49 | char *reason; | 49 | char *reason; |
50 | u32 is_critical_error; | 50 | u32 is_critical_error; |
@@ -56,18 +56,18 @@ struct acpi_blacklist_item { | |||
56 | */ | 56 | */ |
57 | static struct acpi_blacklist_item acpi_blacklist[] __initdata = { | 57 | static struct acpi_blacklist_item acpi_blacklist[] __initdata = { |
58 | /* Compaq Presario 1700 */ | 58 | /* Compaq Presario 1700 */ |
59 | {"PTLTD ", " DSDT ", 0x06040000, ACPI_DSDT, less_than_or_equal, | 59 | {"PTLTD ", " DSDT ", 0x06040000, ACPI_SIG_DSDT, less_than_or_equal, |
60 | "Multiple problems", 1}, | 60 | "Multiple problems", 1}, |
61 | /* Sony FX120, FX140, FX150? */ | 61 | /* Sony FX120, FX140, FX150? */ |
62 | {"SONY ", "U0 ", 0x20010313, ACPI_DSDT, less_than_or_equal, | 62 | {"SONY ", "U0 ", 0x20010313, ACPI_SIG_DSDT, less_than_or_equal, |
63 | "ACPI driver problem", 1}, | 63 | "ACPI driver problem", 1}, |
64 | /* Compaq Presario 800, Insyde BIOS */ | 64 | /* Compaq Presario 800, Insyde BIOS */ |
65 | {"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal, | 65 | {"INT440", "SYSFexxx", 0x00001001, ACPI_SIG_DSDT, less_than_or_equal, |
66 | "Does not use _REG to protect EC OpRegions", 1}, | 66 | "Does not use _REG to protect EC OpRegions", 1}, |
67 | /* IBM 600E - _ADR should return 7, but it returns 1 */ | 67 | /* IBM 600E - _ADR should return 7, but it returns 1 */ |
68 | {"IBM ", "TP600E ", 0x00000105, ACPI_DSDT, less_than_or_equal, | 68 | {"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal, |
69 | "Incorrect _ADR", 1}, | 69 | "Incorrect _ADR", 1}, |
70 | {"ASUS\0\0", "P2B-S ", 0, ACPI_DSDT, all_versions, | 70 | {"ASUS\0\0", "P2B-S ", 0, ACPI_SIG_DSDT, all_versions, |
71 | "Bogus PCI routing", 1}, | 71 | "Bogus PCI routing", 1}, |
72 | 72 | ||
73 | {""} | 73 | {""} |
@@ -106,8 +106,7 @@ int __init acpi_blacklisted(void) | |||
106 | struct acpi_table_header *table_header; | 106 | struct acpi_table_header *table_header; |
107 | 107 | ||
108 | while (acpi_blacklist[i].oem_id[0] != '\0') { | 108 | while (acpi_blacklist[i].oem_id[0] != '\0') { |
109 | if (acpi_get_table_header_early | 109 | if (acpi_get_table_header(acpi_blacklist[i].table, 0, &table_header)) { |
110 | (acpi_blacklist[i].table, &table_header)) { | ||
111 | i++; | 110 | i++; |
112 | continue; | 111 | continue; |
113 | } | 112 | } |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 766332e45592..cb807c43e59b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -44,9 +44,6 @@ ACPI_MODULE_NAME("acpi_bus") | |||
44 | extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); | 44 | extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | struct fadt_descriptor acpi_fadt; | ||
48 | EXPORT_SYMBOL(acpi_fadt); | ||
49 | |||
50 | struct acpi_device *acpi_root; | 47 | struct acpi_device *acpi_root; |
51 | struct proc_dir_entry *acpi_root_dir; | 48 | struct proc_dir_entry *acpi_root_dir; |
52 | EXPORT_SYMBOL(acpi_root_dir); | 49 | EXPORT_SYMBOL(acpi_root_dir); |
@@ -582,11 +579,12 @@ static int __init acpi_bus_init_irq(void) | |||
582 | return 0; | 579 | return 0; |
583 | } | 580 | } |
584 | 581 | ||
582 | acpi_native_uint acpi_gbl_permanent_mmap; | ||
583 | |||
584 | |||
585 | void __init acpi_early_init(void) | 585 | void __init acpi_early_init(void) |
586 | { | 586 | { |
587 | acpi_status status = AE_OK; | 587 | acpi_status status = AE_OK; |
588 | struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt }; | ||
589 | |||
590 | 588 | ||
591 | if (acpi_disabled) | 589 | if (acpi_disabled) |
592 | return; | 590 | return; |
@@ -597,6 +595,15 @@ void __init acpi_early_init(void) | |||
597 | if (!acpi_strict) | 595 | if (!acpi_strict) |
598 | acpi_gbl_enable_interpreter_slack = TRUE; | 596 | acpi_gbl_enable_interpreter_slack = TRUE; |
599 | 597 | ||
598 | acpi_gbl_permanent_mmap = 1; | ||
599 | |||
600 | status = acpi_reallocate_root_table(); | ||
601 | if (ACPI_FAILURE(status)) { | ||
602 | printk(KERN_ERR PREFIX | ||
603 | "Unable to reallocate ACPI tables\n"); | ||
604 | goto error0; | ||
605 | } | ||
606 | |||
600 | status = acpi_initialize_subsystem(); | 607 | status = acpi_initialize_subsystem(); |
601 | if (ACPI_FAILURE(status)) { | 608 | if (ACPI_FAILURE(status)) { |
602 | printk(KERN_ERR PREFIX | 609 | printk(KERN_ERR PREFIX |
@@ -611,14 +618,6 @@ void __init acpi_early_init(void) | |||
611 | goto error0; | 618 | goto error0; |
612 | } | 619 | } |
613 | 620 | ||
614 | /* | ||
615 | * Get a separate copy of the FADT for use by other drivers. | ||
616 | */ | ||
617 | status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &buffer); | ||
618 | if (ACPI_FAILURE(status)) { | ||
619 | printk(KERN_ERR PREFIX "Unable to get the FADT\n"); | ||
620 | goto error0; | ||
621 | } | ||
622 | #ifdef CONFIG_X86 | 621 | #ifdef CONFIG_X86 |
623 | if (!acpi_ioapic) { | 622 | if (!acpi_ioapic) { |
624 | extern acpi_interrupt_flags acpi_sci_flags; | 623 | extern acpi_interrupt_flags acpi_sci_flags; |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index cbdf031f3c09..7a1f2baff646 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -872,9 +872,7 @@ static int __init acpi_ec_get_real_ecdt(void) | |||
872 | acpi_status status; | 872 | acpi_status status; |
873 | struct acpi_table_ecdt *ecdt_ptr; | 873 | struct acpi_table_ecdt *ecdt_ptr; |
874 | 874 | ||
875 | status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING, | 875 | status = acpi_get_table("ECDT", 1, (struct acpi_table_header **)&ecdt_ptr); |
876 | (struct acpi_table_header **) | ||
877 | &ecdt_ptr); | ||
878 | if (ACPI_FAILURE(status)) | 876 | if (ACPI_FAILURE(status)) |
879 | return -ENODEV; | 877 | return -ENODEV; |
880 | 878 | ||
diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c index 2e17ec75af03..b61107b05262 100644 --- a/drivers/acpi/motherboard.c +++ b/drivers/acpi/motherboard.c | |||
@@ -134,41 +134,41 @@ static void __init acpi_request_region (struct acpi_generic_address *addr, | |||
134 | if (!addr->address || !length) | 134 | if (!addr->address || !length) |
135 | return; | 135 | return; |
136 | 136 | ||
137 | if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) | 137 | if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO) |
138 | request_region(addr->address, length, desc); | 138 | request_region(addr->address, length, desc); |
139 | else if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) | 139 | else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) |
140 | request_mem_region(addr->address, length, desc); | 140 | request_mem_region(addr->address, length, desc); |
141 | } | 141 | } |
142 | 142 | ||
143 | static void __init acpi_reserve_resources(void) | 143 | static void __init acpi_reserve_resources(void) |
144 | { | 144 | { |
145 | acpi_request_region(&acpi_gbl_FADT->xpm1a_evt_blk, | 145 | acpi_request_region(&acpi_gbl_FADT.xpm1a_event_block, |
146 | acpi_gbl_FADT->pm1_evt_len, "ACPI PM1a_EVT_BLK"); | 146 | acpi_gbl_FADT.pm1_event_length, "ACPI PM1a_EVT_BLK"); |
147 | 147 | ||
148 | acpi_request_region(&acpi_gbl_FADT->xpm1b_evt_blk, | 148 | acpi_request_region(&acpi_gbl_FADT.xpm1b_event_block, |
149 | acpi_gbl_FADT->pm1_evt_len, "ACPI PM1b_EVT_BLK"); | 149 | acpi_gbl_FADT.pm1_event_length, "ACPI PM1b_EVT_BLK"); |
150 | 150 | ||
151 | acpi_request_region(&acpi_gbl_FADT->xpm1a_cnt_blk, | 151 | acpi_request_region(&acpi_gbl_FADT.xpm1a_control_block, |
152 | acpi_gbl_FADT->pm1_cnt_len, "ACPI PM1a_CNT_BLK"); | 152 | acpi_gbl_FADT.pm1_control_length, "ACPI PM1a_CNT_BLK"); |
153 | 153 | ||
154 | acpi_request_region(&acpi_gbl_FADT->xpm1b_cnt_blk, | 154 | acpi_request_region(&acpi_gbl_FADT.xpm1b_control_block, |
155 | acpi_gbl_FADT->pm1_cnt_len, "ACPI PM1b_CNT_BLK"); | 155 | acpi_gbl_FADT.pm1_control_length, "ACPI PM1b_CNT_BLK"); |
156 | 156 | ||
157 | if (acpi_gbl_FADT->pm_tm_len == 4) | 157 | if (acpi_gbl_FADT.pm_timer_length == 4) |
158 | acpi_request_region(&acpi_gbl_FADT->xpm_tmr_blk, 4, "ACPI PM_TMR"); | 158 | acpi_request_region(&acpi_gbl_FADT.xpm_timer_block, 4, "ACPI PM_TMR"); |
159 | 159 | ||
160 | acpi_request_region(&acpi_gbl_FADT->xpm2_cnt_blk, | 160 | acpi_request_region(&acpi_gbl_FADT.xpm2_control_block, |
161 | acpi_gbl_FADT->pm2_cnt_len, "ACPI PM2_CNT_BLK"); | 161 | acpi_gbl_FADT.pm2_control_length, "ACPI PM2_CNT_BLK"); |
162 | 162 | ||
163 | /* Length of GPE blocks must be a non-negative multiple of 2 */ | 163 | /* Length of GPE blocks must be a non-negative multiple of 2 */ |
164 | 164 | ||
165 | if (!(acpi_gbl_FADT->gpe0_blk_len & 0x1)) | 165 | if (!(acpi_gbl_FADT.gpe0_block_length & 0x1)) |
166 | acpi_request_region(&acpi_gbl_FADT->xgpe0_blk, | 166 | acpi_request_region(&acpi_gbl_FADT.xgpe0_block, |
167 | acpi_gbl_FADT->gpe0_blk_len, "ACPI GPE0_BLK"); | 167 | acpi_gbl_FADT.gpe0_block_length, "ACPI GPE0_BLK"); |
168 | 168 | ||
169 | if (!(acpi_gbl_FADT->gpe1_blk_len & 0x1)) | 169 | if (!(acpi_gbl_FADT.gpe1_block_length & 0x1)) |
170 | acpi_request_region(&acpi_gbl_FADT->xgpe1_blk, | 170 | acpi_request_region(&acpi_gbl_FADT.xgpe1_block, |
171 | acpi_gbl_FADT->gpe1_blk_len, "ACPI GPE1_BLK"); | 171 | acpi_gbl_FADT.gpe1_block_length, "ACPI GPE1_BLK"); |
172 | } | 172 | } |
173 | 173 | ||
174 | static int __init acpi_motherboard_init(void) | 174 | static int __init acpi_motherboard_init(void) |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 57ae1e5cde0a..c1c2100fe133 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/workqueue.h> | 37 | #include <linux/workqueue.h> |
38 | #include <linux/nmi.h> | 38 | #include <linux/nmi.h> |
39 | #include <linux/acpi.h> | ||
39 | #include <acpi/acpi.h> | 40 | #include <acpi/acpi.h> |
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
41 | #include <acpi/acpi_bus.h> | 42 | #include <acpi/acpi_bus.h> |
@@ -136,53 +137,43 @@ void acpi_os_vprintf(const char *fmt, va_list args) | |||
136 | #endif | 137 | #endif |
137 | } | 138 | } |
138 | 139 | ||
139 | acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr) | 140 | acpi_physical_address __init acpi_os_get_root_pointer(void) |
140 | { | 141 | { |
141 | if (efi_enabled) { | 142 | if (efi_enabled) { |
142 | addr->pointer_type = ACPI_PHYSICAL_POINTER; | ||
143 | if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) | 143 | if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) |
144 | addr->pointer.physical = efi.acpi20; | 144 | return efi.acpi20; |
145 | else if (efi.acpi != EFI_INVALID_TABLE_ADDR) | 145 | else if (efi.acpi != EFI_INVALID_TABLE_ADDR) |
146 | addr->pointer.physical = efi.acpi; | 146 | return efi.acpi; |
147 | else { | 147 | else { |
148 | printk(KERN_ERR PREFIX | 148 | printk(KERN_ERR PREFIX |
149 | "System description tables not found\n"); | 149 | "System description tables not found\n"); |
150 | return AE_NOT_FOUND; | 150 | return 0; |
151 | } | 151 | } |
152 | } else { | 152 | } else |
153 | if (ACPI_FAILURE(acpi_find_root_pointer(flags, addr))) { | 153 | return acpi_find_rsdp(); |
154 | printk(KERN_ERR PREFIX | ||
155 | "System description tables not found\n"); | ||
156 | return AE_NOT_FOUND; | ||
157 | } | ||
158 | } | ||
159 | |||
160 | return AE_OK; | ||
161 | } | 154 | } |
162 | 155 | ||
163 | acpi_status | 156 | void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size) |
164 | acpi_os_map_memory(acpi_physical_address phys, acpi_size size, | ||
165 | void __iomem ** virt) | ||
166 | { | 157 | { |
167 | if (phys > ULONG_MAX) { | 158 | if (phys > ULONG_MAX) { |
168 | printk(KERN_ERR PREFIX "Cannot map memory that high\n"); | 159 | printk(KERN_ERR PREFIX "Cannot map memory that high\n"); |
169 | return AE_BAD_PARAMETER; | 160 | return 0; |
170 | } | 161 | } |
171 | /* | 162 | if (acpi_gbl_permanent_mmap) |
172 | * ioremap checks to ensure this is in reserved space | 163 | /* |
173 | */ | 164 | * ioremap checks to ensure this is in reserved space |
174 | *virt = ioremap((unsigned long)phys, size); | 165 | */ |
175 | 166 | return ioremap((unsigned long)phys, size); | |
176 | if (!*virt) | 167 | else |
177 | return AE_NO_MEMORY; | 168 | return __acpi_map_table((unsigned long)phys, size); |
178 | |||
179 | return AE_OK; | ||
180 | } | 169 | } |
181 | EXPORT_SYMBOL_GPL(acpi_os_map_memory); | 170 | EXPORT_SYMBOL_GPL(acpi_os_map_memory); |
182 | 171 | ||
183 | void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) | 172 | void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) |
184 | { | 173 | { |
185 | iounmap(virt); | 174 | if (acpi_gbl_permanent_mmap) { |
175 | iounmap(virt); | ||
176 | } | ||
186 | } | 177 | } |
187 | EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); | 178 | EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); |
188 | 179 | ||
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 5f9496d59ed6..4d552f7caa91 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -431,7 +431,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
431 | * Check to see if we have bus mastering arbitration control. This | 431 | * Check to see if we have bus mastering arbitration control. This |
432 | * is required for proper C3 usage (to maintain cache coherency). | 432 | * is required for proper C3 usage (to maintain cache coherency). |
433 | */ | 433 | */ |
434 | if (acpi_fadt.V1_pm2_cnt_blk && acpi_fadt.pm2_cnt_len) { | 434 | if (acpi_fadt.pm2_control_block && acpi_fadt.pm2_control_length) { |
435 | pr->flags.bm_control = 1; | 435 | pr->flags.bm_control = 1; |
436 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 436 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
437 | "Bus mastering arbitration control present\n")); | 437 | "Bus mastering arbitration control present\n")); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 3f30af21574e..9fa3d3965bb3 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -160,7 +160,7 @@ static inline u32 ticks_elapsed(u32 t1, u32 t2) | |||
160 | { | 160 | { |
161 | if (t2 >= t1) | 161 | if (t2 >= t1) |
162 | return (t2 - t1); | 162 | return (t2 - t1); |
163 | else if (!acpi_fadt.tmr_val_ext) | 163 | else if (!(acpi_fadt.flags & ACPI_FADT_32BIT_TIMER)) |
164 | return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF); | 164 | return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF); |
165 | else | 165 | else |
166 | return ((0xFFFFFFFF - t1) + t2); | 166 | return ((0xFFFFFFFF - t1) + t2); |
@@ -236,7 +236,7 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate) | |||
236 | /* Dummy wait op - must do something useless after P_LVL2 read | 236 | /* Dummy wait op - must do something useless after P_LVL2 read |
237 | because chipsets cannot guarantee that STPCLK# signal | 237 | because chipsets cannot guarantee that STPCLK# signal |
238 | gets asserted in time to freeze execution properly. */ | 238 | gets asserted in time to freeze execution properly. */ |
239 | unused = inl(acpi_fadt.xpm_tmr_blk.address); | 239 | unused = inl(acpi_fadt.xpm_timer_block.address); |
240 | } | 240 | } |
241 | } | 241 | } |
242 | 242 | ||
@@ -338,7 +338,7 @@ static void acpi_processor_idle(void) | |||
338 | * detection phase, to work cleanly with logical CPU hotplug. | 338 | * detection phase, to work cleanly with logical CPU hotplug. |
339 | */ | 339 | */ |
340 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && | 340 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && |
341 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) | 341 | !pr->flags.has_cst && !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED)) |
342 | cx = &pr->power.states[ACPI_STATE_C1]; | 342 | cx = &pr->power.states[ACPI_STATE_C1]; |
343 | #endif | 343 | #endif |
344 | 344 | ||
@@ -384,11 +384,11 @@ static void acpi_processor_idle(void) | |||
384 | 384 | ||
385 | case ACPI_STATE_C2: | 385 | case ACPI_STATE_C2: |
386 | /* Get start time (ticks) */ | 386 | /* Get start time (ticks) */ |
387 | t1 = inl(acpi_fadt.xpm_tmr_blk.address); | 387 | t1 = inl(acpi_fadt.xpm_timer_block.address); |
388 | /* Invoke C2 */ | 388 | /* Invoke C2 */ |
389 | acpi_cstate_enter(cx); | 389 | acpi_cstate_enter(cx); |
390 | /* Get end time (ticks) */ | 390 | /* Get end time (ticks) */ |
391 | t2 = inl(acpi_fadt.xpm_tmr_blk.address); | 391 | t2 = inl(acpi_fadt.xpm_timer_block.address); |
392 | 392 | ||
393 | #ifdef CONFIG_GENERIC_TIME | 393 | #ifdef CONFIG_GENERIC_TIME |
394 | /* TSC halts in C2, so notify users */ | 394 | /* TSC halts in C2, so notify users */ |
@@ -420,11 +420,11 @@ static void acpi_processor_idle(void) | |||
420 | } | 420 | } |
421 | 421 | ||
422 | /* Get start time (ticks) */ | 422 | /* Get start time (ticks) */ |
423 | t1 = inl(acpi_fadt.xpm_tmr_blk.address); | 423 | t1 = inl(acpi_fadt.xpm_timer_block.address); |
424 | /* Invoke C3 */ | 424 | /* Invoke C3 */ |
425 | acpi_cstate_enter(cx); | 425 | acpi_cstate_enter(cx); |
426 | /* Get end time (ticks) */ | 426 | /* Get end time (ticks) */ |
427 | t2 = inl(acpi_fadt.xpm_tmr_blk.address); | 427 | t2 = inl(acpi_fadt.xpm_timer_block.address); |
428 | if (pr->flags.bm_check) { | 428 | if (pr->flags.bm_check) { |
429 | /* Enable bus master arbitration */ | 429 | /* Enable bus master arbitration */ |
430 | atomic_dec(&c3_cpu_count); | 430 | atomic_dec(&c3_cpu_count); |
@@ -457,7 +457,7 @@ static void acpi_processor_idle(void) | |||
457 | #ifdef CONFIG_HOTPLUG_CPU | 457 | #ifdef CONFIG_HOTPLUG_CPU |
458 | /* Don't do promotion/demotion */ | 458 | /* Don't do promotion/demotion */ |
459 | if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && | 459 | if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && |
460 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) { | 460 | !pr->flags.has_cst && !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED)) { |
461 | next_state = cx; | 461 | next_state = cx; |
462 | goto end; | 462 | goto end; |
463 | } | 463 | } |
@@ -627,7 +627,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
627 | * Check for P_LVL2_UP flag before entering C2 and above on | 627 | * Check for P_LVL2_UP flag before entering C2 and above on |
628 | * an SMP system. | 628 | * an SMP system. |
629 | */ | 629 | */ |
630 | if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) | 630 | if ((num_online_cpus() > 1) && |
631 | !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED)) | ||
631 | return -ENODEV; | 632 | return -ENODEV; |
632 | #endif | 633 | #endif |
633 | 634 | ||
@@ -636,8 +637,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
636 | pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; | 637 | pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; |
637 | 638 | ||
638 | /* determine latencies from FADT */ | 639 | /* determine latencies from FADT */ |
639 | pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.plvl2_lat; | 640 | pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.C2latency; |
640 | pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.plvl3_lat; | 641 | pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.C3latency; |
641 | 642 | ||
642 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 643 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
643 | "lvl2[0x%08x] lvl3[0x%08x]\n", | 644 | "lvl2[0x%08x] lvl3[0x%08x]\n", |
@@ -883,7 +884,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, | |||
883 | * WBINVD should be set in fadt, for C3 state to be | 884 | * WBINVD should be set in fadt, for C3 state to be |
884 | * supported on when bm_check is not required. | 885 | * supported on when bm_check is not required. |
885 | */ | 886 | */ |
886 | if (acpi_fadt.wb_invd != 1) { | 887 | if (!(acpi_fadt.flags & ACPI_FADT_WBINVD)) { |
887 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 888 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
888 | "Cache invalidation should work properly" | 889 | "Cache invalidation should work properly" |
889 | " for C3 to be enabled on SMP systems\n")); | 890 | " for C3 to be enabled on SMP systems\n")); |
@@ -1164,9 +1165,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1164 | if (!pr) | 1165 | if (!pr) |
1165 | return -EINVAL; | 1166 | return -EINVAL; |
1166 | 1167 | ||
1167 | if (acpi_fadt.cst_cnt && !nocst) { | 1168 | if (acpi_fadt.cst_control && !nocst) { |
1168 | status = | 1169 | status = |
1169 | acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8); | 1170 | acpi_os_write_port(acpi_fadt.smi_command, acpi_fadt.cst_control, 8); |
1170 | if (ACPI_FAILURE(status)) { | 1171 | if (ACPI_FAILURE(status)) { |
1171 | ACPI_EXCEPTION((AE_INFO, status, | 1172 | ACPI_EXCEPTION((AE_INFO, status, |
1172 | "Notifying BIOS of _CST ability failed")); | 1173 | "Notifying BIOS of _CST ability failed")); |
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index cbb6f0814ce2..aabb98832ba6 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -352,31 +352,24 @@ int acpi_processor_notify_smm(struct module *calling_module) | |||
352 | 352 | ||
353 | is_done = -EIO; | 353 | is_done = -EIO; |
354 | 354 | ||
355 | /* Can't write pstate_cnt to smi_cmd if either value is zero */ | 355 | /* Can't write pstate_control to smi_command if either value is zero */ |
356 | if ((!acpi_fadt.smi_cmd) || (!acpi_fadt.pstate_cnt)) { | 356 | if ((!acpi_fadt.smi_command) || (!acpi_fadt.pstate_control)) { |
357 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_cnt\n")); | 357 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_control\n")); |
358 | module_put(calling_module); | 358 | module_put(calling_module); |
359 | return 0; | 359 | return 0; |
360 | } | 360 | } |
361 | 361 | ||
362 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 362 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
363 | "Writing pstate_cnt [0x%x] to smi_cmd [0x%x]\n", | 363 | "Writing pstate_control [0x%x] to smi_command [0x%x]\n", |
364 | acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd)); | 364 | acpi_fadt.pstate_control, acpi_fadt.smi_command)); |
365 | 365 | ||
366 | /* FADT v1 doesn't support pstate_cnt, many BIOS vendors use | 366 | status = acpi_os_write_port(acpi_fadt.smi_command, |
367 | * it anyway, so we need to support it... */ | 367 | (u32) acpi_fadt.pstate_control, 8); |
368 | if (acpi_fadt_is_v1) { | ||
369 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
370 | "Using v1.0 FADT reserved value for pstate_cnt\n")); | ||
371 | } | ||
372 | |||
373 | status = acpi_os_write_port(acpi_fadt.smi_cmd, | ||
374 | (u32) acpi_fadt.pstate_cnt, 8); | ||
375 | if (ACPI_FAILURE(status)) { | 368 | if (ACPI_FAILURE(status)) { |
376 | ACPI_EXCEPTION((AE_INFO, status, | 369 | ACPI_EXCEPTION((AE_INFO, status, |
377 | "Failed to write pstate_cnt [0x%x] to " | 370 | "Failed to write pstate_control [0x%x] to " |
378 | "smi_cmd [0x%x]", acpi_fadt.pstate_cnt, | 371 | "smi_command [0x%x]", acpi_fadt.pstate_control, |
379 | acpi_fadt.smi_cmd)); | 372 | acpi_fadt.smi_command)); |
380 | module_put(calling_module); | 373 | module_put(calling_module); |
381 | return status; | 374 | return status; |
382 | } | 375 | } |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 283d87522c5d..b1692b18c9d7 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1333,7 +1333,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root) | |||
1333 | /* | 1333 | /* |
1334 | * Enumerate all fixed-feature devices. | 1334 | * Enumerate all fixed-feature devices. |
1335 | */ | 1335 | */ |
1336 | if (acpi_fadt.pwr_button == 0) { | 1336 | if ((acpi_fadt.flags & ACPI_FADT_POWER_BUTTON) == 0) { |
1337 | result = acpi_add_single_object(&device, acpi_root, | 1337 | result = acpi_add_single_object(&device, acpi_root, |
1338 | NULL, | 1338 | NULL, |
1339 | ACPI_BUS_TYPE_POWER_BUTTON); | 1339 | ACPI_BUS_TYPE_POWER_BUTTON); |
@@ -1341,7 +1341,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root) | |||
1341 | result = acpi_start_single_object(device); | 1341 | result = acpi_start_single_object(device); |
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | if (acpi_fadt.sleep_button == 0) { | 1344 | if ((acpi_fadt.flags & ACPI_FADT_SLEEP_BUTTON) == 0) { |
1345 | result = acpi_add_single_object(&device, acpi_root, | 1345 | result = acpi_add_single_object(&device, acpi_root, |
1346 | NULL, | 1346 | NULL, |
1347 | ACPI_BUS_TYPE_SLEEP_BUTTON); | 1347 | ACPI_BUS_TYPE_SLEEP_BUTTON); |
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 34962578039d..ccc11b33d89c 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -73,7 +73,7 @@ acpi_system_write_sleep(struct file *file, | |||
73 | static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) | 73 | static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) |
74 | { | 74 | { |
75 | u32 sec, min, hr; | 75 | u32 sec, min, hr; |
76 | u32 day, mo, yr; | 76 | u32 day, mo, yr, cent = 0; |
77 | unsigned char rtc_control = 0; | 77 | unsigned char rtc_control = 0; |
78 | unsigned long flags; | 78 | unsigned long flags; |
79 | 79 | ||
@@ -87,20 +87,19 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) | |||
87 | rtc_control = CMOS_READ(RTC_CONTROL); | 87 | rtc_control = CMOS_READ(RTC_CONTROL); |
88 | 88 | ||
89 | /* If we ever get an FACP with proper values... */ | 89 | /* If we ever get an FACP with proper values... */ |
90 | if (acpi_gbl_FADT->day_alrm) | 90 | if (acpi_gbl_FADT.day_alarm) |
91 | /* ACPI spec: only low 6 its should be cared */ | 91 | /* ACPI spec: only low 6 its should be cared */ |
92 | day = CMOS_READ(acpi_gbl_FADT->day_alrm) & 0x3F; | 92 | day = CMOS_READ(acpi_gbl_FADT.day_alarm) & 0x3F; |
93 | else | 93 | else |
94 | day = CMOS_READ(RTC_DAY_OF_MONTH); | 94 | day = CMOS_READ(RTC_DAY_OF_MONTH); |
95 | if (acpi_gbl_FADT->mon_alrm) | 95 | if (acpi_gbl_FADT.month_alarm) |
96 | mo = CMOS_READ(acpi_gbl_FADT->mon_alrm); | 96 | mo = CMOS_READ(acpi_gbl_FADT.month_alarm); |
97 | else | 97 | else |
98 | mo = CMOS_READ(RTC_MONTH); | 98 | mo = CMOS_READ(RTC_MONTH); |
99 | if (acpi_gbl_FADT->century) | 99 | if (acpi_gbl_FADT.century) |
100 | yr = CMOS_READ(acpi_gbl_FADT->century) * 100 + | 100 | cent = CMOS_READ(acpi_gbl_FADT.century); |
101 | CMOS_READ(RTC_YEAR); | 101 | |
102 | else | 102 | yr = CMOS_READ(RTC_YEAR); |
103 | yr = CMOS_READ(RTC_YEAR); | ||
104 | 103 | ||
105 | spin_unlock_irqrestore(&rtc_lock, flags); | 104 | spin_unlock_irqrestore(&rtc_lock, flags); |
106 | 105 | ||
@@ -111,10 +110,11 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) | |||
111 | BCD_TO_BIN(day); | 110 | BCD_TO_BIN(day); |
112 | BCD_TO_BIN(mo); | 111 | BCD_TO_BIN(mo); |
113 | BCD_TO_BIN(yr); | 112 | BCD_TO_BIN(yr); |
113 | BCD_TO_BIN(cent); | ||
114 | } | 114 | } |
115 | 115 | ||
116 | /* we're trusting the FADT (see above) */ | 116 | /* we're trusting the FADT (see above) */ |
117 | if (!acpi_gbl_FADT->century) | 117 | if (!acpi_gbl_FADT.century) |
118 | /* If we're not trusting the FADT, we should at least make it | 118 | /* If we're not trusting the FADT, we should at least make it |
119 | * right for _this_ century... ehm, what is _this_ century? | 119 | * right for _this_ century... ehm, what is _this_ century? |
120 | * | 120 | * |
@@ -134,6 +134,8 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) | |||
134 | * | 134 | * |
135 | */ | 135 | */ |
136 | yr += 2000; | 136 | yr += 2000; |
137 | else | ||
138 | yr += cent * 100; | ||
137 | 139 | ||
138 | seq_printf(seq, "%4.4u-", yr); | 140 | seq_printf(seq, "%4.4u-", yr); |
139 | (mo > 12) ? seq_puts(seq, "**-") : seq_printf(seq, "%2.2u-", mo); | 141 | (mo > 12) ? seq_puts(seq, "**-") : seq_printf(seq, "%2.2u-", mo); |
@@ -317,12 +319,12 @@ acpi_system_write_alarm(struct file *file, | |||
317 | * offsets into the CMOS RAM here -- which for some reason are pointing | 319 | * offsets into the CMOS RAM here -- which for some reason are pointing |
318 | * to the RTC area of memory. | 320 | * to the RTC area of memory. |
319 | */ | 321 | */ |
320 | if (acpi_gbl_FADT->day_alrm) | 322 | if (acpi_gbl_FADT.day_alarm) |
321 | CMOS_WRITE(day, acpi_gbl_FADT->day_alrm); | 323 | CMOS_WRITE(day, acpi_gbl_FADT.day_alarm); |
322 | if (acpi_gbl_FADT->mon_alrm) | 324 | if (acpi_gbl_FADT.month_alarm) |
323 | CMOS_WRITE(mo, acpi_gbl_FADT->mon_alrm); | 325 | CMOS_WRITE(mo, acpi_gbl_FADT.month_alarm); |
324 | if (acpi_gbl_FADT->century) | 326 | if (acpi_gbl_FADT.century) |
325 | CMOS_WRITE(yr / 100, acpi_gbl_FADT->century); | 327 | CMOS_WRITE(yr / 100, acpi_gbl_FADT.century); |
326 | /* enable the rtc alarm interrupt */ | 328 | /* enable the rtc alarm interrupt */ |
327 | rtc_control |= RTC_AIE; | 329 | rtc_control |= RTC_AIE; |
328 | CMOS_WRITE(rtc_control, RTC_CONTROL); | 330 | CMOS_WRITE(rtc_control, RTC_CONTROL); |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index d86dcb3c2366..2d425d845821 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -39,7 +39,6 @@ ACPI_MODULE_NAME("acpi_system") | |||
39 | #define ACPI_SYSTEM_FILE_EVENT "event" | 39 | #define ACPI_SYSTEM_FILE_EVENT "event" |
40 | #define ACPI_SYSTEM_FILE_DSDT "dsdt" | 40 | #define ACPI_SYSTEM_FILE_DSDT "dsdt" |
41 | #define ACPI_SYSTEM_FILE_FADT "fadt" | 41 | #define ACPI_SYSTEM_FILE_FADT "fadt" |
42 | extern struct fadt_descriptor acpi_fadt; | ||
43 | 42 | ||
44 | /* -------------------------------------------------------------------------- | 43 | /* -------------------------------------------------------------------------- |
45 | FS Interface (/proc) | 44 | FS Interface (/proc) |
@@ -76,17 +75,16 @@ acpi_system_read_dsdt(struct file *file, | |||
76 | char __user * buffer, size_t count, loff_t * ppos) | 75 | char __user * buffer, size_t count, loff_t * ppos) |
77 | { | 76 | { |
78 | acpi_status status = AE_OK; | 77 | acpi_status status = AE_OK; |
79 | struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; | 78 | struct acpi_table_header *dsdt = NULL; |
80 | ssize_t res; | 79 | ssize_t res; |
81 | 80 | ||
82 | 81 | ||
83 | status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); | 82 | status = acpi_get_table(ACPI_SIG_DSDT, 1, &dsdt); |
84 | if (ACPI_FAILURE(status)) | 83 | if (ACPI_FAILURE(status)) |
85 | return -ENODEV; | 84 | return -ENODEV; |
86 | 85 | ||
87 | res = simple_read_from_buffer(buffer, count, ppos, | 86 | res = simple_read_from_buffer(buffer, count, ppos, |
88 | dsdt.pointer, dsdt.length); | 87 | dsdt, dsdt->length); |
89 | kfree(dsdt.pointer); | ||
90 | 88 | ||
91 | return res; | 89 | return res; |
92 | } | 90 | } |
@@ -103,17 +101,16 @@ acpi_system_read_fadt(struct file *file, | |||
103 | char __user * buffer, size_t count, loff_t * ppos) | 101 | char __user * buffer, size_t count, loff_t * ppos) |
104 | { | 102 | { |
105 | acpi_status status = AE_OK; | 103 | acpi_status status = AE_OK; |
106 | struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL }; | 104 | struct acpi_table_header *fadt = NULL; |
107 | ssize_t res; | 105 | ssize_t res; |
108 | 106 | ||
109 | 107 | ||
110 | status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt); | 108 | status = acpi_get_table(ACPI_SIG_FADT, 1, &fadt); |
111 | if (ACPI_FAILURE(status)) | 109 | if (ACPI_FAILURE(status)) |
112 | return -ENODEV; | 110 | return -ENODEV; |
113 | 111 | ||
114 | res = simple_read_from_buffer(buffer, count, ppos, | 112 | res = simple_read_from_buffer(buffer, count, ppos, |
115 | fadt.pointer, fadt.length); | 113 | fadt, fadt->length); |
116 | kfree(fadt.pointer); | ||
117 | 114 | ||
118 | return res; | 115 | return res; |
119 | } | 116 | } |
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index ffa30c9fccbf..5bb143151169 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -74,6 +74,7 @@ static unsigned long sdt_pa; /* Physical Address */ | |||
74 | static unsigned long sdt_count; /* Table count */ | 74 | static unsigned long sdt_count; /* Table count */ |
75 | 75 | ||
76 | static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata; | 76 | static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata; |
77 | static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initdata; | ||
77 | 78 | ||
78 | void acpi_table_print(struct acpi_table_header *header, unsigned long phys_addr) | 79 | void acpi_table_print(struct acpi_table_header *header, unsigned long phys_addr) |
79 | { | 80 | { |
@@ -284,12 +285,12 @@ acpi_get_table_header_early(enum acpi_table_id id, | |||
284 | struct fadt_descriptor *fadt = | 285 | struct fadt_descriptor *fadt = |
285 | (struct fadt_descriptor *)*header; | 286 | (struct fadt_descriptor *)*header; |
286 | 287 | ||
287 | if (fadt->revision == 3 && fadt->Xdsdt) { | 288 | if (fadt->header.revision == 3 && fadt->Xdsdt) { |
288 | *header = (void *)__acpi_map_table(fadt->Xdsdt, | 289 | *header = (void *)__acpi_map_table(fadt->Xdsdt, |
289 | sizeof(struct | 290 | sizeof(struct |
290 | acpi_table_header)); | 291 | acpi_table_header)); |
291 | } else if (fadt->V1_dsdt) { | 292 | } else if (fadt->dsdt) { |
292 | *header = (void *)__acpi_map_table(fadt->V1_dsdt, | 293 | *header = (void *)__acpi_map_table(fadt->dsdt, |
293 | sizeof(struct | 294 | sizeof(struct |
294 | acpi_table_header)); | 295 | acpi_table_header)); |
295 | } else | 296 | } else |
@@ -410,12 +411,11 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp) | |||
410 | 411 | ||
411 | /* First check XSDT (but only on ACPI 2.0-compatible systems) */ | 412 | /* First check XSDT (but only on ACPI 2.0-compatible systems) */ |
412 | 413 | ||
413 | if ((rsdp->revision >= 2) && | 414 | if ((rsdp->revision >= 2) && rsdp->xsdt_physical_address) { |
414 | (((struct acpi20_table_rsdp *)rsdp)->xsdt_address)) { | ||
415 | 415 | ||
416 | struct acpi_table_xsdt *mapped_xsdt = NULL; | 416 | struct acpi_table_xsdt *mapped_xsdt = NULL; |
417 | 417 | ||
418 | sdt_pa = ((struct acpi20_table_rsdp *)rsdp)->xsdt_address; | 418 | sdt_pa = rsdp->xsdt_physical_address; |
419 | 419 | ||
420 | /* map in just the header */ | 420 | /* map in just the header */ |
421 | header = (struct acpi_table_header *) | 421 | header = (struct acpi_table_header *) |
@@ -457,16 +457,16 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp) | |||
457 | } | 457 | } |
458 | 458 | ||
459 | for (i = 0; i < sdt_count; i++) | 459 | for (i = 0; i < sdt_count; i++) |
460 | sdt_entry[i].pa = (unsigned long)mapped_xsdt->entry[i]; | 460 | sdt_entry[i].pa = (unsigned long)mapped_xsdt->table_offset_entry[i]; |
461 | } | 461 | } |
462 | 462 | ||
463 | /* Then check RSDT */ | 463 | /* Then check RSDT */ |
464 | 464 | ||
465 | else if (rsdp->rsdt_address) { | 465 | else if (rsdp->rsdt_physical_address) { |
466 | 466 | ||
467 | struct acpi_table_rsdt *mapped_rsdt = NULL; | 467 | struct acpi_table_rsdt *mapped_rsdt = NULL; |
468 | 468 | ||
469 | sdt_pa = rsdp->rsdt_address; | 469 | sdt_pa = rsdp->rsdt_physical_address; |
470 | 470 | ||
471 | /* map in just the header */ | 471 | /* map in just the header */ |
472 | header = (struct acpi_table_header *) | 472 | header = (struct acpi_table_header *) |
@@ -507,7 +507,7 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp) | |||
507 | } | 507 | } |
508 | 508 | ||
509 | for (i = 0; i < sdt_count; i++) | 509 | for (i = 0; i < sdt_count; i++) |
510 | sdt_entry[i].pa = (unsigned long)mapped_rsdt->entry[i]; | 510 | sdt_entry[i].pa = (unsigned long)mapped_rsdt->table_offset_entry[i]; |
511 | } | 511 | } |
512 | 512 | ||
513 | else { | 513 | else { |
@@ -599,13 +599,10 @@ int __init acpi_table_init(void) | |||
599 | 599 | ||
600 | if (rsdp->revision < 2) | 600 | if (rsdp->revision < 2) |
601 | result = | 601 | result = |
602 | acpi_table_compute_checksum(rsdp, | 602 | acpi_table_compute_checksum(rsdp, ACPI_RSDP_REV0_SIZE); |
603 | sizeof(struct acpi_table_rsdp)); | ||
604 | else | 603 | else |
605 | result = | 604 | result = |
606 | acpi_table_compute_checksum(rsdp, | 605 | acpi_table_compute_checksum(rsdp, rsdp->length); |
607 | ((struct acpi20_table_rsdp *) | ||
608 | rsdp)->length); | ||
609 | 606 | ||
610 | if (result) { | 607 | if (result) { |
611 | printk(KERN_WARNING " >>> ERROR: Invalid checksum\n"); | 608 | printk(KERN_WARNING " >>> ERROR: Invalid checksum\n"); |
@@ -617,5 +614,7 @@ int __init acpi_table_init(void) | |||
617 | if (acpi_table_get_sdt(rsdp)) | 614 | if (acpi_table_get_sdt(rsdp)) |
618 | return -ENODEV; | 615 | return -ENODEV; |
619 | 616 | ||
617 | acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); | ||
618 | |||
620 | return 0; | 619 | return 0; |
621 | } | 620 | } |
diff --git a/drivers/acpi/tables/Makefile b/drivers/acpi/tables/Makefile index aa4c69594d97..f08f1f310274 100644 --- a/drivers/acpi/tables/Makefile +++ b/drivers/acpi/tables/Makefile | |||
@@ -2,7 +2,6 @@ | |||
2 | # Makefile for all Linux ACPI interpreter subdirectories | 2 | # Makefile for all Linux ACPI interpreter subdirectories |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := tbconvrt.o tbget.o tbrsdt.o tbxface.o \ | 5 | obj-y := tbxface.o tbinstal.o tbutils.o tbfind.o |
6 | tbgetall.o tbinstal.o tbutils.o tbxfroot.o | ||
7 | 6 | ||
8 | EXTRA_CFLAGS += $(ACPI_CFLAGS) | 7 | EXTRA_CFLAGS += $(ACPI_CFLAGS) |
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 8e44f83a64e2..6d13737f3f89 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c | |||
@@ -545,7 +545,7 @@ acpi_tb_get_root_table_entry(u8 * table_entry, | |||
545 | * | 545 | * |
546 | ******************************************************************************/ | 546 | ******************************************************************************/ |
547 | 547 | ||
548 | acpi_status | 548 | acpi_status __init |
549 | acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) | 549 | acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) |
550 | { | 550 | { |
551 | struct acpi_table_rsdp *rsdp; | 551 | struct acpi_table_rsdp *rsdp; |
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 13e8d6626dd4..94544a60640d 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -78,7 +78,7 @@ static acpi_status acpi_tb_load_namespace(void); | |||
78 | * | 78 | * |
79 | ******************************************************************************/ | 79 | ******************************************************************************/ |
80 | 80 | ||
81 | acpi_status | 81 | acpi_status __init |
82 | acpi_initialize_tables(struct acpi_table_desc *initial_table_array, | 82 | acpi_initialize_tables(struct acpi_table_desc *initial_table_array, |
83 | u32 initial_table_count, u8 allow_resize) | 83 | u32 initial_table_count, u8 allow_resize) |
84 | { | 84 | { |
@@ -132,8 +132,6 @@ acpi_initialize_tables(struct acpi_table_desc *initial_table_array, | |||
132 | return_ACPI_STATUS(status); | 132 | return_ACPI_STATUS(status); |
133 | } | 133 | } |
134 | 134 | ||
135 | ACPI_EXPORT_SYMBOL(acpi_initialize_tables) | ||
136 | |||
137 | /******************************************************************************* | 135 | /******************************************************************************* |
138 | * | 136 | * |
139 | * FUNCTION: acpi_reallocate_root_table | 137 | * FUNCTION: acpi_reallocate_root_table |
@@ -365,6 +363,10 @@ acpi_get_table(char *signature, | |||
365 | *out_table = acpi_gbl_root_table_list.tables[i].pointer; | 363 | *out_table = acpi_gbl_root_table_list.tables[i].pointer; |
366 | } | 364 | } |
367 | 365 | ||
366 | if (!acpi_gbl_permanent_mmap) { | ||
367 | acpi_gbl_root_table_list.tables[i].pointer = 0; | ||
368 | } | ||
369 | |||
368 | return (status); | 370 | return (status); |
369 | } | 371 | } |
370 | 372 | ||
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 82d42b82594a..bd0fe7c6b384 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -147,6 +147,8 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE); | |||
147 | */ | 147 | */ |
148 | ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list; | 148 | ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list; |
149 | ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT; | 149 | ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT; |
150 | #define acpi_fadt acpi_gbl_FADT | ||
151 | extern acpi_native_uint acpi_gbl_permanent_mmap; | ||
150 | 152 | ||
151 | /* | 153 | /* |
152 | * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is | 154 | * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index fdd10953b2b6..aef0e55253a9 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -59,7 +59,6 @@ acpi_evaluate_reference(acpi_handle handle, | |||
59 | 59 | ||
60 | #define ACPI_BUS_FILE_ROOT "acpi" | 60 | #define ACPI_BUS_FILE_ROOT "acpi" |
61 | extern struct proc_dir_entry *acpi_root_dir; | 61 | extern struct proc_dir_entry *acpi_root_dir; |
62 | extern struct fadt_descriptor acpi_fadt; | ||
63 | 62 | ||
64 | enum acpi_bus_removal_type { | 63 | enum acpi_bus_removal_type { |
65 | ACPI_BUS_REMOVAL_NORMAL = 0, | 64 | ACPI_BUS_REMOVAL_NORMAL = 0, |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index aed49a5d5838..6f63b3bbc3fb 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -236,6 +236,9 @@ struct acpi_table_fadt { | |||
236 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ | 236 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ |
237 | }; | 237 | }; |
238 | 238 | ||
239 | #define fadt_descriptor acpi_table_fadt | ||
240 | #define sci_int sci_interrupt | ||
241 | |||
239 | /* FADT flags */ | 242 | /* FADT flags */ |
240 | 243 | ||
241 | #define ACPI_FADT_WBINVD (1) /* 00: The wbinvd instruction works properly */ | 244 | #define ACPI_FADT_WBINVD (1) /* 00: The wbinvd instruction works properly */ |
@@ -289,6 +292,8 @@ enum acpi_prefered_pm_profiles { | |||
289 | /* | 292 | /* |
290 | * Get the remaining ACPI tables | 293 | * Get the remaining ACPI tables |
291 | */ | 294 | */ |
295 | /* | ||
296 | Don't include any new tables definitions for now. | ||
292 | #include <acpi/actbl1.h> | 297 | #include <acpi/actbl1.h> |
293 | 298 | */ | |
294 | #endif /* __ACTBL_H__ */ | 299 | #endif /* __ACTBL_H__ */ |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h deleted file mode 100644 index 67efe6cad27b..000000000000 --- a/include/acpi/actbl2.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: actbl2.h - ACPI Specification Revision 2.0 Tables | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2006, R. Byron Moore | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #ifndef __ACTBL2_H__ | ||
45 | #define __ACTBL2_H__ | ||
46 | |||
47 | /* Code moved to both actbl.h and actbl1.h */ | ||
48 | |||
49 | #endif /* __ACTBL2_H__ */ | ||
diff --git a/include/acpi/actbl71.h b/include/acpi/actbl71.h deleted file mode 100644 index 10ac05bb36bc..000000000000 --- a/include/acpi/actbl71.h +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: actbl71.h - IA-64 Extensions to the ACPI Spec Rev. 0.71 | ||
4 | * This file includes tables specific to this | ||
5 | * specification revision. | ||
6 | * | ||
7 | *****************************************************************************/ | ||
8 | |||
9 | /* | ||
10 | * Copyright (C) 2000 - 2003, R. Byron Moore | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | ||
26 | |||
27 | #ifndef __ACTBL71_H__ | ||
28 | #define __ACTBL71_H__ | ||
29 | |||
30 | /* 0.71 FADT address_space data item bitmasks defines */ | ||
31 | /* If the associated bit is zero then it is in memory space else in io space */ | ||
32 | |||
33 | #define SMI_CMD_ADDRESS_SPACE 0x01 | ||
34 | #define PM1_BLK_ADDRESS_SPACE 0x02 | ||
35 | #define PM2_CNT_BLK_ADDRESS_SPACE 0x04 | ||
36 | #define PM_TMR_BLK_ADDRESS_SPACE 0x08 | ||
37 | #define GPE0_BLK_ADDRESS_SPACE 0x10 | ||
38 | #define GPE1_BLK_ADDRESS_SPACE 0x20 | ||
39 | |||
40 | /* Only for clarity in declarations */ | ||
41 | |||
42 | typedef u64 IO_ADDRESS; | ||
43 | |||
44 | #pragma pack(1) | ||
45 | struct { /* Root System Descriptor Pointer */ | ||
46 | NATIVE_CHAR signature[8]; /* contains "RSD PTR " */ | ||
47 | u8 checksum; /* to make sum of struct == 0 */ | ||
48 | NATIVE_CHAR oem_id[6]; /* OEM identification */ | ||
49 | u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */ | ||
50 | u64 rsdt_physical_address; /* 64-bit physical address of RSDT */ | ||
51 | }; | ||
52 | |||
53 | /*****************************************/ | ||
54 | /* IA64 Extensions to ACPI Spec Rev 0.71 */ | ||
55 | /* for the Root System Description Table */ | ||
56 | /*****************************************/ | ||
57 | struct { | ||
58 | struct acpi_table_header header; /* Table header */ | ||
59 | u32 reserved_pad; /* IA64 alignment, must be 0 */ | ||
60 | u64 table_offset_entry[1]; /* Array of pointers to other */ | ||
61 | /* tables' headers */ | ||
62 | }; | ||
63 | |||
64 | /*******************************************/ | ||
65 | /* IA64 Extensions to ACPI Spec Rev 0.71 */ | ||
66 | /* for the Firmware ACPI Control Structure */ | ||
67 | /*******************************************/ | ||
68 | struct { | ||
69 | NATIVE_CHAR signature[4]; /* signature "FACS" */ | ||
70 | u32 length; /* length of structure, in bytes */ | ||
71 | u32 hardware_signature; /* hardware configuration signature */ | ||
72 | u32 reserved4; /* must be 0 */ | ||
73 | u64 firmware_waking_vector; /* ACPI OS waking vector */ | ||
74 | u64 global_lock; /* Global Lock */ | ||
75 | u32 S4bios_f:1; /* Indicates if S4BIOS support is present */ | ||
76 | u32 reserved1:31; /* must be 0 */ | ||
77 | u8 reserved3[28]; /* reserved - must be zero */ | ||
78 | }; | ||
79 | |||
80 | /******************************************/ | ||
81 | /* IA64 Extensions to ACPI Spec Rev 0.71 */ | ||
82 | /* for the Fixed ACPI Description Table */ | ||
83 | /******************************************/ | ||
84 | struct { | ||
85 | struct acpi_table_header header; /* table header */ | ||
86 | u32 reserved_pad; /* IA64 alignment, must be 0 */ | ||
87 | u64 firmware_ctrl; /* 64-bit Physical address of FACS */ | ||
88 | u64 dsdt; /* 64-bit Physical address of DSDT */ | ||
89 | u8 model; /* System Interrupt Model */ | ||
90 | u8 address_space; /* Address Space Bitmask */ | ||
91 | u16 sci_int; /* System vector of SCI interrupt */ | ||
92 | u8 acpi_enable; /* value to write to smi_cmd to enable ACPI */ | ||
93 | u8 acpi_disable; /* value to write to smi_cmd to disable ACPI */ | ||
94 | u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ | ||
95 | u8 reserved2; /* reserved - must be zero */ | ||
96 | u64 smi_cmd; /* Port address of SMI command port */ | ||
97 | u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */ | ||
98 | u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */ | ||
99 | u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ | ||
100 | u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ | ||
101 | u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ | ||
102 | u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ | ||
103 | u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ | ||
104 | u64 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ | ||
105 | u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ | ||
106 | u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ | ||
107 | u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ | ||
108 | u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ | ||
109 | u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ | ||
110 | u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ | ||
111 | u8 gpe1_base; /* offset in gpe model where gpe1 events start */ | ||
112 | u8 reserved3; /* reserved */ | ||
113 | u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */ | ||
114 | u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */ | ||
115 | u8 day_alrm; /* index to day-of-month alarm in RTC CMOS RAM */ | ||
116 | u8 mon_alrm; /* index to month-of-year alarm in RTC CMOS RAM */ | ||
117 | u8 century; /* index to century in RTC CMOS RAM */ | ||
118 | u8 reserved4; /* reserved */ | ||
119 | u32 flush_cash:1; /* PAL_FLUSH_CACHE is correctly supported */ | ||
120 | u32 reserved5:1; /* reserved - must be zero */ | ||
121 | u32 proc_c1:1; /* all processors support C1 state */ | ||
122 | u32 plvl2_up:1; /* C2 state works on MP system */ | ||
123 | u32 pwr_button:1; /* Power button is handled as a generic feature */ | ||
124 | u32 sleep_button:1; /* Sleep button is handled as a generic feature, or not present */ | ||
125 | u32 fixed_rTC:1; /* RTC wakeup stat not in fixed register space */ | ||
126 | u32 rtcs4:1; /* RTC wakeup stat not possible from S4 */ | ||
127 | u32 tmr_val_ext:1; /* tmr_val is 32 bits */ | ||
128 | u32 dock_cap:1; /* Supports Docking */ | ||
129 | u32 reserved6:22; /* reserved - must be zero */ | ||
130 | }; | ||
131 | |||
132 | #pragma pack() | ||
133 | |||
134 | #endif /* __ACTBL71_H__ */ | ||
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 7cfad93edf10..0fb0c016db73 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -59,11 +59,11 @@ | |||
59 | int __acpi_acquire_global_lock(unsigned int *lock); | 59 | int __acpi_acquire_global_lock(unsigned int *lock); |
60 | int __acpi_release_global_lock(unsigned int *lock); | 60 | int __acpi_release_global_lock(unsigned int *lock); |
61 | 61 | ||
62 | #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ | 62 | #define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \ |
63 | ((Acq) = __acpi_acquire_global_lock((unsigned int *) GLptr)) | 63 | ((Acq) = __acpi_acquire_global_lock(&facs->global_lock)) |
64 | 64 | ||
65 | #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ | 65 | #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \ |
66 | ((Acq) = __acpi_release_global_lock((unsigned int *) GLptr)) | 66 | ((Acq) = __acpi_release_global_lock(&facs->global_lock)) |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Math helper asm macros | 69 | * Math helper asm macros |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 09a5dd0e44a8..dba34d5a0920 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -82,11 +82,11 @@ ia64_acpi_release_global_lock (unsigned int *lock) | |||
82 | return old & 0x1; | 82 | return old & 0x1; |
83 | } | 83 | } |
84 | 84 | ||
85 | #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ | 85 | #define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \ |
86 | ((Acq) = ia64_acpi_acquire_global_lock((unsigned int *) GLptr)) | 86 | ((Acq) = ia64_acpi_acquire_global_lock(&facs->global_lock)) |
87 | 87 | ||
88 | #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ | 88 | #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \ |
89 | ((Acq) = ia64_acpi_release_global_lock((unsigned int *) GLptr)) | 89 | ((Acq) = ia64_acpi_release_global_lock(&facs->global_lock)) |
90 | 90 | ||
91 | #define acpi_disabled 0 /* ACPI always enabled on IA64 */ | 91 | #define acpi_disabled 0 /* ACPI always enabled on IA64 */ |
92 | #define acpi_noirq 0 /* ACPI always enabled on IA64 */ | 92 | #define acpi_noirq 0 /* ACPI always enabled on IA64 */ |
diff --git a/include/asm-ia64/sn/acpi.h b/include/asm-ia64/sn/acpi.h deleted file mode 100644 index 2850a7ef5e71..000000000000 --- a/include/asm-ia64/sn/acpi.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_IA64_SN_ACPI_H | ||
10 | #define _ASM_IA64_SN_ACPI_H | ||
11 | |||
12 | #include "acpi/acglobal.h" | ||
13 | |||
14 | #define SN_ACPI_BASE_SUPPORT() (acpi_gbl_DSDT->oem_revision >= 0x20101) | ||
15 | |||
16 | #endif /* _ASM_IA64_SN_ACPI_H */ | ||
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index 6b6fc6f8be7e..49f92f3cc32d 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
@@ -57,11 +57,11 @@ | |||
57 | int __acpi_acquire_global_lock(unsigned int *lock); | 57 | int __acpi_acquire_global_lock(unsigned int *lock); |
58 | int __acpi_release_global_lock(unsigned int *lock); | 58 | int __acpi_release_global_lock(unsigned int *lock); |
59 | 59 | ||
60 | #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ | 60 | #define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \ |
61 | ((Acq) = __acpi_acquire_global_lock((unsigned int *) GLptr)) | 61 | ((Acq) = __acpi_acquire_global_lock(&facs->global_lock)) |
62 | 62 | ||
63 | #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ | 63 | #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \ |
64 | ((Acq) = __acpi_release_global_lock((unsigned int *) GLptr)) | 64 | ((Acq) = __acpi_release_global_lock(&facs->global_lock)) |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Math helper asm macros | 67 | * Math helper asm macros |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 91f1f2363870..b3e8a268f6d6 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -53,57 +53,11 @@ enum acpi_irq_model_id { | |||
53 | 53 | ||
54 | extern enum acpi_irq_model_id acpi_irq_model; | 54 | extern enum acpi_irq_model_id acpi_irq_model; |
55 | 55 | ||
56 | |||
57 | /* Root System Description Pointer (RSDP) */ | ||
58 | |||
59 | struct acpi_table_rsdp { | ||
60 | char signature[8]; | ||
61 | u8 checksum; | ||
62 | char oem_id[6]; | ||
63 | u8 revision; | ||
64 | u32 rsdt_address; | ||
65 | } __attribute__ ((packed)); | ||
66 | |||
67 | struct acpi20_table_rsdp { | ||
68 | char signature[8]; | ||
69 | u8 checksum; | ||
70 | char oem_id[6]; | ||
71 | u8 revision; | ||
72 | u32 rsdt_address; | ||
73 | u32 length; | ||
74 | u64 xsdt_address; | ||
75 | u8 ext_checksum; | ||
76 | u8 reserved[3]; | ||
77 | } __attribute__ ((packed)); | ||
78 | |||
79 | typedef struct { | 56 | typedef struct { |
80 | u8 type; | 57 | u8 type; |
81 | u8 length; | 58 | u8 length; |
82 | } __attribute__ ((packed)) acpi_table_entry_header; | 59 | } __attribute__ ((packed)) acpi_table_entry_header; |
83 | 60 | ||
84 | /* Root System Description Table (RSDT) */ | ||
85 | |||
86 | struct acpi_table_rsdt { | ||
87 | struct acpi_table_header header; | ||
88 | u32 entry[8]; | ||
89 | } __attribute__ ((packed)); | ||
90 | |||
91 | /* Extended System Description Table (XSDT) */ | ||
92 | |||
93 | struct acpi_table_xsdt { | ||
94 | struct acpi_table_header header; | ||
95 | u64 entry[1]; | ||
96 | } __attribute__ ((packed)); | ||
97 | |||
98 | /* Fixed ACPI Description Table (FADT) */ | ||
99 | |||
100 | struct acpi_table_fadt { | ||
101 | struct acpi_table_header header; | ||
102 | u32 facs_addr; | ||
103 | u32 dsdt_addr; | ||
104 | /* ... */ | ||
105 | } __attribute__ ((packed)); | ||
106 | |||
107 | /* Multiple APIC Description Table (MADT) */ | 61 | /* Multiple APIC Description Table (MADT) */ |
108 | 62 | ||
109 | struct acpi_table_madt { | 63 | struct acpi_table_madt { |