From 9c8ce3e42324af8992b6e3e52cd7b67dafd763cc Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Mon, 28 Sep 2020 10:36:29 +0800 Subject: amdfwtool: Remove the assumption of ROM_SIZE Every platform passes (and need to) the --flashsize to the command parameter, so we remove the macro definition about a built-time romsize defined in Makefile. Change-Id: I894e833ed23a7da38b36986b624e7dcdf1f4090c Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/45780 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Felix Held --- util/amdfwtool/Makefile.inc | 2 +- util/amdfwtool/amdfwtool.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'util') diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc index 2180fac361..b1a21308fd 100644 --- a/util/amdfwtool/Makefile.inc +++ b/util/amdfwtool/Makefile.inc @@ -5,7 +5,7 @@ amdfwtoolobj = amdfwtool.o AMDFWTOOLCFLAGS=-O2 -Wall -Wextra -Wshadow $(objutil)/amdfwtool/%.o: $(top)/util/amdfwtool/%.c # $(HEADER) - $(HOSTCC) $(AMDFWTOOLCFLAGS) $(HOSTCFLAGS) -DCONFIG_ROM_SIZE=$(CONFIG_ROM_SIZE) -c -o $@ $< + $(HOSTCC) $(AMDFWTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< $(objutil)/amdfwtool/amdfwtool: $(addprefix $(objutil)/amdfwtool/,$(amdfwtoolobj)) printf " AMDFWTOOL\n" diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index fc352ec7f9..f5030d381c 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -57,10 +57,6 @@ #include #include -#ifndef CONFIG_ROM_SIZE -#define CONFIG_ROM_SIZE 0x400000 -#endif - #define AMD_ROMSIG_OFFSET 0x20000 #define MIN_ROM_KB 256 @@ -1330,9 +1326,7 @@ int main(int argc, char **argv) int fuse_defined = 0; int targetfd; char *output = NULL; - context ctx = { - .rom_size = CONFIG_ROM_SIZE, - }; + context ctx = { 0 }; /* Values cleared after each firmware or parameter, regardless if N/A */ uint8_t sub = 0, instance = 0; int abl_image = 0; -- cgit v1.2.3