summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2020-11-09 21:15:15 +0800
committerIru Cai <mytbk920423@gmail.com>2020-12-28 21:28:01 +0800
commit7232824938381c8475fb97fb50bfc5595afc5594 (patch)
treeab79ff8f71e86650f60b1b9bbd82836cd24f628c /src
parentea69c9b56d66cd9907167a749e3c920a394f1552 (diff)
downloadcoreboot-7232824938381c8475fb97fb50bfc5595afc5594.tar.xz
do not use mrc_printk
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/broadwell/refcode/Makefile.inc1
-rw-r--r--src/soc/intel/broadwell/refcode/broadwell_mrc.asm3
-rw-r--r--src/soc/intel/broadwell/refcode/printk.c12
3 files changed, 15 insertions, 1 deletions
diff --git a/src/soc/intel/broadwell/refcode/Makefile.inc b/src/soc/intel/broadwell/refcode/Makefile.inc
index ce1fa0319c..3eca45f66d 100644
--- a/src/soc/intel/broadwell/refcode/Makefile.inc
+++ b/src/soc/intel/broadwell/refcode/Makefile.inc
@@ -1,4 +1,5 @@
romstage-libs += $(obj)/broadwell_mrc.o
+romstage-y += printk.c
ramstage-libs += $(obj)/broadwell_refcode.o
$(obj)/%.o: $(src)/soc/intel/broadwell/refcode/%.asm
diff --git a/src/soc/intel/broadwell/refcode/broadwell_mrc.asm b/src/soc/intel/broadwell/refcode/broadwell_mrc.asm
index 049ead6647..8a48ef8df7 100644
--- a/src/soc/intel/broadwell/refcode/broadwell_mrc.asm
+++ b/src/soc/intel/broadwell/refcode/broadwell_mrc.asm
@@ -7,6 +7,7 @@
;; f fcn5 @ 0xfffb7458
bits 32
+extern mrc_printk
global mrc_entry
mrc_entry:
@@ -32514,7 +32515,7 @@ pop edi
pop ebp
ret
-mrc_printk:
+mrc_printk_:
push ebp
mov ebp, esp
push edi
diff --git a/src/soc/intel/broadwell/refcode/printk.c b/src/soc/intel/broadwell/refcode/printk.c
new file mode 100644
index 0000000000..f45243c1ae
--- /dev/null
+++ b/src/soc/intel/broadwell/refcode/printk.c
@@ -0,0 +1,12 @@
+#include <console/console.h>
+
+int mrc_printk(const char *fmt, ...);
+
+int mrc_printk(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ int i = do_vprintk(0, fmt, args);
+ va_end(args);
+ return i;
+}