Bao Zheng has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
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.
Change-Id: I894e833ed23a7da38b36986b624e7dcdf1f4090c Signed-off-by: fishbaozi@gmail.com --- M util/amdfwtool/amdfwtool.c 1 file changed, 1 insertion(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/45780/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 30ef90b..8fd0f15 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -57,10 +57,6 @@ #include <stdlib.h> #include <getopt.h>
-#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 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;
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
it would also be good to remove the -DCONFIG_ROM_SIZE=$(CONFIG_ROM_SIZE) from the Makfile.inc in this patch, since that's now unused
https://review.coreboot.org/c/coreboot/+/45780/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45780/1//COMMIT_MSG@9 PS1, Line 9: Every platform passes (and need to) the --flashsize to the command parameter, : So we remove the macro definition. please add that that define that gets removed here was about a built-time rom size option and reflow the commit message to 72 characters per line
Hello build bot (Jenkins), Zheng Bao, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45780
to look at the new patch set (#2).
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
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 fishbaozi@gmail.com --- M util/amdfwtool/Makefile.inc M util/amdfwtool/amdfwtool.c 2 files changed, 2 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/45780/2
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Zheng Bao, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45780
to look at the new patch set (#3).
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
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 fishbaozi@gmail.com --- M util/amdfwtool/Makefile.inc M util/amdfwtool/amdfwtool.c 2 files changed, 2 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/45780/3
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 3: Code-Review+2
if you move this patch before "amdfwtool: Clean up the Makefile of amdfwtool", you could drop the "-DCONFIG_ROM_SIZE=$(CONFIG_ROM_SIZE)" right away in the makefile change. both the current way and what i suggest are ok for me though
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 3: Code-Review+2
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 3: Code-Review+2
Bao Zheng has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45780/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45780/1//COMMIT_MSG@9 PS1, Line 9: Every platform passes (and need to) the --flashsize to the command parameter, : So we remove the macro definition.
please add that that define that gets removed here was about a built-time rom size option and reflow […]
Done
Hello build bot (Jenkins), Martin Roth, Patrick Georgi, Marshall Dawson, Zheng Bao, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45780
to look at the new patch set (#7).
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
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 fishbaozi@gmail.com --- M util/amdfwtool/Makefile.inc M util/amdfwtool/amdfwtool.c 2 files changed, 2 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/45780/7
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 7: Code-Review+2
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
Patch Set 7: Code-Review+2
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45780 )
Change subject: amdfwtool: Remove the assumption of ROM_SIZE ......................................................................
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 fishbaozi@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/45780 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M util/amdfwtool/Makefile.inc M util/amdfwtool/amdfwtool.c 2 files changed, 2 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved Felix Held: Looks good to me, approved
diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc index 2180fac..b1a2130 100644 --- a/util/amdfwtool/Makefile.inc +++ b/util/amdfwtool/Makefile.inc @@ -5,7 +5,7 @@ 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 fc352ec..f5030d3 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -57,10 +57,6 @@ #include <stdlib.h> #include <getopt.h>
-#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 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;