summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/lib/romstage_console.c2
-rw-r--r--src/include/console/console.h2
-rw-r--r--src/northbridge/intel/sandybridge/pei_data.h4
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c3
4 files changed, 8 insertions, 3 deletions
diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index af2944d52c..f43db05622 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -29,7 +29,7 @@
#include <console/ne2k.h>
#endif
-static void console_tx_byte(unsigned char byte)
+void console_tx_byte(unsigned char byte)
{
if (byte == '\n')
console_tx_byte('\r');
diff --git a/src/include/console/console.h b/src/include/console/console.h
index 00be96f80f..375e5a42f9 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -38,7 +38,6 @@
#endif
#ifndef __PRE_RAM__
-void console_tx_byte(unsigned char byte);
void console_tx_flush(void);
unsigned char console_rx_byte(void);
int console_tst_byte(void);
@@ -68,6 +67,7 @@ extern int console_loglevel;
#ifndef __ROMCC__
void console_init(void);
+void console_tx_byte(unsigned char byte);
void post_code(u8 value);
/* this function is weak and can be overridden by a mainboard function. */
void mainboard_post(u8 value);
diff --git a/src/northbridge/intel/sandybridge/pei_data.h b/src/northbridge/intel/sandybridge/pei_data.h
index cda08b2d3f..5bb3b38a13 100644
--- a/src/northbridge/intel/sandybridge/pei_data.h
+++ b/src/northbridge/intel/sandybridge/pei_data.h
@@ -30,7 +30,8 @@
#ifndef PEI_DATA_H
#define PEI_DATA_H
-#define PEI_VERSION 1
+typedef void (*tx_byte_func)(unsigned char byte);
+#define PEI_VERSION 2
struct pei_data
{
uint32_t pei_version;
@@ -93,6 +94,7 @@ struct pei_data
* spd_address for a given "DIMM".
*/
uint8_t spd_data[4][256];
+ tx_byte_func tx_byte;
} __attribute__((packed));
#endif
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 8248fa1486..2b46873e4d 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -241,6 +241,9 @@ void sdram_initialize(struct pei_data *pei_data)
hlt();
}
+ /* Pass console handler in pei_data */
+ pei_data->tx_byte = console_tx_byte;
+
/* Locate and call UEFI System Agent binary. */
entry = (unsigned long)cbfs_find_file("mrc.bin", 0xab);
if (entry) {