AGESA: Use printk for IDS output
In all simplicity, with board/OptionsIds.h file having: IDSOPT_IDS_ENABLED TRUE IDSOPT_TRACING_ENABLED TRUE And src/Kconfig modified to: 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@gmail.com> Reviewed-on: https://review.coreboot.org/15320 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
		@@ -561,19 +561,11 @@ typedef enum {                        //vv- for debug reference only
 | 
				
			|||||||
    #define IDS_HDT_CONSOLE_S3_EXIT(x)
 | 
					    #define IDS_HDT_CONSOLE_S3_EXIT(x)
 | 
				
			||||||
    #define IDS_HDT_CONSOLE_S3_AP_EXIT(x)
 | 
					    #define IDS_HDT_CONSOLE_S3_AP_EXIT(x)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #if IDSOPT_C_OPTIMIZATION_DISABLED == TRUE
 | 
					    #ifndef __GNUC__
 | 
				
			||||||
      #ifdef __GNUC__
 | 
					      #pragma warning(disable: 4127)
 | 
				
			||||||
        #define IDS_HDT_CONSOLE(f, s, ...)
 | 
					      #define IDS_HDT_CONSOLE(f, s, ...)
 | 
				
			||||||
      #else
 | 
					 | 
				
			||||||
        #define IDS_HDT_CONSOLE(f, s, ...)
 | 
					 | 
				
			||||||
      #endif
 | 
					 | 
				
			||||||
    #else
 | 
					    #else
 | 
				
			||||||
      #ifndef __GNUC__
 | 
					      #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
 | 
				
			||||||
        #pragma warning(disable: 4127)
 | 
					 | 
				
			||||||
        #define IDS_HDT_CONSOLE(f, s, ...)
 | 
					 | 
				
			||||||
	  #else
 | 
					 | 
				
			||||||
		#define IDS_HDT_CONSOLE(f, s, ...)        printk (BIOS_DEBUG, s, ##__VA_ARGS__);
 | 
					 | 
				
			||||||
      #endif
 | 
					 | 
				
			||||||
    #endif
 | 
					    #endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #define IDS_HDT_CONSOLE_FLUSH_BUFFER(x)
 | 
					    #define IDS_HDT_CONSOLE_FLUSH_BUFFER(x)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -530,30 +530,11 @@ typedef enum {                        //vv- for debug reference only
 | 
				
			|||||||
    #define IDS_HDT_CONSOLE_S3_EXIT(x)
 | 
					    #define IDS_HDT_CONSOLE_S3_EXIT(x)
 | 
				
			||||||
    #define IDS_HDT_CONSOLE_S3_AP_EXIT(x)
 | 
					    #define IDS_HDT_CONSOLE_S3_AP_EXIT(x)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      #ifdef __GNUC__
 | 
					    #ifndef __GNUC__
 | 
				
			||||||
        #if CONFIG_REDIRECT_IDS_HDT_CONSOLE_TO_SERIAL
 | 
					      #pragma warning(disable: 4127)
 | 
				
			||||||
		/* print all*/
 | 
					      #define IDS_HDT_CONSOLE(f, s, ...)
 | 
				
			||||||
		//#define IDS_HDT_CONSOLE(f, s, args...) do {do_printk(BIOS_DEBUG, s, ##args);} while (0)
 | 
					    #else
 | 
				
			||||||
		#define IDS_HDT_CONSOLE(f, s, args...) do {\
 | 
					      #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
 | 
				
			||||||
			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...)
 | 
					 | 
				
			||||||
    #endif
 | 
					    #endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #define IDS_HDT_CONSOLE_FLUSH_BUFFER(x)
 | 
					    #define IDS_HDT_CONSOLE_FLUSH_BUFFER(x)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -729,19 +729,11 @@ typedef enum {                        //vv- for debug reference only
 | 
				
			|||||||
      #define IDS_HDT_CONSOLE_EXIT(x)           IDSOPT_CUSTOMIZE_TRACING_SERVICE_EXIT (x)
 | 
					      #define IDS_HDT_CONSOLE_EXIT(x)           IDSOPT_CUSTOMIZE_TRACING_SERVICE_EXIT (x)
 | 
				
			||||||
    #endif
 | 
					    #endif
 | 
				
			||||||
  #else
 | 
					  #else
 | 
				
			||||||
    #ifdef VA_ARGS_SUPPORTED
 | 
					    #ifndef __GNUC__
 | 
				
			||||||
      #if IDSOPT_C_OPTIMIZATION_DISABLED == TRUE
 | 
					      #pragma warning(disable: 4127)
 | 
				
			||||||
        #define IDS_HDT_CONSOLE(f, s, ...)        AmdIdsDebugPrint (f, s, __VA_ARGS__)
 | 
					      #define IDS_HDT_CONSOLE(f, s, ...)
 | 
				
			||||||
      #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
 | 
					 | 
				
			||||||
    #else
 | 
					    #else
 | 
				
			||||||
      #define IDS_HDT_CONSOLE    AmdIdsDebugPrint
 | 
					      #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
 | 
				
			||||||
    #endif
 | 
					    #endif
 | 
				
			||||||
    #define CONSOLE            AmdIdsDebugPrintAll
 | 
					    #define CONSOLE            AmdIdsDebugPrintAll
 | 
				
			||||||
  #endif
 | 
					  #endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -737,19 +737,11 @@ typedef enum {                        //vv- for debug reference only
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/// AGESA tracing service
 | 
					/// AGESA tracing service
 | 
				
			||||||
#if IDSOPT_TRACING_ENABLED == TRUE
 | 
					#if IDSOPT_TRACING_ENABLED == TRUE
 | 
				
			||||||
  #ifdef VA_ARGS_SUPPORTED
 | 
					  #ifndef __GNUC__
 | 
				
			||||||
    #if IDSOPT_C_OPTIMIZATION_DISABLED == TRUE
 | 
					    #pragma warning(disable: 4127)
 | 
				
			||||||
      #define IDS_HDT_CONSOLE(f, s, ...)        AmdIdsDebugPrint (f, s, __VA_ARGS__)
 | 
					    #define IDS_HDT_CONSOLE(f, s, ...)
 | 
				
			||||||
    #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
 | 
					 | 
				
			||||||
  #else
 | 
					  #else
 | 
				
			||||||
    #define IDS_HDT_CONSOLE    AmdIdsDebugPrint
 | 
					    #define IDS_HDT_CONSOLE(f, s, ...) printk (BIOS_DEBUG, s, ##__VA_ARGS__);
 | 
				
			||||||
  #endif
 | 
					  #endif
 | 
				
			||||||
  #define CONSOLE            AmdIdsDebugPrintAll
 | 
					  #define CONSOLE            AmdIdsDebugPrintAll
 | 
				
			||||||
  #define IDS_HDT_CONSOLE_DEBUG_CODE(Code)  Code
 | 
					  #define IDS_HDT_CONSOLE_DEBUG_CODE(Code)  Code
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user