summaryrefslogtreecommitdiff
path: root/src/mainboard/asrock
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-04 16:14:37 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-14 19:48:00 +0200
commit7b23ae0e8938eb71453cbc28c2cc74c14a4039ae (patch)
tree6f57fc077140b22a2f1d8b509baac3384c38eb7b /src/mainboard/asrock
parent06ff7268f67d1345fd115fda0879d781eac2d6b1 (diff)
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>
Diffstat (limited to 'src/mainboard/asrock')
-rw-r--r--src/mainboard/asrock/e350m1/romstage.c36
-rw-r--r--src/mainboard/asrock/imb-a180/romstage.c45
2 files changed, 15 insertions, 66 deletions
diff --git a/src/mainboard/asrock/e350m1/romstage.c b/src/mainboard/asrock/e350m1/romstage.c
index 5c2f86747f..a0a2912ab8 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 a818e0302c..b750e440af 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();