diff options
Diffstat (limited to 'src/northbridge/amd/amdfam10/amdfam10_acpi.c')
-rw-r--r-- | src/northbridge/amd/amdfam10/amdfam10_acpi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/northbridge/amd/amdfam10/amdfam10_acpi.c b/src/northbridge/amd/amdfam10/amdfam10_acpi.c index bfc2307aa8..9f6bdaf531 100644 --- a/src/northbridge/amd/amdfam10/amdfam10_acpi.c +++ b/src/northbridge/amd/amdfam10/amdfam10_acpi.c @@ -305,11 +305,11 @@ void update_sspr(void *sspr, u32 nodeid, u32 cpuindex) } } -extern unsigned char AmlCode_sspr5[]; -extern unsigned char AmlCode_sspr4[]; -extern unsigned char AmlCode_sspr3[]; -extern unsigned char AmlCode_sspr2[]; -extern unsigned char AmlCode_sspr1[]; +extern const acpi_header_t AmlCode_sspr5; +extern const acpi_header_t AmlCode_sspr4; +extern const acpi_header_t AmlCode_sspr3; +extern const acpi_header_t AmlCode_sspr2; +extern const acpi_header_t AmlCode_sspr1; /* fixme: find one good way for different p_state_num */ unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current) @@ -321,13 +321,13 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current) if(!sysconf.p_state_num) return current; - u8 *AmlCode_sspr; + acpi_header_t *AmlCode_sspr; switch(sysconf.p_state_num) { - case 1: AmlCode_sspr = AmlCode_sspr1; break; - case 2: AmlCode_sspr = AmlCode_sspr2; break; - case 3: AmlCode_sspr = AmlCode_sspr3; break; - case 4: AmlCode_sspr = AmlCode_sspr4; break; - default: AmlCode_sspr = AmlCode_sspr5; break; + case 1: AmlCode_sspr = &AmlCode_sspr1; break; + case 2: AmlCode_sspr = &AmlCode_sspr2; break; + case 3: AmlCode_sspr = &AmlCode_sspr3; break; + case 4: AmlCode_sspr = &AmlCode_sspr4; break; + default: AmlCode_sspr = &AmlCode_sspr5; break; } for(cpu = all_devices; cpu; cpu = cpu->next) { @@ -342,8 +342,8 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current) current = ( current + 0x0f) & -0x10; ssdt = (acpi_header_t *)current; - current += ((acpi_header_t *)AmlCode_sspr)->length; - memcpy((void *)ssdt, (void *)AmlCode_sspr, ((acpi_header_t *)AmlCode_sspr)->length); + current += AmlCode_sspr->length; + memcpy((void *)ssdt, AmlCode_sspr, AmlCode_sspr->length); update_sspr((void*)ssdt,cpu->path.apic.node_id, cpu_index); /* recalculate checksum */ ssdt->checksum = 0; |