AGESA: Trace execution with AGESAWRAPPER()
Implement logging just once to have uniform output. Change-Id: I8db694a3bf6b1af459bdf98f7acb99edf4dd07f7 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6180 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
06ff7268f6
commit
7b23ae0e89
|
@ -22,19 +22,16 @@
|
|||
#include <console/console.h>
|
||||
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
|
||||
void get_bus_conf(void);
|
||||
|
||||
static void agesawrapper_post_device(void *unused)
|
||||
{
|
||||
u32 status;
|
||||
if (acpi_is_wakeup_s3())
|
||||
return;
|
||||
|
||||
status = agesawrapper_amdinitlate();
|
||||
if (status) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status);
|
||||
}
|
||||
AGESAWRAPPER(amdinitlate);
|
||||
|
||||
/* Preparation for write_tables(). */
|
||||
get_bus_conf();
|
||||
|
@ -42,10 +39,7 @@ static void agesawrapper_post_device(void *unused)
|
|||
if (!acpi_s3_resume_allowed())
|
||||
return;
|
||||
|
||||
status = agesawrapper_amdS3Save();
|
||||
if (status) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3save failed: %x \n", status);
|
||||
}
|
||||
AGESAWRAPPER(amdS3Save);
|
||||
}
|
||||
|
||||
BOOT_STATE_INIT_ENTRIES(agesa_bscb) = {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <console/loglevel.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include "superio/smsc/sch4037/sch4037_early_init.c"
|
||||
#include "superio/smsc/sio1036/sio1036_early_init.c"
|
||||
|
@ -67,12 +68,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
}
|
||||
|
||||
post_code(0x32);
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
/* Halt if there was a built in self test failure */
|
||||
post_code(0x33);
|
||||
|
@ -89,20 +85,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
}
|
||||
|
||||
post_code(0x35);
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x36);
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x37);
|
||||
nb_Poweron_Init();
|
||||
|
@ -111,20 +97,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
|
||||
|
||||
post_code(0x39);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
|
||||
post_code(0x43);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/smsc/kbc1100/kbc1100.h>
|
||||
#include "cpu/x86/lapic.h"
|
||||
|
@ -74,44 +75,19 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
post_code(0x50);
|
||||
copy_and_run();
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <console/loglevel.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include "cpu/x86/lapic.h"
|
||||
#include "southbridge/amd/agesa/hudson/hudson.h"
|
||||
|
@ -50,7 +51,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
outb(0xD2, 0xcd6);
|
||||
outb(0x00, 0xcd7);
|
||||
|
||||
val = agesawrapper_amdinitmmio();
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
hudson_lpc_port80();
|
||||
|
||||
|
@ -76,56 +77,28 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
val = inb(0xcd6);
|
||||
|
||||
post_code(0x37);
|
||||
val = agesawrapper_amdinitreset();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
}
|
||||
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
post_code(0x38);
|
||||
printk(BIOS_DEBUG, "Got past yangtze_early_setup\n");
|
||||
|
||||
post_code(0x39);
|
||||
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n");
|
||||
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitpost\n");
|
||||
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
/* TODO: Disable cache is not ok. */
|
||||
disable_cache_as_ram();
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <console/loglevel.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include "cpu/x86/lapic.h"
|
||||
#include "southbridge/amd/agesa/hudson/hudson.h"
|
||||
|
@ -41,7 +42,7 @@
|
|||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||
{
|
||||
u32 val;
|
||||
val = agesawrapper_amdinitmmio();
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
hudson_lpc_port80();
|
||||
|
||||
|
@ -62,53 +63,24 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
}
|
||||
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
post_code(0x39);
|
||||
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n");
|
||||
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitpost\n");
|
||||
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
disable_cache_as_ram();
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/fintek/common/fintek.h>
|
||||
#include <superio/fintek/f81865f/f81865f.h>
|
||||
|
@ -79,64 +80,29 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x42);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/fintek/common/fintek.h>
|
||||
#include <superio/fintek/f81865f/f81865f.h>
|
||||
|
@ -74,44 +75,19 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
post_code(0x50);
|
||||
copy_and_run();
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <console/loglevel.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include "cpu/x86/lapic.h"
|
||||
#include "southbridge/amd/agesa/hudson/hudson.h"
|
||||
|
@ -46,7 +47,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
u32 val;
|
||||
u8 byte;
|
||||
device_t dev;
|
||||
val = agesawrapper_amdinitmmio();
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
hudson_lpc_port80();
|
||||
//__asm__ volatile ("1: jmp 1b");
|
||||
|
@ -79,53 +80,24 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
}
|
||||
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
post_code(0x39);
|
||||
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n");
|
||||
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitpost\n");
|
||||
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
disable_cache_as_ram();
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <console/loglevel.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/smsc/kbc1100/kbc1100.h>
|
||||
#include "cpu/x86/lapic.h"
|
||||
|
@ -44,12 +45,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
u32 val;
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
post_code(0x30);
|
||||
|
@ -76,28 +72,13 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x36);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x38);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "sb_before_pci_init ");
|
||||
|
@ -105,12 +86,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "passed.\n");
|
||||
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
post_code(0x43);
|
||||
copy_and_run();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include "cpu/x86/lapic.h"
|
||||
#include <sb_cimx.h>
|
||||
|
@ -68,44 +69,19 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
post_code(0x50);
|
||||
copy_and_run();
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/winbond/common/winbond.h>
|
||||
#include <superio/winbond/w83627hf/w83627hf.h>
|
||||
|
@ -74,44 +75,19 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
post_code(0x50);
|
||||
copy_and_run();
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <console/loglevel.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include "cpu/x86/lapic.h"
|
||||
#include "southbridge/amd/agesa/hudson/hudson.h"
|
||||
|
@ -55,7 +56,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
//outb(0xD2, 0xcd6);
|
||||
//outb(0x00, 0xcd7);
|
||||
|
||||
val = agesawrapper_amdinitmmio();
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
hudson_lpc_port80();
|
||||
|
||||
|
@ -100,56 +101,28 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
val = inb(0xcd6);
|
||||
|
||||
post_code(0x37);
|
||||
val = agesawrapper_amdinitreset();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
}
|
||||
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
post_code(0x38);
|
||||
printk(BIOS_DEBUG, "Got past yangtze_early_setup\n");
|
||||
|
||||
post_code(0x39);
|
||||
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n");
|
||||
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitpost\n");
|
||||
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
/* TODO: Disable cache is not ok. */
|
||||
disable_cache_as_ram();
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/cpu.h>
|
||||
|
@ -75,7 +76,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
hudson_lpc_port80();
|
||||
#endif
|
||||
|
||||
val = agesawrapper_amdinitmmio();
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
|
||||
|
@ -127,53 +128,23 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
}
|
||||
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
post_code(0x39);
|
||||
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n");
|
||||
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitpost\n");
|
||||
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
disable_cache_as_ram();
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <cpu/x86/cache.h>
|
||||
#include <sb_cimx.h>
|
||||
|
@ -87,64 +88,29 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x42);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/cpu.h>
|
||||
|
@ -38,7 +39,7 @@
|
|||
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
||||
{
|
||||
u32 val;
|
||||
val = agesawrapper_amdinitmmio();
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
hudson_lpc_port80();
|
||||
|
||||
|
@ -59,53 +60,24 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
}
|
||||
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
post_code(0x39);
|
||||
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n");
|
||||
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitpost\n");
|
||||
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
disable_cache_as_ram();
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/cpu.h>
|
||||
|
@ -95,64 +96,29 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x42);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "AGESA_STATUS: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/smsc/smscsuperio/smscsuperio.h>
|
||||
#include "cpu/x86/lapic.h"
|
||||
|
@ -78,68 +79,33 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
/* Reboots with outb(3,0x92), outb(4,0xcf9) or triple-fault all
|
||||
* hang, looks like DRAM re-init goes wrong, don't know why. */
|
||||
val = AGESAWRAPPER(amdinitpost);
|
||||
if (val == 7) /* fatal, amdinitenv below is going to hang */
|
||||
outb(0x06, 0x0cf9); /* reset system harder instead */
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
|
||||
post_code(0x42);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <cpu/x86/mtrr.h>
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "cpu/x86/bist.h"
|
||||
#include <superio/winbond/common/winbond.h>
|
||||
#include <superio/winbond/w83627dhg/w83627dhg.h>
|
||||
|
@ -79,68 +80,33 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x35);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmmio ");
|
||||
val = agesawrapper_amdinitmmio();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitmmio);
|
||||
|
||||
post_code(0x37);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset ");
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
post_code(0x39);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly ");
|
||||
val = agesawrapper_amdinitearly ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed();
|
||||
if (!s3resume) {
|
||||
post_code(0x40);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost ");
|
||||
val = agesawrapper_amdinitpost ();
|
||||
/* Reboots with outb(3,0x92), outb(4,0xcf9) or triple-fault all
|
||||
* hang, looks like DRAM re-init goes wrong, don't know why. */
|
||||
val = AGESAWRAPPER(amdinitpost);
|
||||
if (val == 7) /* fatal, amdinitenv below is going to hang */
|
||||
outb(0x06, 0x0cf9); /* reset system harder instead */
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
|
||||
post_code(0x42);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv ");
|
||||
val = agesawrapper_amdinitenv ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
|
||||
} else { /* S3 detect */
|
||||
printk(BIOS_INFO, "S3 detected\n");
|
||||
|
||||
post_code(0x60);
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitresume ");
|
||||
val = agesawrapper_amdinitresume();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amdinitresume);
|
||||
|
||||
printk(BIOS_DEBUG, "agesawrapper_amds3laterestore ");
|
||||
val = agesawrapper_amds3laterestore ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
AGESAWRAPPER(amds3laterestore);
|
||||
|
||||
post_code(0x61);
|
||||
prepare_for_resume();
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "cpu/x86/lapic.h"
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge/amd/agesa/family10/reset_test.h"
|
||||
#include <nb_cimx.h>
|
||||
#include <sb_cimx.h>
|
||||
|
@ -65,12 +66,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
post_code(0x38);
|
||||
|
@ -85,12 +81,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
sb_Poweron_Init();
|
||||
}
|
||||
post_code(0x3B);
|
||||
val = agesawrapper_amdinitearly();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x3C);
|
||||
/* W83627DHG pin89,90 function select is RSTOUT3#, RSTOUT2# by default.
|
||||
|
@ -110,20 +101,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
}
|
||||
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv passed\n");
|
||||
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
post_code(0x42);
|
||||
|
||||
post_code(0x50);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "cpu/x86/lapic.h"
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge/amd/agesa/family10/reset_test.h"
|
||||
#include <nb_cimx.h>
|
||||
#include <sb_cimx.h>
|
||||
|
@ -64,12 +65,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
post_code(0x38);
|
||||
|
@ -84,12 +80,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
sb_Poweron_Init();
|
||||
}
|
||||
post_code(0x3B);
|
||||
val = agesawrapper_amdinitearly();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x3C);
|
||||
nb_Ht_Init();
|
||||
|
@ -104,20 +95,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
}
|
||||
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv passed\n");
|
||||
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
post_code(0x42);
|
||||
|
||||
post_code(0x50);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "cpu/x86/lapic.h"
|
||||
#include "cpu/amd/car.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge/amd/agesa/family10/reset_test.h"
|
||||
#include <nb_cimx.h>
|
||||
#include <sb_cimx.h>
|
||||
|
@ -64,12 +65,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx);
|
||||
|
||||
post_code(0x37);
|
||||
val = agesawrapper_amdinitreset();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitreset passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitreset);
|
||||
|
||||
if (!cpu_init_detectedx && boot_cpu()) {
|
||||
post_code(0x38);
|
||||
|
@ -84,12 +80,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
sb_Poweron_Init();
|
||||
}
|
||||
post_code(0x3B);
|
||||
val = agesawrapper_amdinitearly();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitearly passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitearly);
|
||||
|
||||
post_code(0x3C);
|
||||
/* W83627DHG pin89,90 function select is RSTOUT3#, RSTOUT2# by default.
|
||||
|
@ -109,20 +100,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
|
|||
}
|
||||
|
||||
post_code(0x40);
|
||||
val = agesawrapper_amdinitpost();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost failed: %x \n", val);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitpost passed\n");
|
||||
}
|
||||
AGESAWRAPPER(amdinitpost);
|
||||
|
||||
post_code(0x41);
|
||||
val = agesawrapper_amdinitenv();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitenv passed\n");
|
||||
|
||||
AGESAWRAPPER(amdinitenv);
|
||||
post_code(0x42);
|
||||
|
||||
post_code(0x50);
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _AGESAWRAPPER_CALL_H_
|
||||
#define _AGESAWRAPPER_CALL_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <console/console.h>
|
||||
#include "AGESA.h"
|
||||
|
||||
static inline u32 do_agesawrapper(AGESA_STATUS (*func)(void), const char *name)
|
||||
{
|
||||
AGESA_STATUS ret;
|
||||
printk(BIOS_DEBUG, "agesawrapper_%s() entry\n", name);
|
||||
ret = func();
|
||||
printk(BIOS_DEBUG, "agesawrapper_%s() AGESA_STATUS = %x\n", name, ret);
|
||||
return (u32)ret;
|
||||
}
|
||||
|
||||
#define AGESAWRAPPER(func) do_agesawrapper(agesawrapper_ ## func, #func)
|
||||
|
||||
#endif
|
|
@ -831,13 +831,9 @@ static void amdfam10_domain_read_resources(device_t dev)
|
|||
|
||||
static void amdfam10_domain_enable_resources(device_t dev)
|
||||
{
|
||||
u32 val;
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
printk(BIOS_DEBUG, "\nFam10 - %s: AmdInitMid.\n", __func__);
|
||||
val = agesawrapper_amdinitmid();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmid failed: %x \n", val);
|
||||
}
|
||||
AGESAWRAPPER(amdinitmid);
|
||||
printk(BIOS_DEBUG, " ader - leaving %s.\n", __func__);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "northbridge.h"
|
||||
#include "sb_cimx.h"
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
|
||||
//#define FX_DEVS NODE_NUMS
|
||||
#define FX_DEVS 1
|
||||
|
@ -766,15 +767,9 @@ printk(BIOS_DEBUG, " adsr - leaving this lovely routine.\n");
|
|||
|
||||
static void domain_enable_resources(device_t dev)
|
||||
{
|
||||
// u32 val;
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
// printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - agesawrapper_amdinitmid - Start.\n",__func__);
|
||||
printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__);
|
||||
// val = agesawrapper_amdinitmid ();
|
||||
// if(val) {
|
||||
// printk(BIOS_DEBUG, "agesawrapper_amdinitmid failed: %x \n", val);
|
||||
// }
|
||||
// printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - agesawrapper_amdinitmid - End.\n",__func__);
|
||||
// AGESAWRAPPER(amdinitmid);
|
||||
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__);
|
||||
}
|
||||
|
||||
|
@ -810,8 +805,6 @@ static void cpu_bus_set_resources(device_t dev)
|
|||
|
||||
static void cpu_bus_init(device_t dev)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - Start.\n",__func__);
|
||||
initialize_cpus(dev->link_list);
|
||||
|
||||
|
@ -830,12 +823,7 @@ static void cpu_bus_init(device_t dev)
|
|||
#endif // #if CONFIG_SOUTHBRIDGE_AMD_CIMX_SB900
|
||||
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
printk(BIOS_DEBUG, "\nFam12h - northbridge.c - %s - agesawrapper_amdinitmid - Start.\n",__func__);
|
||||
val = agesawrapper_amdinitmid ();
|
||||
if(val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmid failed: %x \n", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - agesawrapper_amdinitmid - End.\n",__func__);
|
||||
AGESAWRAPPER(amdinitmid);
|
||||
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <cpu/amd/mtrr.h>
|
||||
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge.h"
|
||||
#if CONFIG_AMD_SB_CIMX
|
||||
#include <sb_cimx.h>
|
||||
|
@ -758,8 +759,6 @@ static void domain_set_resources(device_t dev)
|
|||
|
||||
static void domain_enable_resources(device_t dev)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
#if CONFIG_AMD_SB_CIMX
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
sb_After_Pci_Init();
|
||||
|
@ -772,14 +771,8 @@ static void domain_enable_resources(device_t dev)
|
|||
/* Must be called after PCI enumeration and resource allocation */
|
||||
printk(BIOS_DEBUG, "\nFam14h - %s\n", __func__);
|
||||
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
|
||||
val = agesawrapper_amdinitmid ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
}
|
||||
if (!acpi_is_wakeup_s3())
|
||||
AGESAWRAPPER(amdinitmid);
|
||||
|
||||
printk(BIOS_DEBUG, " ader - leaving domain_enable_resources.\n");
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <cpu/amd/amdfam15.h>
|
||||
#include <cpuRegisters.h>
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge.h"
|
||||
|
||||
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
|
||||
|
@ -588,13 +589,9 @@ static void domain_read_resources(device_t dev)
|
|||
|
||||
static void domain_enable_resources(device_t dev)
|
||||
{
|
||||
u32 val;
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
printk(BIOS_DEBUG, "\nFam15 - %s: AmdInitMid.\n", __func__);
|
||||
val = agesawrapper_amdinitmid();
|
||||
if (val) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmid failed: %x \n", val);
|
||||
}
|
||||
AGESAWRAPPER(amdinitmid);
|
||||
printk(BIOS_DEBUG, " Fam15 - leaving %s.\n", __func__);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <cpu/amd/amdfam15.h>
|
||||
#include <cpuRegisters.h>
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge.h"
|
||||
|
||||
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
|
||||
|
@ -555,20 +556,12 @@ static void domain_read_resources(device_t dev)
|
|||
|
||||
static void domain_enable_resources(device_t dev)
|
||||
{
|
||||
u32 val;
|
||||
if (acpi_is_wakeup_s3())
|
||||
agesawrapper_fchs3laterestore();
|
||||
AGESAWRAPPER(fchs3laterestore);
|
||||
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
printk(BIOS_DEBUG, "\nFam15 - %s: AmdInitMid.\n", __func__);
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
|
||||
val = agesawrapper_amdinitmid ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
}
|
||||
if (!acpi_is_wakeup_s3())
|
||||
AGESAWRAPPER(amdinitmid);
|
||||
|
||||
printk(BIOS_DEBUG, " ader - leaving %s.\n", __func__);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <cpu/amd/amdfam16.h>
|
||||
#include <cpuRegisters.h>
|
||||
#include "agesawrapper.h"
|
||||
#include <northbridge/amd/agesa/agesawrapper_call.h>
|
||||
#include "northbridge.h"
|
||||
|
||||
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
|
||||
|
@ -559,20 +560,12 @@ static void domain_read_resources(device_t dev)
|
|||
|
||||
static void domain_enable_resources(device_t dev)
|
||||
{
|
||||
u32 val;
|
||||
if (acpi_is_wakeup_s3())
|
||||
agesawrapper_fchs3laterestore();
|
||||
AGESAWRAPPER(fchs3laterestore);
|
||||
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
printk(BIOS_DEBUG, "\nFam16 - domain_enable_resources: AmdInitMid.\n");
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
|
||||
val = agesawrapper_amdinitmid ();
|
||||
if (val)
|
||||
printk(BIOS_DEBUG, "error level: %x \n", val);
|
||||
else
|
||||
printk(BIOS_DEBUG, "passed.\n");
|
||||
}
|
||||
if (!acpi_is_wakeup_s3())
|
||||
AGESAWRAPPER(amdinitmid);
|
||||
|
||||
printk(BIOS_DEBUG, " ader - leaving domain_enable_resources.\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue