From 6f8b085ed6ce50b4d835db4c277ba84f2117d92e Mon Sep 17 00:00:00 2001 From: Claus Michael Olsen Date: Sun, 11 Sep 2016 12:12:09 -0500 Subject: xip_customize: MVPD compatible file set. Change-Id: Ib3b7aeb8045a28ca05d33370c1ef1dcb9ba1fb64 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29448 Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Martin Gloff Reviewed-by: Michael C. Sgro Reviewed-by: Martin Peschke Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29449 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Sachin Gupta --- .../chips/p9/utils/imageProcs/p9_infrastruct_help.H | 20 +++++++++++++++----- src/import/chips/p9/utils/imageProcs/p9_ringId.H | 11 ++++++++--- .../p9/utils/imageProcs/p9_ring_identification.H | 16 ++++++++++++++-- src/import/chips/p9/utils/imageProcs/p9_tor.C | 7 ++++++- src/import/chips/p9/xip/p9_xip_image.c | 17 ++++++++--------- src/import/chips/p9/xip/p9_xip_image.h | 6 +++++- 6 files changed, 56 insertions(+), 21 deletions(-) (limited to 'src/import/chips/p9') diff --git a/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H b/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H index 18ae7cd2..767b9ebb 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H +++ b/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -25,7 +25,11 @@ #ifndef _P9_INFRASTRUCT_HELP_H_ #define _P9_INFRASTRUCT_HELP_H_ -#include +#ifdef WIN32 + #include "win32_stdint.h" +#else + #include +#endif #include #include #include @@ -71,9 +75,15 @@ enum MODEBUILD #define MY_ERR(_fmt_, _args_...) FAPI_INF(_fmt_, ##_args_) #define MY_DBG(_fmt_, _args_...) FAPI_DBG(_fmt_, ##_args_) #else - #define MY_INF(_fmt_, _args_...) printf(_fmt_, ##_args_) - #define MY_ERR(_fmt_, _args_...) printf(_fmt_, ##_args_) - #define MY_DBG(_fmt_, _args_...) printf(_fmt_, ##_args_) + #ifdef WIN32 + #define MY_INF(...) { printf(__VA_ARGS__); } + #define MY_ERR(...) { printf(__VA_ARGS__); } + #define MY_DBG(...) { printf(__VA_ARGS__); } + #else + #define MY_INF(_fmt_, _args_...) printf(_fmt_, ##_args_) + #define MY_ERR(_fmt_, _args_...) printf(_fmt_, ##_args_) + #define MY_DBG(_fmt_, _args_...) printf(_fmt_, ##_args_) + #endif #endif diff --git a/src/import/chips/p9/utils/imageProcs/p9_ringId.H b/src/import/chips/p9/utils/imageProcs/p9_ringId.H index f1cfe749..1b0d1d89 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_ringId.H +++ b/src/import/chips/p9/utils/imageProcs/p9_ringId.H @@ -26,10 +26,15 @@ #ifndef _P9_RINGID_H_ #define _P9_RINGID_H_ -#include -#include -#include +#ifdef WIN32 + #include "win32_stdint.h" + #include "p9_ring_id.h" +#else + #include + #include + #include +#endif // General Ring ID list structure typedef struct diff --git a/src/import/chips/p9/utils/imageProcs/p9_ring_identification.H b/src/import/chips/p9/utils/imageProcs/p9_ring_identification.H index 35ac3538..5782e33d 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_ring_identification.H +++ b/src/import/chips/p9/utils/imageProcs/p9_ring_identification.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,7 +26,15 @@ #ifndef _P9_RING_IDENT_H_ #define _P9_RING_IDENT_H_ #include -#include +#ifdef WIN32 + #include "win32_stdint.h" +#else + #ifdef __sun + #include + #else + #include + #endif +#endif #include #include #include @@ -54,6 +62,10 @@ extern const VPDRingList ALL_VPD_RINGS[]; extern const uint32_t RING_ID_LIST_CHIP_SIZE, RING_ID_LIST_CORE_SIZE, RING_ID_LIST_CME_SIZE, RING_ID_LIST_CC_SIZE; +#if defined(WIN32) || defined(__sun) + extern const RingIdList RING_ID_LIST_PDG[], RING_ID_LIST_PDR[]; + extern const uint32_t RING_ID_LIST_PG_SIZE, RING_ID_LIST_PR_SIZE; +#endif // Enumerated VPD keyword values. // Note! This is DIFFERENT from the MvpdKeyword list in fapiMvpdAccess.H which diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C index f932004c..9ecaba87 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_tor.C +++ b/src/import/chips/p9/utils/imageProcs/p9_tor.C @@ -23,6 +23,12 @@ /* */ /* IBM_PROLOG_END_TAG */ +#ifdef WIN32 + #include "endian.h" +#else + #include +#endif + // IMPORTANT notice on usage of io_RingType and io_instanceId arguments // // io_RingTyp @@ -35,7 +41,6 @@ // While using tor_tor_get_block_of_rings and tor_get_single_ring API, // it is used pass by value // -#include #include "p9_ringId.H" #include "p9_tor.H" #include "p9_xip_image.h" diff --git a/src/import/chips/p9/xip/p9_xip_image.c b/src/import/chips/p9/xip/p9_xip_image.c index ed89d0fe..548acc1a 100644 --- a/src/import/chips/p9/xip/p9_xip_image.c +++ b/src/import/chips/p9/xip/p9_xip_image.c @@ -37,20 +37,19 @@ /// ensure that no memory outside of the putative bounds of the image is ever /// referenced during validation. -#ifndef PLIC_MODULE - #include - #include - #include - #include -#endif // PLIC_MODULE - #include -#include +#ifdef _WIN32 + #include "win32_stdint.h" + #include "endian.h" +#else + #include + #include +#endif #include #include -#include #include "p9_xip_image.h" + //////////////////////////////////////////////////////////////////////////// // Local Functions //////////////////////////////////////////////////////////////////////////// diff --git a/src/import/chips/p9/xip/p9_xip_image.h b/src/import/chips/p9/xip/p9_xip_image.h index 6ec845f8..14143cce 100644 --- a/src/import/chips/p9/xip/p9_xip_image.h +++ b/src/import/chips/p9/xip/p9_xip_image.h @@ -244,8 +244,12 @@ typedef enum { //////////////////////////////////////////////////////////////////////////// #ifndef __ASSEMBLER__ -#include +#ifdef _WIN32 +#include "win32_stdint.h" +#else #include +#endif +#include #ifdef __cplusplus extern "C" { -- cgit v1.2.1