Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35399 )
Change subject: lib/trace: Replace __PRE_RAM__ use ......................................................................
lib/trace: Replace __PRE_RAM__ use
Change-Id: I957be92594aced2e8465e7f94d8d42e44c3418d7 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/include/trace.h 1 file changed, 2 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/35399/1
diff --git a/src/include/trace.h b/src/include/trace.h index 4f5b8c4..aed69a8 100644 --- a/src/include/trace.h +++ b/src/include/trace.h @@ -16,16 +16,7 @@ #ifndef __TRACE_H #define __TRACE_H
- -#ifdef __PRE_RAM__ - -#define DISABLE_TRACE -#define ENABLE_TRACE -#define DISABLE_TRACE_ON_FUNCTION - -#else /* !__PRE_RAM__ */ - -#if CONFIG(TRACE) && !defined(__SMM__) +#if !ENV_ROMSTAGE_OR_BEFORE && CONFIG(TRACE)
void __cyg_profile_func_enter(void *, void *) __attribute__((no_instrument_function)); @@ -46,5 +37,5 @@ #define DISABLE_TRACE_ON_FUNCTION
#endif -#endif + #endif
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35399 )
Change subject: lib/trace: Replace __PRE_RAM__ use ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h File src/include/trace.h:
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h@19 PS3, Line 19: ENV_ROMSTAGE_OR_BEFORE Are we just wanting to know if its RAMSTAGE? I think it's cleaner to use ENV_RAMSTAGE. Unless you want postcar in there as well?
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35399 )
Change subject: lib/trace: Replace __PRE_RAM__ use ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h File src/include/trace.h:
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h@19 PS3, Line 19: ENV_ROMSTAGE_OR_BEFORE
Are we just wanting to know if its RAMSTAGE? I think it's cleaner to use ENV_RAMSTAGE. […]
We build lib/trace.c for postcar and ramstage, so I chose this. Maybe lack of .bss was the reason why it was excluded from romstage?
With relocatable modules, I think we should normalize the printed addresses first? Like subtract _program perhaps? Maybe there is more that should be fixed, but maybe not in this commit scope...
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35399 )
Change subject: lib/trace: Replace __PRE_RAM__ use ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h File src/include/trace.h:
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h@19 PS3, Line 19: ENV_ROMSTAGE_OR_BEFORE
We build lib/trace.c for postcar and ramstage, so I chose this. Maybe lack of . […]
Ok. I just wanted to confirm.
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35399 )
Change subject: lib/trace: Replace __PRE_RAM__ use ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h File src/include/trace.h:
https://review.coreboot.org/c/coreboot/+/35399/3/src/include/trace.h@19 PS3, Line 19: ENV_ROMSTAGE_OR_BEFORE
Ok. I just wanted to confirm.
Ack
Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35399 )
Change subject: lib/trace: Replace __PRE_RAM__ use ......................................................................
lib/trace: Replace __PRE_RAM__ use
Change-Id: I957be92594aced2e8465e7f94d8d42e44c3418d7 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/35399 Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/include/trace.h 1 file changed, 2 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved
diff --git a/src/include/trace.h b/src/include/trace.h index 4f5b8c4..aed69a8 100644 --- a/src/include/trace.h +++ b/src/include/trace.h @@ -16,16 +16,7 @@ #ifndef __TRACE_H #define __TRACE_H
- -#ifdef __PRE_RAM__ - -#define DISABLE_TRACE -#define ENABLE_TRACE -#define DISABLE_TRACE_ON_FUNCTION - -#else /* !__PRE_RAM__ */ - -#if CONFIG(TRACE) && !defined(__SMM__) +#if !ENV_ROMSTAGE_OR_BEFORE && CONFIG(TRACE)
void __cyg_profile_func_enter(void *, void *) __attribute__((no_instrument_function)); @@ -46,5 +37,5 @@ #define DISABLE_TRACE_ON_FUNCTION
#endif -#endif + #endif