Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6180
-gerrit
commit 058b174e18652a4017b444d47bf4ac8253343f93 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Jul 4 16:14:37 2014 +0300
AGESA: Trace execution with AGESAWRAPPER()
Change-Id: I8db694a3bf6b1af459bdf98f7acb99edf4dd07f7 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/cpu/amd/agesa/amd_late_init.c | 12 ++--- src/mainboard/amd/dinar/romstage.c | 36 +++------------ src/mainboard/amd/inagua/romstage.c | 36 +++------------ src/mainboard/amd/olivehill/romstage.c | 45 ++++--------------- src/mainboard/amd/parmer/romstage.c | 44 ++++-------------- src/mainboard/amd/persimmon/romstage.c | 52 ++++------------------ src/mainboard/amd/south_station/romstage.c | 36 +++------------ src/mainboard/amd/thatcher/romstage.c | 46 ++++--------------- src/mainboard/amd/torpedo/romstage.c | 36 +++------------ src/mainboard/amd/union_station/romstage.c | 36 +++------------ src/mainboard/asrock/e350m1/romstage.c | 36 +++------------ src/mainboard/asrock/imb-a180/romstage.c | 45 ++++--------------- src/mainboard/asus/f2a85-m/romstage.c | 45 ++++--------------- src/mainboard/gizmosphere/gizmo/romstage.c | 52 ++++------------------ src/mainboard/hp/pavilion_m6_1035dx/romstage.c | 44 ++++-------------- src/mainboard/jetway/nf81-t56n-lf/romstage.c | 52 ++++------------------ src/mainboard/lippert/frontrunner-af/romstage.c | 52 ++++------------------ src/mainboard/lippert/toucan-af/romstage.c | 52 ++++------------------ src/mainboard/supermicro/h8qgi/romstage.c | 29 +++--------- src/mainboard/supermicro/h8scm/romstage.c | 29 +++--------- src/mainboard/tyan/s8226/romstage.c | 29 +++--------- src/northbridge/amd/agesa/agesawrapper_call.h | 33 ++++++++++++++ src/northbridge/amd/agesa/family10/northbridge.c | 6 +-- src/northbridge/amd/agesa/family12/northbridge.c | 18 ++------ src/northbridge/amd/agesa/family14/northbridge.c | 13 ++---- src/northbridge/amd/agesa/family15/northbridge.c | 7 +-- src/northbridge/amd/agesa/family15tn/northbridge.c | 15 ++----- src/northbridge/amd/agesa/family16kb/northbridge.c | 15 ++----- 28 files changed, 200 insertions(+), 751 deletions(-)
diff --git a/src/cpu/amd/agesa/amd_late_init.c b/src/cpu/amd/agesa/amd_late_init.c index 8bce364..cf1caf1 100644 --- a/src/cpu/amd/agesa/amd_late_init.c +++ b/src/cpu/amd/agesa/amd_late_init.c @@ -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) = { diff --git a/src/mainboard/amd/dinar/romstage.c b/src/mainboard/amd/dinar/romstage.c index 8851e8c..983a830 100644 --- a/src/mainboard/amd/dinar/romstage.c +++ b/src/mainboard/amd/dinar/romstage.c @@ -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); diff --git a/src/mainboard/amd/inagua/romstage.c b/src/mainboard/amd/inagua/romstage.c index a7b8a40..489e81f 100644 --- a/src/mainboard/amd/inagua/romstage.c +++ b/src/mainboard/amd/inagua/romstage.c @@ -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(); diff --git a/src/mainboard/amd/olivehill/romstage.c b/src/mainboard/amd/olivehill/romstage.c index c979456..718a057 100644 --- a/src/mainboard/amd/olivehill/romstage.c +++ b/src/mainboard/amd/olivehill/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/amd/parmer/romstage.c b/src/mainboard/amd/parmer/romstage.c index b0fa5d9..7bd3984 100644 --- a/src/mainboard/amd/parmer/romstage.c +++ b/src/mainboard/amd/parmer/romstage.c @@ -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(); diff --git a/src/mainboard/amd/persimmon/romstage.c b/src/mainboard/amd/persimmon/romstage.c index f6f2309..b0fd12c 100644 --- a/src/mainboard/amd/persimmon/romstage.c +++ b/src/mainboard/amd/persimmon/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/amd/south_station/romstage.c b/src/mainboard/amd/south_station/romstage.c index be340aa..6dc2a6a 100644 --- a/src/mainboard/amd/south_station/romstage.c +++ b/src/mainboard/amd/south_station/romstage.c @@ -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(); diff --git a/src/mainboard/amd/thatcher/romstage.c b/src/mainboard/amd/thatcher/romstage.c index 10dac12..f3108ff 100644 --- a/src/mainboard/amd/thatcher/romstage.c +++ b/src/mainboard/amd/thatcher/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/amd/torpedo/romstage.c b/src/mainboard/amd/torpedo/romstage.c index e3416c7..febe120 100644 --- a/src/mainboard/amd/torpedo/romstage.c +++ b/src/mainboard/amd/torpedo/romstage.c @@ -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(); diff --git a/src/mainboard/amd/union_station/romstage.c b/src/mainboard/amd/union_station/romstage.c index 0a7ef7c..30e8f9b 100644 --- a/src/mainboard/amd/union_station/romstage.c +++ b/src/mainboard/amd/union_station/romstage.c @@ -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(); diff --git a/src/mainboard/asrock/e350m1/romstage.c b/src/mainboard/asrock/e350m1/romstage.c index 5c2f867..a0a2912 100644 --- a/src/mainboard/asrock/e350m1/romstage.c +++ b/src/mainboard/asrock/e350m1/romstage.c @@ -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(); diff --git a/src/mainboard/asrock/imb-a180/romstage.c b/src/mainboard/asrock/imb-a180/romstage.c index a818e03..b750e44 100644 --- a/src/mainboard/asrock/imb-a180/romstage.c +++ b/src/mainboard/asrock/imb-a180/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/asus/f2a85-m/romstage.c b/src/mainboard/asus/f2a85-m/romstage.c index f50f334..71455fd 100644 --- a/src/mainboard/asus/f2a85-m/romstage.c +++ b/src/mainboard/asus/f2a85-m/romstage.c @@ -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(); diff --git a/src/mainboard/gizmosphere/gizmo/romstage.c b/src/mainboard/gizmosphere/gizmo/romstage.c index 5def470..420efc3 100755 --- a/src/mainboard/gizmosphere/gizmo/romstage.c +++ b/src/mainboard/gizmosphere/gizmo/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/hp/pavilion_m6_1035dx/romstage.c b/src/mainboard/hp/pavilion_m6_1035dx/romstage.c index 38991af..7855cd1 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/romstage.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/romstage.c @@ -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(); diff --git a/src/mainboard/jetway/nf81-t56n-lf/romstage.c b/src/mainboard/jetway/nf81-t56n-lf/romstage.c index 7f9cb18..4b2f711 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/romstage.c +++ b/src/mainboard/jetway/nf81-t56n-lf/romstage.c @@ -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"); - - 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(amdinitresume); + + AGESAWRAPPER(amds3laterestore);
post_code(0x61); prepare_for_resume(); diff --git a/src/mainboard/lippert/frontrunner-af/romstage.c b/src/mainboard/lippert/frontrunner-af/romstage.c index b65834e..05c5019 100644 --- a/src/mainboard/lippert/frontrunner-af/romstage.c +++ b/src/mainboard/lippert/frontrunner-af/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/lippert/toucan-af/romstage.c b/src/mainboard/lippert/toucan-af/romstage.c index ff2697b..595faa0 100644 --- a/src/mainboard/lippert/toucan-af/romstage.c +++ b/src/mainboard/lippert/toucan-af/romstage.c @@ -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"); - - 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(); diff --git a/src/mainboard/supermicro/h8qgi/romstage.c b/src/mainboard/supermicro/h8qgi/romstage.c index d95db3c..486d7af 100644 --- a/src/mainboard/supermicro/h8qgi/romstage.c +++ b/src/mainboard/supermicro/h8qgi/romstage.c @@ -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); diff --git a/src/mainboard/supermicro/h8scm/romstage.c b/src/mainboard/supermicro/h8scm/romstage.c index e7a1c4c..9381304 100644 --- a/src/mainboard/supermicro/h8scm/romstage.c +++ b/src/mainboard/supermicro/h8scm/romstage.c @@ -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); diff --git a/src/mainboard/tyan/s8226/romstage.c b/src/mainboard/tyan/s8226/romstage.c index f4befe6..b485612 100644 --- a/src/mainboard/tyan/s8226/romstage.c +++ b/src/mainboard/tyan/s8226/romstage.c @@ -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); diff --git a/src/northbridge/amd/agesa/agesawrapper_call.h b/src/northbridge/amd/agesa/agesawrapper_call.h new file mode 100644 index 0000000..8955338 --- /dev/null +++ b/src/northbridge/amd/agesa/agesawrapper_call.h @@ -0,0 +1,33 @@ +/* + * 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> + +static inline u32 do_agesawrapper(UINT32 (*func)(void), const char *name) +{ + u32 ret = func(); + printk(BIOS_DEBUG, "agesawrapper_%s() = %x\n", name, ret); + return ret; +} + +#define AGESAWRAPPER(func) do_agesawrapper(agesawrapper_ ## func, #func) + +#endif diff --git a/src/northbridge/amd/agesa/family10/northbridge.c b/src/northbridge/amd/agesa/family10/northbridge.c index 73545a0..3b63b9e 100644 --- a/src/northbridge/amd/agesa/family10/northbridge.c +++ b/src/northbridge/amd/agesa/family10/northbridge.c @@ -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__); }
diff --git a/src/northbridge/amd/agesa/family12/northbridge.c b/src/northbridge/amd/agesa/family12/northbridge.c index 7d71624..65212dc 100644 --- a/src/northbridge/amd/agesa/family12/northbridge.c +++ b/src/northbridge/amd/agesa/family12/northbridge.c @@ -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__); }
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 41de9cc..57502e9 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -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"); } diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c index eada06f..34f58d3 100644 --- a/src/northbridge/amd/agesa/family15/northbridge.c +++ b/src/northbridge/amd/agesa/family15/northbridge.c @@ -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__); }
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c index 49f3610..36a4b57 100644 --- a/src/northbridge/amd/agesa/family15tn/northbridge.c +++ b/src/northbridge/amd/agesa/family15tn/northbridge.c @@ -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__); } diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c index 5b43141..5572282 100644 --- a/src/northbridge/amd/agesa/family16kb/northbridge.c +++ b/src/northbridge/amd/agesa/family16kb/northbridge.c @@ -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"); }