[coreboot-gerrit] Patch set updated for coreboot: AGESA: Use printk for IDS output
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Thu Mar 2 15:30:37 CET 2017
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15320
-gerrit
commit cb7cc6c13dce5cd5caa33e7c4aa3809994c468c3
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Wed Jun 22 22:50:10 2016 +0300
AGESA: Use printk for IDS output
In all simplicity, with OptionsIds.c under mainboard
directory set to:
IDSOPT_IDS_ENABLED TRUE
IDSOPT_TRACING_ENABLED TRUE
And in src/Kconfig
config WARNINGS_ARE_ERRORS
default n
With these settings AGESA outputs complete debugging log
where-ever you have your coreboot console configured.
Change-Id: Ie5c0de6358b294160f9bf0a202161722f88059c1
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/vendorcode/amd/agesa/f14/Include/Ids.h | 16 ++++-----------
src/vendorcode/amd/agesa/f15/Include/Ids.h | 29 +++++-----------------------
src/vendorcode/amd/agesa/f15tn/Include/Ids.h | 12 ++++--------
src/vendorcode/amd/agesa/f16kb/Include/Ids.h | 16 ++++-----------
4 files changed, 17 insertions(+), 56 deletions(-)
diff --git a/src/vendorcode/amd/agesa/f14/Include/Ids.h b/src/vendorcode/amd/agesa/f14/Include/Ids.h
index 451c4d6..7637aa7 100644
--- a/src/vendorcode/amd/agesa/f14/Include/Ids.h
+++ b/src/vendorcode/amd/agesa/f14/Include/Ids.h
@@ -561,19 +561,11 @@ typedef enum { //vv- for debug reference only
#define IDS_HDT_CONSOLE_S3_EXIT(x)
#define IDS_HDT_CONSOLE_S3_AP_EXIT(x)
- #if IDSOPT_C_OPTIMIZATION_DISABLED == TRUE
- #ifdef __GNUC__
- #define IDS_HDT_CONSOLE(f, s, ...)
- #else
- #define IDS_HDT_CONSOLE(f, s, ...)
- #endif
+ #ifndef __GNUC__
+ #pragma warning(disable: 4127)
+ #define IDS_HDT_CONSOLE(f, s, ...)
#else
- #ifndef __GNUC__
- #pragma warning(disable: 4127)
- #define IDS_HDT_CONSOLE(f, s, ...)
- #else
- #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
- #endif
+ #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
#endif
#define IDS_HDT_CONSOLE_FLUSH_BUFFER(x)
diff --git a/src/vendorcode/amd/agesa/f15/Include/Ids.h b/src/vendorcode/amd/agesa/f15/Include/Ids.h
index 07ceeaf..380cb55 100644
--- a/src/vendorcode/amd/agesa/f15/Include/Ids.h
+++ b/src/vendorcode/amd/agesa/f15/Include/Ids.h
@@ -530,30 +530,11 @@ typedef enum { //vv- for debug reference only
#define IDS_HDT_CONSOLE_S3_EXIT(x)
#define IDS_HDT_CONSOLE_S3_AP_EXIT(x)
- #ifdef __GNUC__
- #if CONFIG_REDIRECT_IDS_HDT_CONSOLE_TO_SERIAL
- /* print all*/
- //#define IDS_HDT_CONSOLE(f, s, args...) do {do_printk(BIOS_DEBUG, s, ##args);} while (0)
- #define IDS_HDT_CONSOLE(f, s, args...) do {\
- if (f == MAIN_FLOW) {\
- do_printk(BIOS_DEBUG, s, ##args);\
- } else if (f == MEM_FLOW) {\
- do_printk(BIOS_DEBUG, s, ##args);\
- } else if (f == CPU_TRACE) {\
- do_printk(BIOS_DEBUG, s, ##args);\
- } else if (f == HT_TRACE) {\
- do_printk(BIOS_DEBUG, s, ##args);\
- } else if (f == GNB_TRACE) {\
- do_printk(BIOS_DEBUG, s, ##args);\
- } else if (f == FCH_TRACE) {\
- do_printk(BIOS_DEBUG, s, ##args);\
- }\
- } while(0)
- #else
- #define IDS_HDT_CONSOLE(s, args...) do {} while(0)
- #endif
- #else
- #define IDS_HDT_CONSOLE(s, args...)
+ #ifndef __GNUC__
+ #pragma warning(disable: 4127)
+ #define IDS_HDT_CONSOLE(f, s, ...)
+ #else
+ #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
#endif
#define IDS_HDT_CONSOLE_FLUSH_BUFFER(x)
diff --git a/src/vendorcode/amd/agesa/f15tn/Include/Ids.h b/src/vendorcode/amd/agesa/f15tn/Include/Ids.h
index b2cf9f3..52b1824 100644
--- a/src/vendorcode/amd/agesa/f15tn/Include/Ids.h
+++ b/src/vendorcode/amd/agesa/f15tn/Include/Ids.h
@@ -730,15 +730,11 @@ typedef enum { //vv- for debug reference only
#endif
#else
#ifdef VA_ARGS_SUPPORTED
- #if IDSOPT_C_OPTIMIZATION_DISABLED == TRUE
- #define IDS_HDT_CONSOLE(f, s, ...) AmdIdsDebugPrint (f, s, __VA_ARGS__)
- #else
+ #ifndef __GNUC__
#pragma warning(disable: 4127)
- #define IDS_HDT_CONSOLE(f, s, ...) if (f == MEM_FLOW) AmdIdsDebugPrintMem (s, __VA_ARGS__); \
- else if (f == CPU_TRACE) AmdIdsDebugPrintCpu (s, __VA_ARGS__); \
- else if (f == HT_TRACE) AmdIdsDebugPrintHt (s, __VA_ARGS__); \
- else if (f == GNB_TRACE) AmdIdsDebugPrintGnb (s, __VA_ARGS__); \
- else AmdIdsDebugPrint (f, s, __VA_ARGS__)
+ #define IDS_HDT_CONSOLE(f, s, ...)
+ #else
+ #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
#endif
#else
#define IDS_HDT_CONSOLE AmdIdsDebugPrint
diff --git a/src/vendorcode/amd/agesa/f16kb/Include/Ids.h b/src/vendorcode/amd/agesa/f16kb/Include/Ids.h
index 53477cb..aa0ec05 100644
--- a/src/vendorcode/amd/agesa/f16kb/Include/Ids.h
+++ b/src/vendorcode/amd/agesa/f16kb/Include/Ids.h
@@ -737,19 +737,11 @@ typedef enum { //vv- for debug reference only
/// AGESA tracing service
#if IDSOPT_TRACING_ENABLED == TRUE
- #ifdef VA_ARGS_SUPPORTED
- #if IDSOPT_C_OPTIMIZATION_DISABLED == TRUE
- #define IDS_HDT_CONSOLE(f, s, ...) AmdIdsDebugPrint (f, s, __VA_ARGS__)
- #else
- #pragma warning(disable: 4127)
- #define IDS_HDT_CONSOLE(f, s, ...) if (f == MEM_FLOW) AmdIdsDebugPrintMem (s, __VA_ARGS__); \
- else if (f == CPU_TRACE) AmdIdsDebugPrintCpu (s, __VA_ARGS__); \
- else if (f == HT_TRACE) AmdIdsDebugPrintHt (s, __VA_ARGS__); \
- else if (f == GNB_TRACE) AmdIdsDebugPrintGnb (s, __VA_ARGS__); \
- else AmdIdsDebugPrint (f, s, __VA_ARGS__)
- #endif
+ #ifndef __GNUC__
+ #pragma warning(disable: 4127)
+ #define IDS_HDT_CONSOLE(f, s, ...)
#else
- #define IDS_HDT_CONSOLE AmdIdsDebugPrint
+ #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
#endif
#define CONSOLE AmdIdsDebugPrintAll
#define IDS_HDT_CONSOLE_DEBUG_CODE(Code) Code
More information about the coreboot-gerrit
mailing list