From f0d39c409b95c2095f84adcd0dcb9b0381e1562e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 19 Feb 2016 16:44:22 +0100 Subject: die() when attempting to use bounce buffer on non-i386. Only i386 has code to support bounce buffer. For others coreboot would silently discard part of binary which doesn't work and is a hell to debug. Instead just die. Change-Id: I37ae24ea5d13aae95f9856a896700a0408747233 Signed-off-by: Vladimir Serbinenko Reviewed-on: https://review.coreboot.org/13750 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/arm/boot.c | 5 +++++ src/arch/arm64/boot.c | 5 +++++ src/arch/mips/boot.c | 5 +++++ src/arch/power8/boot.c | 5 +++++ src/arch/riscv/boot.c | 5 +++++ src/arch/x86/boot.c | 5 +++++ 6 files changed, 30 insertions(+) (limited to 'src/arch') diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c index 1767fe04c2..e208fc9051 100644 --- a/src/arch/arm/boot.c +++ b/src/arch/arm/boot.c @@ -25,3 +25,8 @@ void arch_prog_run(struct prog *prog) doit = prog_entry(prog); doit(prog_entry_arg(prog)); } + +int arch_supports_bounce_buffer(void) +{ + return 0; +} diff --git a/src/arch/arm64/boot.c b/src/arch/arm64/boot.c index fa83c3f657..d498cd9362 100644 --- a/src/arch/arm64/boot.c +++ b/src/arch/arm64/boot.c @@ -72,6 +72,11 @@ void arch_prog_run(struct prog *prog) doit(prog_entry_arg(prog)); } +int arch_supports_bounce_buffer(void) +{ + return 0; +} + /* Generic stage entry point. Can be overridden by board/SoC if needed. */ __attribute__((weak)) void stage_entry(void) { diff --git a/src/arch/mips/boot.c b/src/arch/mips/boot.c index 5ab36ec390..608af7b588 100644 --- a/src/arch/mips/boot.c +++ b/src/arch/mips/boot.c @@ -23,3 +23,8 @@ void arch_prog_run(struct prog *prog) doit(cb_tables); } + +int arch_supports_bounce_buffer(void) +{ + return 0; +} diff --git a/src/arch/power8/boot.c b/src/arch/power8/boot.c index 4da60b4e6c..fa1586f25b 100644 --- a/src/arch/power8/boot.c +++ b/src/arch/power8/boot.c @@ -21,3 +21,8 @@ void arch_prog_run(struct prog *prog) doit(prog_entry_arg(prog)); } + +int arch_supports_bounce_buffer(void) +{ + return 0; +} diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c index 552b3f4cd6..96526bf64b 100644 --- a/src/arch/riscv/boot.c +++ b/src/arch/riscv/boot.c @@ -30,3 +30,8 @@ void arch_prog_run(struct prog *prog) doit(prog_entry_arg(prog)); } } + +int arch_supports_bounce_buffer(void) +{ + return 0; +} diff --git a/src/arch/x86/boot.c b/src/arch/x86/boot.c index b23e322d6c..ba78c4e308 100644 --- a/src/arch/x86/boot.c +++ b/src/arch/x86/boot.c @@ -192,6 +192,11 @@ static void jmp_payload(void *entry, unsigned long buffer, unsigned long size) ); } +int arch_supports_bounce_buffer(void) +{ + return 1; +} + static void try_payload(struct prog *prog) { if (prog_type(prog) == PROG_PAYLOAD) { -- cgit v1.2.3