diff options
-rw-r--r-- | src/bootloader/bootloader.C | 1 | ||||
-rw-r--r-- | src/include/bootloader/bootloader_trace.H | 4 | ||||
-rw-r--r-- | src/usr/pnor/HBconfig | 17 | ||||
-rw-r--r-- | src/usr/pnor/pnor_utils.H | 11 | ||||
-rw-r--r-- | src/usr/pnor/sfcdd.C | 4 |
5 files changed, 28 insertions, 9 deletions
diff --git a/src/bootloader/bootloader.C b/src/bootloader/bootloader.C index 8f63ae925..4cca0d827 100644 --- a/src/bootloader/bootloader.C +++ b/src/bootloader/bootloader.C @@ -71,6 +71,7 @@ namespace Bootloader{ // Initialization bootloader_trace_index = 0; BOOTLOADER_TRACE(BTLDR_TRC_MAIN_START); + g_blScratchSpace = reinterpret_cast<uint8_t*>(HBBL_SCRATCH_SPACE_ADDR); // Set variables needed for getting location of HB base code diff --git a/src/include/bootloader/bootloader_trace.H b/src/include/bootloader/bootloader_trace.H index 234bb782c..8f8ab8da3 100644 --- a/src/include/bootloader/bootloader_trace.H +++ b/src/include/bootloader/bootloader_trace.H @@ -129,10 +129,10 @@ enum BootloaderTraces /** Bootloader Utils parseEntries invalid section */ BTLDR_TRC_UTILS_PARSE_INVALID_SECTION = 0xE7, - /** Bootloader main getHBBSection returned */ + /** Bootloader main getHBBSection returned error */ BTLDR_TRC_MAIN_GETHBBSECTION_FAIL = 0xF0, - /** Bootloader main removeECC returned */ + /** Bootloader main removeECC returned error */ BTLDR_TRC_MAIN_REMOVEECC_FAIL = 0xF1, /** Bootloader PNOR Access readTOC checkForNullBuffer null buffer */ diff --git a/src/usr/pnor/HBconfig b/src/usr/pnor/HBconfig index fdbd50725..0157eb2c8 100644 --- a/src/usr/pnor/HBconfig +++ b/src/usr/pnor/HBconfig @@ -35,12 +35,25 @@ config ALLOW_MACRONIX_PNOR config PNOR_IS_32MB default n + depends on !PNOR_IS_128MB && !PNOR_IS_64MB help - Size of the attached flash chip is 32MB, if not set then 64MB is default + Size of the attached flash chip is 32MB + +config PNOR_IS_64MB + default y + depends on !PNOR_IS_32MB && !PNOR_IS_128MB + help + Size of the attached flash chip is 64MB + +config PNOR_IS_128MB + default n + depends on !PNOR_IS_32MB && !PNOR_IS_64MB + help + Size of the attached flash chip is 128MB config PNOR_TWO_SIDE_SUPPORT default n - depends on !PNOR_IS_32MB + depends on PNOR_IS_128MB help This is used to turn on/off two sided pnor support diff --git a/src/usr/pnor/pnor_utils.H b/src/usr/pnor/pnor_utils.H index 94109044d..b314336ae 100644 --- a/src/usr/pnor/pnor_utils.H +++ b/src/usr/pnor/pnor_utils.H @@ -29,7 +29,7 @@ #include <pnor/pnor_const.H> #include "limits.h" #include "ffs.h" - +#include <config.h> /** @file pnor_utils.H * @brief Provides the utility functions used by different PNOR @@ -87,11 +87,14 @@ enum pnorUtilErrorCodes enum { LPC_TOP_OF_FLASH_OFFSET = 0x0FFFFFFF, -#ifdef CONFIG_PNOR_IS_32MB - PNOR_SIZE = 32*MEGABYTE, -#else //default to 64MB +#ifdef CONFIG_PNOR_IS_128MB + PNOR_SIZE = 128*MEGABYTE, +#elif defined CONFIG_PNOR_IS_64MB PNOR_SIZE = 64*MEGABYTE, +#elif defined CONFIG_PNOR_IS_32MB + PNOR_SIZE = 32*MEGABYTE, #endif + //The direct offset value must be equal to <top of flash>-<pnor size>+1 // for the SBE to work so we can rely on that same assertion /**< Offset to direct read space, from FW base */ diff --git a/src/usr/pnor/sfcdd.C b/src/usr/pnor/sfcdd.C index 0aad547c1..5e01dbb27 100644 --- a/src/usr/pnor/sfcdd.C +++ b/src/usr/pnor/sfcdd.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -41,6 +41,7 @@ #include <lpc/lpcif.H> #include "sfcdd.H" #include "norflash.H" +#include "pnor_utils.H" /*****************************************************************************/ @@ -73,6 +74,7 @@ SfcDD::SfcDD( errlHndl_t& o_err, , iv_eraseSizeBytes(4*KILOBYTE) //default to 4KB blocks { o_err = NULL; + TRACFCOMP( g_trac_pnor, "LPC_SFC_MMIO_OFFSET=%.8X", PNOR::LPC_SFC_MMIO_OFFSET ); } /** |