diff options
author | Sachin Gupta <sgupta2m@in.ibm.com> | 2016-01-29 04:44:03 -0600 |
---|---|---|
committer | AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com> | 2016-03-16 08:49:45 -0400 |
commit | ef20438c35a75c8f1369ec229ab6453b6736be81 (patch) | |
tree | 128ac1f02c920f05351a5412e8c87e74856bdecf /sbe/sbefw/sbeXipUtils.H | |
parent | aa9944c7e4b268a458f1f28478d9772edf8af2d8 (diff) | |
download | talos-sbe-ef20438c35a75c8f1369ec229ab6453b6736be81.tar.gz talos-sbe-ef20438c35a75c8f1369ec229ab6453b6736be81.zip |
HBBL input support
Change-Id: I9335651edfded154bffea166c92cc3007efe0ef9
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/11680
Tested-by: Jenkins Server
Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'sbe/sbefw/sbeXipUtils.H')
-rw-r--r-- | sbe/sbefw/sbeXipUtils.H | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sbe/sbefw/sbeXipUtils.H b/sbe/sbefw/sbeXipUtils.H new file mode 100644 index 00000000..c77b60c1 --- /dev/null +++ b/sbe/sbefw/sbeXipUtils.H @@ -0,0 +1,40 @@ +#ifndef SBE_XIP_UTILS_H +#define SBE_XIP_UTILS_H + +#include "p9_xip_image.h" +#include "ppe42_scom.h" // for PPE_STVD +#include "sbe_link.H" // for SBE_BASE_ORIGIN, SBE_SEEPROM_BASE_ORIGIN + +// Unconditional jump to a memory location +#define JUMP_TO_ADDR(VAL ) \ +{ \ +asm volatile ( \ + "mtlr %0 \n\t" \ + : \ + : "r" (VAL)); \ +asm volatile ( \ + "blr \n\t" \ + : \ + );\ +} + +// PIBMEM start address +const uint32_t g_pibMemAddr = SBE_BASE_ORIGIN; +// SEEPROM start address +const uint32_t g_headerAddr = SBE_SEEPROM_BASE_ORIGIN; +// IVPR register address +const uint32_t g_ivprLoc = 0xC0000160; + +// Get XIP image header +inline P9XipHeader * getXipHdr() +{ + P9XipHeader *hdr = (P9XipHeader *)( g_headerAddr ); + return hdr; +} + +// Get Section start addess +inline uint8_t * getSectionAddr( P9XipSection * i_section ) +{ + return ( (uint8_t *)( g_headerAddr + i_section->iv_offset)); +} +#endif // SBE_XIP_UTILS_H |