summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorMartin Peschke <mpeschke@de.ibm.com>2016-05-22 17:30:35 +0200
committerSachin Gupta <sgupta2m@in.ibm.com>2016-09-26 13:32:59 -0400
commit94f7bbb663ffeb7eb84796cc839a0fad0e5eb4bb (patch)
treeeb0dab01afb12804d7c9ac0de1a4b3e910855897 /src/import
parent956c983cafa9181f22e6c55159de280009a97efa (diff)
downloadtalos-sbe-94f7bbb663ffeb7eb84796cc839a0fad0e5eb4bb.tar.gz
talos-sbe-94f7bbb663ffeb7eb84796cc839a0fad0e5eb4bb.zip
p9_infrastruct_help: cleaning up endianess conversion
Use system header endian.h routines to do endianess conversion instead of own routines. Change-Id: I2d433154f6bb05c69371f832f879f1c2b3cd028a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24902 Tested-by: Jenkins Server Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Tested-by: Hostboot CI Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30302 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H63
1 files changed, 0 insertions, 63 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 43591cb5..ca8d73de 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H
+++ b/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H
@@ -47,69 +47,6 @@ const uint32_t FIXED_RING_BUF_SIZE =
#define MY_DBG(_fmt_, _args_...) printf(_fmt_, ##_args_)
-// Byte-reverse a 32-bit integer
-inline uint32_t myRev32(const uint32_t i_x)
-{
- uint32_t rx;
-
-#ifdef _BIG_ENDIAN
- rx = i_x;
-#else
- uint8_t* pix = (uint8_t*)(&i_x);
- uint8_t* prx = (uint8_t*)(&rx);
-
- prx[0] = pix[3];
- prx[1] = pix[2];
- prx[2] = pix[1];
- prx[3] = pix[0];
-#endif
-
- return rx;
-}
-
-// Byte-reverse a 64-bit integer
-inline uint64_t myRev64(const uint64_t i_x)
-{
- uint64_t rx;
-
-#ifdef _BIG_ENDIAN
- rx = i_x;
-#else
- uint8_t* pix = (uint8_t*)(&i_x);
- uint8_t* prx = (uint8_t*)(&rx);
-
- prx[0] = pix[7];
- prx[1] = pix[6];
- prx[2] = pix[5];
- prx[3] = pix[4];
- prx[4] = pix[3];
- prx[5] = pix[2];
- prx[6] = pix[1];
- prx[7] = pix[0];
-#endif
-
- return rx;
-}
-
-
-// Byte-reverse a 16-bit integer if on an LE machine
-inline uint16_t myRev16(const uint16_t i_x)
-{
- uint16_t rx;
-
-#ifdef _BIG_ENDIAN
- rx = i_x;
-#else
- uint8_t* pix = (uint8_t*)(&i_x);
- uint8_t* prx = (uint8_t*)(&rx);
-
- prx[0] = pix[1];
- prx[1] = pix[0];
-#endif
-
- return rx;
-}
-
// N-byte align an address, offset or size (aos)
inline uint64_t myByteAlign( const uint8_t nBytes, const uint64_t aos)
{
OpenPOWER on IntegriCloud