Hello Kyösti Mälkki,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/41785
to review the following change.
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency
We want to use the CACHE_ROM_* macros in linker scripts. Avoid `commonlib/helpers.h` as it contains an incompatible ALIGN() definition.
Change-Id: I3bf20733418ca4135f364a3f6489e74d45e4f466 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/include/cpu/x86/mtrr.h 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/41785/1
diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 50148ff..301ea30 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -1,7 +1,6 @@ #ifndef CPU_X86_MTRR_H #define CPU_X86_MTRR_H
-#include <commonlib/helpers.h> #ifndef __ASSEMBLER__ #include <cpu/x86/msr.h> #include <arch/cpu.h> @@ -187,8 +186,8 @@
/* Last but not least, most (if not all) chipsets have MMIO between 0xfe000000 and 0xff000000, so limit to 16MiB. */ -#if CAR_CACHE_ROM_SIZE >= 16 * MiB -# define CACHE_ROM_SIZE (16 * MiB) +#if CAR_CACHE_ROM_SIZE >= 16 << 20 +# define CACHE_ROM_SIZE (16 << 20) #else # define CACHE_ROM_SIZE CAR_CACHE_ROM_SIZE #endif
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG@11 PS1, Line 11: definition. Where is the ALIGN() macro being used in the CACHE_ROM_* macros? Sorry, I poked around and couldn't see it.
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 1: Code-Review+2
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG@11 PS1, Line 11: definition.
Where is the ALIGN() macro being used in the CACHE_ROM_* macros? Sorry, I poked around and couldn't […]
Could we be more explicit that this is conflicting with ld ALIGN keyword? I was confused where the conflict was coming from, but saw comments in CB:30872 that explain it more.
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG@11 PS1, Line 11: definition.
Could we be more explicit that this is conflicting with ld ALIGN keyword? I was confused where the c […]
src/commonlib/bsd/include/commonlib/bsd/helpers.h
indirect included
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG@11 PS1, Line 11: definition.
src/commonlib/bsd/include/commonlib/bsd/helpers.h […]
I understand where its coming from. I'm talking about it being the ld program's grammar that is conflicting -- not any of the code in coreboot.
Hello Kyösti Mälkki, HAOUAS Elyes,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41785
to look at the new patch set (#2).
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency
We want to use the CACHE_ROM_* macros in linker scripts. Avoid `commonlib/helpers.h` as it contains an ALIGN() macro definition that conflicts with the ALIGN keyword in linker scripts.
Change-Id: I3bf20733418ca4135f364a3f6489e74d45e4f466 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/include/cpu/x86/mtrr.h 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/41785/2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG@11 PS1, Line 11: definition.
I understand where its coming from. […]
Reworded, better?
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41785/1//COMMIT_MSG@11 PS1, Line 11: definition.
Reworded, better?
Ack
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 2:
How about just getting rid of ALIGN() from commonlib/helpers.h? I think people shouldn't use that anyway, they should use ALIGN_UP() for clarity. That way we aren't just kicking this can down the road until the next header runs into this problem.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency
We want to use the CACHE_ROM_* macros in linker scripts. Avoid `commonlib/helpers.h` as it contains an ALIGN() macro definition that conflicts with the ALIGN keyword in linker scripts.
Change-Id: I3bf20733418ca4135f364a3f6489e74d45e4f466 Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/41785 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/include/cpu/x86/mtrr.h 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 50148ff..301ea30 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -1,7 +1,6 @@ #ifndef CPU_X86_MTRR_H #define CPU_X86_MTRR_H
-#include <commonlib/helpers.h> #ifndef __ASSEMBLER__ #include <cpu/x86/msr.h> #include <arch/cpu.h> @@ -187,8 +186,8 @@
/* Last but not least, most (if not all) chipsets have MMIO between 0xfe000000 and 0xff000000, so limit to 16MiB. */ -#if CAR_CACHE_ROM_SIZE >= 16 * MiB -# define CACHE_ROM_SIZE (16 * MiB) +#if CAR_CACHE_ROM_SIZE >= 16 << 20 +# define CACHE_ROM_SIZE (16 << 20) #else # define CACHE_ROM_SIZE CAR_CACHE_ROM_SIZE #endif
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41785 )
Change subject: cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/4520 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/4519 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/4518 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/4517
Please note: This test is under development and might not be accurate at all!