summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H20
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_ringId.H11
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_ring_identification.H16
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_tor.C7
-rw-r--r--src/import/chips/p9/xip/p9_xip_image.c17
-rw-r--r--src/import/chips/p9/xip/p9_xip_image.h6
6 files changed, 56 insertions, 21 deletions
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 <stdint.h>
+#ifdef WIN32
+ #include "win32_stdint.h"
+#else
+ #include <stdint.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -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 <stdint.h>
-#include <stddef.h>
-#include <p9_ring_id.h>
+#ifdef WIN32
+ #include "win32_stdint.h"
+ #include "p9_ring_id.h"
+#else
+ #include <stdint.h>
+ #include <stddef.h>
+ #include <p9_ring_id.h>
+#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 <stddef.h>
-#include <stdint.h>
+#ifdef WIN32
+ #include "win32_stdint.h"
+#else
+ #ifdef __sun
+ #include <sys/int_types.h>
+ #else
+ #include <stdint.h>
+ #endif
+#endif
#include <stdlib.h>
#include <string.h>
#include <p9_ring_id.h>
@@ -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 <endian.h>
+#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 <endian.h>
#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 <stddef.h>
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
-#endif // PLIC_MODULE
-
#include <stddef.h>
-#include <stdint.h>
+#ifdef _WIN32
+ #include "win32_stdint.h"
+ #include "endian.h"
+#else
+ #include <stdint.h>
+ #include <endian.h>
+#endif
#include <stdlib.h>
#include <string.h>
-#include <endian.h>
#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 <stddef.h>
+#ifdef _WIN32
+#include "win32_stdint.h"
+#else
#include <stdint.h>
+#endif
+#include <stddef.h>
#ifdef __cplusplus
extern "C" {
OpenPOWER on IntegriCloud