diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-10-02 11:06:31 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2014-02-05 05:23:27 +0100 |
commit | 833ff353b71c6d473b7fdfa75e464599dd03d976 (patch) | |
tree | f7a668011e053d2b1ca1bc2a463975efad26930f /src/soc/intel | |
parent | c04e171467c61668d9ffefebf363858937c3e477 (diff) |
baytrail: import and use updated mrc_wrapper.h
The mrc_wrapper.h was changed to protect against ABI differences
between the two sets of compilers and flags used. This requires
a prope shim for the console output funciton.
BUG=chrome-os-partner:23048
BRANCH=None
TEST=Built and booted successfully.
Change-Id: I976e692e66dcfc0eacadae6173abfd9b81e31137
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/171580
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: http://review.coreboot.org/4858
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/baytrail/baytrail/mrc_wrapper.h | 7 | ||||
-rw-r--r-- | src/soc/intel/baytrail/romstage/raminit.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/soc/intel/baytrail/baytrail/mrc_wrapper.h b/src/soc/intel/baytrail/baytrail/mrc_wrapper.h index 556746bb53..858aab887c 100644 --- a/src/soc/intel/baytrail/baytrail/mrc_wrapper.h +++ b/src/soc/intel/baytrail/baytrail/mrc_wrapper.h @@ -32,6 +32,9 @@ #define NUM_CHANNELS 2 +/* Provide generic x86 calling conventions. */ +#define ABI_X86 __attribute((regparm(0))) + enum { DRAM_INFO_SPD_SMBUS, /* Use the typical SPD smbus access. */ DRAM_INFO_SPD_MEM, /* SPD info in memory. */ @@ -67,7 +70,7 @@ struct mrc_params { struct mrc_mainboard_params mainboard; - void (*console_out)(unsigned char byte); + void ABI_X86 (*console_out)(unsigned char byte); int prev_sleep_state; @@ -83,6 +86,6 @@ struct mrc_params { } __attribute__((packed)); /* Call into wrapper. */ -typedef int (*mrc_wrapper_entry_t)(struct mrc_params *); +typedef int ABI_X86 (*mrc_wrapper_entry_t)(struct mrc_params *); #endif /* _MRC_WRAPPER_H_ */ diff --git a/src/soc/intel/baytrail/romstage/raminit.c b/src/soc/intel/baytrail/romstage/raminit.c index 68836d3ada..cf9ccfd1d6 100644 --- a/src/soc/intel/baytrail/romstage/raminit.c +++ b/src/soc/intel/baytrail/romstage/raminit.c @@ -52,6 +52,11 @@ static void enable_smbus(void) score_select_func(PCU_SMB_DATA_PAD, 1); } +static void ABI_X86 send_to_console(unsigned char b) +{ + console_tx_byte(b); +} + void raminit(struct mrc_params *mp, int prev_sleep_state) { int ret; @@ -60,7 +65,7 @@ void raminit(struct mrc_params *mp, int prev_sleep_state) /* Fill in default entries. */ mp->version = MRC_PARAMS_VER; - mp->console_out = &console_tx_byte; + mp->console_out = &send_to_console; mp->prev_sleep_state = prev_sleep_state; if (!mrc_cache_get_current(&cache)) { |