summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-04-09 03:41:23 +0000
committerMyles Watson <mylesgw@gmail.com>2010-04-09 03:41:23 +0000
commitae60855f918dfc7f3f560528296fdd2d4b4ca791 (patch)
tree03d6d96f688b0c70756520413ee88cca59b2f122 /src/northbridge
parente64b63750f029dac66902dee8cf6a7cf82ba44a3 (diff)
downloadcoreboot-ae60855f918dfc7f3f560528296fdd2d4b4ca791.tar.xz
Copy acpi blobs in two parts to make sure gcc does the right thing.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5384 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/amdfam10/amdfam10_acpi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/northbridge/amd/amdfam10/amdfam10_acpi.c b/src/northbridge/amd/amdfam10/amdfam10_acpi.c
index 34d5db5511..ba4c36bee4 100644
--- a/src/northbridge/amd/amdfam10/amdfam10_acpi.c
+++ b/src/northbridge/amd/amdfam10/amdfam10_acpi.c
@@ -268,7 +268,7 @@ void update_ssdt(void *ssdt)
}
-void update_sspr(void *sspr, u32 nodeid, u32 cpuindex)
+static void update_sspr(void *sspr, u32 nodeid, u32 cpuindex)
{
u8 *CPU;
u8 *CPUIN;
@@ -291,7 +291,7 @@ void update_sspr(void *sspr, u32 nodeid, u32 cpuindex)
CONTROL = sspr + 0x8d;
STATUS = sspr + 0x8f;
- sprintf(CPU, "%02x", (u8)cpuindex);
+ sprintf(CPU, "%02x", (char)cpuindex);
*CPUIN = (u8) cpuindex;
for(i=0;i<sysconf.p_state_num;i++) {
@@ -305,11 +305,11 @@ void update_sspr(void *sspr, u32 nodeid, u32 cpuindex)
}
}
-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;
+extern const unsigned char AmlCode_sspr5[];
+extern const unsigned char AmlCode_sspr4[];
+extern const unsigned char AmlCode_sspr3[];
+extern const unsigned char AmlCode_sspr2[];
+extern const unsigned char 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,7 +321,7 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current)
if(!sysconf.p_state_num) return current;
- acpi_header_t *AmlCode_sspr;
+ void *AmlCode_sspr;
switch(sysconf.p_state_num) {
case 1: AmlCode_sspr = &AmlCode_sspr1; break;
case 2: AmlCode_sspr = &AmlCode_sspr2; break;
@@ -342,8 +342,9 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdp_t *rsdp, unsigned long current)
current = ( current + 0x0f) & -0x10;
ssdt = (acpi_header_t *)current;
- current += AmlCode_sspr->length;
- memcpy((void *)ssdt, AmlCode_sspr, AmlCode_sspr->length);
+ memcpy(ssdt, AmlCode_sspr, sizeof(acpi_header_t));
+ current += ssdt->length;
+ memcpy(ssdt, AmlCode_sspr, ssdt->length);
update_sspr((void*)ssdt,cpu->path.apic.node_id, cpu_index);
/* recalculate checksum */
ssdt->checksum = 0;