summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/dinar
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/amd/dinar')
-rw-r--r--src/mainboard/amd/dinar/fadt.c20
-rw-r--r--src/mainboard/amd/dinar/mptable.c4
-rw-r--r--src/mainboard/amd/dinar/rd890_cfg.c2
3 files changed, 17 insertions, 9 deletions
diff --git a/src/mainboard/amd/dinar/fadt.c b/src/mainboard/amd/dinar/fadt.c
index 51379643e7..7553852966 100644
--- a/src/mainboard/amd/dinar/fadt.c
+++ b/src/mainboard/amd/dinar/fadt.c
@@ -48,8 +48,16 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
memcpy(header->asl_compiler_id, ASLC, 4);
header->asl_compiler_revision = 0;
- fadt->firmware_ctrl = (u32) facs;
- fadt->dsdt = (u32) dsdt;
+ if ((uintptr_t)facs > 0xffffffff)
+ printk(BIOS_DEBUG, "ACPI: FACS lives above 4G\n");
+ else
+ fadt->firmware_ctrl = (uintptr_t)facs;
+
+ if ((uintptr_t)dsdt > 0xffffffff)
+ printk(BIOS_DEBUG, "ACPI: DSDT lives above 4G\n");
+ else
+ fadt->dsdt = (uintptr_t)dsdt;
+
/* 3=Workstation,4=Enterprise Server, 7=Performance Server */
fadt->preferred_pm_profile = 0x03;
fadt->sci_int = 9;
@@ -102,10 +110,10 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
fadt->reset_reg.addrh = 0x0;
fadt->reset_value = 6;
- fadt->x_firmware_ctl_l = (u32) facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (u32) dsdt;
- fadt->x_dsdt_h = 0;
+ fadt->x_firmware_ctl_l = ((uintptr_t)facs) & 0xffffffff;
+ fadt->x_firmware_ctl_h = ((uint64_t)(uintptr_t)facs) >> 32;
+ fadt->x_dsdt_l = ((uintptr_t)dsdt) & 0xffffffff;
+ fadt->x_dsdt_h = ((uint64_t)(uintptr_t)dsdt) >> 32;
fadt->x_pm1a_evt_blk.space_id = 1;
fadt->x_pm1a_evt_blk.bit_width = 32;
diff --git a/src/mainboard/amd/dinar/mptable.c b/src/mainboard/amd/dinar/mptable.c
index 172c49794e..aeefe5463e 100644
--- a/src/mainboard/amd/dinar/mptable.c
+++ b/src/mainboard/amd/dinar/mptable.c
@@ -59,7 +59,7 @@ static void *smp_write_config_table(void *v)
dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
if (dev) {
/* Set sb700 IOAPIC ID */
- dword = (u8 *)(pci_read_config32(dev, 0x74) & 0xfffffff0);
+ dword = (u8 *)(uintptr_t)(pci_read_config32(dev, 0x74) & 0xfffffff0);
smp_write_ioapic(mc, apicid_sb700, 0x20, dword);
/*
@@ -80,7 +80,7 @@ static void *smp_write_config_table(void *v)
dev = dev_find_slot(0, PCI_DEVFN(0, 0));
if (dev) {
pci_write_config32(dev, 0xF8, 0x1);
- dword = (u8 *)(pci_read_config32(dev, 0xFC) & 0xfffffff0);
+ dword = (u8 *)(uintptr_t)(pci_read_config32(dev, 0xFC) & 0xfffffff0);
smp_write_ioapic(mc, apicid_rd890, 0x20, dword);
}
diff --git a/src/mainboard/amd/dinar/rd890_cfg.c b/src/mainboard/amd/dinar/rd890_cfg.c
index c90f9f00bb..06b335f134 100644
--- a/src/mainboard/amd/dinar/rd890_cfg.c
+++ b/src/mainboard/amd/dinar/rd890_cfg.c
@@ -109,7 +109,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr)
* @param[in] *config Northbridge configuration structure pointer.
*
*/
-static u32 rd890_callout_entry(u32 func, u32 data, void *config)
+static u32 rd890_callout_entry(u32 func, uintptr_t data, void *config)
{
u32 ret = 0;
#ifndef __PRE_RAM__