Skip to contentSkip to conversation

Rombios build fixes

PATCH In review Andrew Cooper 2 participants 8 messages Aug 18, 2023

lore
Share & tools
lore
#0 lore raw

cover Rombios build fixes

Andrew Cooper (2):
rombios: Avoid using K&R function syntax
rombiosn: Remove the use of egrep

 tools/firmware/rombios/32bit/Makefile          |  2 +-
 tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

base-commit: e6cb27f2f20d09dd2ba135fbc341a4dc98656e10

Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/2 rombios: Avoid using K&R function syntax

The declarations for these functions in 32bitprotos.h are already Ansi compatible. Update the definitions to match.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>

---
 tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tools/firmware/rombios/32bit/tcgbios/tcgbios.c +5 -5
index fa22c4460aac..ad0eac0d20c2 100644
@@ -595,7 +595,7 @@ static void tcpa_add_measurement(uint32_t pcrIndex,
 /*
  * Add measurement to log about call of int 19h
  */
-void tcpa_calling_int19h()
+void tcpa_calling_int19h(void)
 {
 	tcpa_add_measurement(4, EV_ACTION, 0);
 }
@@ -603,7 +603,7 @@ void tcpa_calling_int19h()
 /*
  * Add measurement to log about retuning from int 19h
  */
-void tcpa_returned_int19h()
+void tcpa_returned_int19h(void)
 {
 	tcpa_add_measurement(4, EV_ACTION, 1);
 }
@@ -611,7 +611,7 @@ void tcpa_returned_int19h()
 /*
  * Add event separators for PCRs 0 to 7; specs 8.2.3
  */
-void tcpa_add_event_separators()
+void tcpa_add_event_separators(void)
 {
 	uint32_t pcrIndex = 0;
 	while (pcrIndex <= 7) {
@@ -624,7 +624,7 @@ void tcpa_add_event_separators()
 /*
  * Add a wake event to the log
  */
-void tcpa_wake_event()
+void tcpa_wake_event(void)
 {
 	tcpa_add_measurement_to_log(6,
 	                            EV_ACTION,
@@ -659,7 +659,7 @@ void tcpa_add_bootdevice(uint32_t bootcd, uint32_t bootdrv)
  * Add measurement to the log about option rom scan
  * 10.4.3 : action 14
  */
-void tcpa_start_option_rom_scan()
+void tcpa_start_option_rom_scan(void)
 {
 	tcpa_add_measurement(2, EV_ACTION, 14);
 }
Signature · 1 line
2.30.2
#3 lore raw

PATCH 2/2 rombiosn: Remove the use of egrep

In reply to Andrew Cooper

As Alpine 3.18 container notes:

egrep: warning: egrep is obsolescent; using grep -E

Adjust it.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>

---
 tools/firmware/rombios/32bit/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/firmware/rombios/32bit/Makefile +1 -1
index c058c715514c..50d45647c23d 100644
@@ -26,7 +26,7 @@ $(TARGET): 32bitbios_all.o
 32bitbios_all.o: 32bitbios.o tcgbios/tcgbiosext.o util.o pmm.o
 	$(LD) $(LDFLAGS_DIRECT) -s -r $^ -o 32bitbios_all.o
 	@nm 32bitbios_all.o |                                \
-	  egrep '^ +U ' >/dev/null && {                      \
+	  grep -E '^ +U ' >/dev/null && {                    \
 	    echo "There are undefined symbols in the BIOS:"; \
 	    nm -u 32bitbios_all.o;                           \
 	    exit 11;                                         \
Signature · 1 line
2.30.2
#5 lore raw
In reply to Andrew Cooper
Quoted 10 lines · Andrew Cooper

Andrew Cooper (2):
rombios: Avoid using K&R function syntax
rombiosn: Remove the use of egrep

 tools/firmware/rombios/32bit/Makefile          |  2 +-
 tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

base-commit: e6cb27f2f20d09dd2ba135fbc341a4dc98656e10

Urgh, forgot to write what I meant to write.

https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/972116359

This gives a clean CI run when ROMBios is explicitly (re)activated.

~Andrew

#6 lore raw
Quoted 10 lines · Andrew Cooper
Quoted 9 lines · Andrew Cooper

Andrew Cooper (2):
rombios: Avoid using K&R function syntax
rombiosn: Remove the use of egrep

 tools/firmware/rombios/32bit/Makefile          |  2 +-
 tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
Quoted 7 lines
Quoted 1 line

base-commit: e6cb27f2f20d09dd2ba135fbc341a4dc98656e10

Urgh, forgot to write what I meant to write.

https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/972116359

This gives a clean CI run when ROMBios is explicitly (re)activated.

On irc you said "more array bounds issues in GET_BDA", yet nothing further is being adjusted here in that regard?

Jan

#7 lore raw
Quoted 11 lines · Jan Beulich
Quoted 10 lines · Andrew Cooper
Quoted 9 lines · Andrew Cooper

Andrew Cooper (2):
rombios: Avoid using K&R function syntax
rombiosn: Remove the use of egrep

 tools/firmware/rombios/32bit/Makefile          |  2 +-
 tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

base-commit: e6cb27f2f20d09dd2ba135fbc341a4dc98656e10

Urgh, forgot to write what I meant to write.

https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/972116359

This gives a clean CI run when ROMBios is explicitly (re)activated.

On irc you said "more array bounds issues in GET_BDA", yet nothing further is being adjusted here in that regard?

So yes, I did end up being confused about those.

They're from the iPXE build, not the RomBIOS build.  They can be seen in
https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/4899807239 but there's clearly no -Werror going on.

I'm going to leave it for now.  The only reasonable fix would be to bump the version of iPXE and I don't have time to that right now.

~Andrew