aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-07-12 16:47:54 +0530
committerOliver O'Halloran <oohall@gmail.com>2019-08-15 17:53:56 +1000
commitaa694ea08c0d6350455400e69d266f1dada062c1 (patch)
treea534a1ddf411b6a1c5b00f72f23431965ffacbbb /core
parentfbd875d77f30ee9a713625c3f4400cde06e70ac8 (diff)
downloadskiboot-aa694ea08c0d6350455400e69d266f1dada062c1.zip
skiboot-aa694ea08c0d6350455400e69d266f1dada062c1.tar.gz
skiboot-aa694ea08c0d6350455400e69d266f1dada062c1.tar.bz2
HIOMAP: Reset bmc mbox in MPIPL path
During boot SBE and early hostboot does not use HIOMAP protocol to get image from PNOR. Instead it expects PNOR TOC and Hostboot Boot Loader to be available at particular address in LPC bus. mbox daemon in BMC side takes care of this during normal boot. Once boot is complete mbox daemon switches to normal mode. During normal reboot, BMC side mbox daemon gets notification and takes care of loading PNOR TOC and HBBL to LPC bus again. In MPIPL path, OPAL calls SBE S0 interrupt to initiate MPIPL. BMC will not be aware of this. But SBE expects PNOR TOC and HBBL to be available in LPC bus at predefined address. Hence call HIOMAP Reset from OPAL in assert path. This needs working LPC and IPMI driver in OPAL. If we have issue in these drivers then we may not be able to reset BMC MBOX properly. Hence MPIPL may fail. We have to live with this until we find a way to intiate BMC on MPIPL. CC: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> [oliver: rebased] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/flash.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/flash.c b/core/flash.c
index 203b695..bfa4a72 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -15,6 +15,7 @@
#include <device.h>
#include <libflash/libflash.h>
#include <libflash/libffs.h>
+#include <libflash/ipmi-hiomap.h>
#include <libflash/blocklevel.h>
#include <libflash/ecc.h>
#include <libstb/secureboot.h>
@@ -79,6 +80,17 @@ void flash_release(void)
unlock(&flash_lock);
}
+bool flash_unregister(void)
+{
+ struct blocklevel_device *bl = system_flash->bl;
+
+ if (bl->exit)
+ return bl->exit(bl);
+
+ prlog(PR_NOTICE, "FLASH: Unregister flash device is not supported\n");
+ return true;
+}
+
static int flash_nvram_info(uint32_t *total_size)
{
int rc;