From c719cebbacda8ee31cbbe6118ef4dd84f7521371 Mon Sep 17 00:00:00 2001 From: Sarat Chand Savitala Date: Fri, 20 Feb 2015 13:15:27 +0530 Subject: [PATCH] sw_apps:zynqmp_fsbl: Change in FSBL banner FSBL banner is changed and is displayed independent of debug level Signed-off-by: Sarat Chand Savitala --- lib/sw_apps/zynqmp_fsbl/src/xfsbl_config.h | 29 ++++++++++++++-------- lib/sw_apps/zynqmp_fsbl/src/xfsbl_debug.h | 17 ++++++++----- lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.c | 8 +++--- lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.h | 6 +++-- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_config.h b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_config.h index 643b9fb6..7fcf7ce3 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_config.h +++ b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_config.h @@ -67,24 +67,33 @@ extern "C" { /** * @name FSBL Debug options * - * FSBL by default doesn't have any prints enabled. If user - * want to enable the prints, they can define the following - * options to have FSBL prints + * FSBL supports an unconditional print + * - FSBL_PRINT Used to print FSBL header and any mandatory prints + * Hence FSBL_PRINT_VAL should always be 1 + * Further FSBL by default doesn't have any debug prints enabled. If user + * want to enable the debug prints, they can define the following + * options * FSBL supports three types of debug levels. - * - FSBL_DEBUG Defining this will print the FSBL header and - * same basic information and error prints if any - * - FSBL_DEBUG_INFO Defining this will have prints enabled with - * in addition to the basic information + * - FSBL_DEBUG Defining this will print basic information and + * error prints if any + * - FSBL_DEBUG_INFO Defining this will have prints enabled with format + * specifiers in addition to the basic information * - FSBL_DEBUG_DETAILED Defining this will print information with * all data exchanged. */ -#define FSBL_DEBUG_VAL (0U) -#define FSBL_DEBUG_INFO_VAL (1U) -#define FSBL_DEBUG_DETAILED_VAL (0U) +#define FSBL_PRINT_VAL (1U) +#define FSBL_DEBUG_VAL (0U) +#define FSBL_DEBUG_INFO_VAL (1U) +#define FSBL_DEBUG_DETAILED_VAL (0U) /** * FSBL Debug options */ + +#if FSBL_PRINT_VAL +#define FSBL_PRINT +#endif + #if FSBL_DEBUG_VAL #define FSBL_DEBUG #endif diff --git a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_debug.h b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_debug.h index 7deef97f..f3356ac3 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_debug.h +++ b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_debug.h @@ -74,16 +74,21 @@ extern "C" { /** * Debug levels for FSBL */ -#define DEBUG_GENERAL (0x00000001U) /* general debug messages */ -#define DEBUG_INFO (0x00000002U) /* More debug information */ -#define DEBUG_DETAILED (0x00000004U) /* More debug information */ +#define DEBUG_PRINT_ALWAYS (0x00000001U) /* unconditional messages */ +#define DEBUG_GENERAL (0x00000002U) /* general debug messages */ +#define DEBUG_INFO (0x00000004U) /* More debug information */ +#define DEBUG_DETAILED (0x00000008U) /* More debug information */ #if defined (FSBL_DEBUG_DETAILED) -#define XFsblDbgCurrentTypes ((DEBUG_DETAILED) | (DEBUG_INFO) | (DEBUG_GENERAL)) +#define XFsblDbgCurrentTypes ((DEBUG_DETAILED) | (DEBUG_INFO) | \ + (DEBUG_GENERAL) | (DEBUG_PRINT_ALWAYS)) #elif defined (FSBL_DEBUG_INFO) -#define XFsblDbgCurrentTypes ((DEBUG_INFO) | (DEBUG_GENERAL)) +#define XFsblDbgCurrentTypes ((DEBUG_INFO) | (DEBUG_GENERAL) | \ + (DEBUG_PRINT_ALWAYS)) #elif defined (FSBL_DEBUG) -#define XFsblDbgCurrentTypes (DEBUG_GENERAL) +#define XFsblDbgCurrentTypes ((DEBUG_GENERAL) | (DEBUG_PRINT_ALWAYS)) +#elif defined (FSBL_PRINT) +#define XFsblDbgCurrentTypes (PRINT_ALWAYS) #else #define XFsblDbgCurrentTypes (0U) #endif diff --git a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.c b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.c index 96b68004..68ac27dd 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.c +++ b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.c @@ -283,9 +283,11 @@ void XFsbl_PrintFsblBanner(void ) /** * Print the FSBL Banner */ - XFsbl_Printf(DEBUG_GENERAL,"Xilinx First Stage Boot Loader \n\r"); - XFsbl_Printf(DEBUG_GENERAL,"Release SW Beta1 %s-%s\r\n", - __DATE__,__TIME__); + XFsbl_Printf(DEBUG_PRINT_ALWAYS, + "Xilinx Zynq MP First Stage Boot Loader \n\r"); + XFsbl_Printf(DEBUG_PRINT_ALWAYS, + "Release %d.%d SW Beta2 %s - %s\r\n", + SDK_RELEASE_YEAR, SDK_RELEASE_QUARTER,__DATE__,__TIME__); /** * Print the platform */ diff --git a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.h b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.h index f6a9daa5..878d639e 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.h +++ b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_main.h @@ -95,8 +95,10 @@ typedef struct { /***************** Macros (Inline Functions) Definitions *********************/ -#define XFSBL_RELEASE_YEAR 2014 -#define XFSBL_RELEASE_VERSION 3 + +/* SDK release version */ +#define SDK_RELEASE_YEAR 2015 +#define SDK_RELEASE_QUARTER 1 #define XFSBL_RUNNING (0xFFFFU) #define XFSBL_COMPLETED (0x0U)