From b4eb096bd19d6b4aee4aa87424818bff1d5605eb Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 7 Apr 2017 16:39:53 +1000 Subject: pnor: Add AST Mailbox protocol support This adds a new alternative PnorDD that uses the Asped AST Mbox protocol as supported by OpenBMC. To enable this, you need these changes to the config: @@ -1,10 +1,12 @@ -# The Serial Flash Controller is the AST2400 BMC. -set SFC_IS_AST2500 +# We use BMC MBOX protocol for flash accesses +set PNORDD_IS_BMCMBOX +unset PNORDD_IS_SFC +unset SFC_IS_AST2500 unset SFC_IS_AST2400 unset BMC_DOES_SFC_INIT unset SFC_IS_IBM_DPSS -set ALLOW_MICRON_PNOR -set ALLOW_MACRONIX_PNOR +unset ALLOW_MICRON_PNOR +unset ALLOW_MACRONIX_PNOR Other systems need to set PNORDD_IS_SFC Change-Id: I8901288c98d8d0fce8c9a0fb31267f0001b2a731 Not-yet-signed-off-by: Benjamin Herrenschmidt RTC: 170096 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39387 Tested-by: Jenkins Server Reviewed-by: Dean Sanner Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell Reviewed-by: Matthew A. Ploetz --- src/include/usr/lpc/lpcif.H | 1 - src/include/usr/pnor/pnor_const.H | 8 ++++++++ src/include/usr/pnor/pnor_reasoncodes.H | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/usr/lpc/lpcif.H b/src/include/usr/lpc/lpcif.H index 54368c41d..b09297a5e 100644 --- a/src/include/usr/lpc/lpcif.H +++ b/src/include/usr/lpc/lpcif.H @@ -44,7 +44,6 @@ enum TransType { TRANS_LAST //Invalid, used for looping and tests }; - /** * @brief Create/delete software objects to support non-master access * diff --git a/src/include/usr/pnor/pnor_const.H b/src/include/usr/pnor/pnor_const.H index f9220ed93..ef9478567 100644 --- a/src/include/usr/pnor/pnor_const.H +++ b/src/include/usr/pnor/pnor_const.H @@ -75,6 +75,14 @@ enum SectionId INVALID_SECTION = NUM_SECTIONS, }; +enum PnorMode_t { + MODEL_UNKNOWN, /**< Invalid */ + MODEL_MEMCPY, /**< No LPC logic, just do memcpy into cache area */ + MODEL_LPC_MEM, /**< Break into 32-bit LPC ops but use fake-PNOR */ + MODEL_REAL_CMD, /**< Code for real HW using Command based reads */ + MODEL_REAL_MMIO, /**< Code for real hardware using MMIO reads */ +}; + /** * Information about a section of PNOR */ diff --git a/src/include/usr/pnor/pnor_reasoncodes.H b/src/include/usr/pnor/pnor_reasoncodes.H index b7fd96bee..f01291a24 100644 --- a/src/include/usr/pnor/pnor_reasoncodes.H +++ b/src/include/usr/pnor/pnor_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2016 */ +/* Contributors Listed Below - COPYRIGHT 2011,2017 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -108,6 +108,9 @@ namespace PNOR MOD_PNORRP_LOADSECURESECTION = 0xD6, /**< PnorRP::loadSecureSection */ MOD_SPNORRP_BASE_EXT_VER_CHK = 0xD7, /**< SPnorRP::baseExtVersCheck */ MOD_SPNORRP_KEY_TRAN_CHK = 0xD8, /**< SPnorRP::keyTransitionCheck */ + + // ast_mboxdd.C + MOD_ASTMBOXDD_DO_MESSAGE = 0xE0, /**< astMbox::doMessage */ }; enum PNORReasonCode @@ -172,7 +175,8 @@ namespace PNOR RC_BASE_EXT_MISMATCH = PNOR_COMP_ID | 0x2F, RC_KEY_TRAN_FLAG_UNSET = PNOR_COMP_ID | 0x30, RC_BAD_SECURE_MAGIC_NUM = PNOR_COMP_ID | 0x31, - + RC_MBOX_BAD_SEQUENCE = PNOR_COMP_ID | 0x32, + RC_MBOX_ERROR_STATUS = PNOR_COMP_ID | 0x33, //@fixme-RTC:131607-Temporary value to allow HWSV compile //termination_rc -- cgit v1.2.3