summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime/fakepayload.C
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-04-09 15:49:37 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-17 15:34:49 -0500
commit198ccaf1e562c281684e47a2209b7ce29c9c71e6 (patch)
treef75d9769bafb3efb814d0149a7971261ab450dab /src/usr/runtime/fakepayload.C
parent06d989d45066a28d149f15a45301346101eb1006 (diff)
downloadtalos-hostboot-198ccaf1e562c281684e47a2209b7ce29c9c71e6.tar.gz
talos-hostboot-198ccaf1e562c281684e47a2209b7ce29c9c71e6.zip
Fix strict-aliasing violations.
Change-Id: I5f3feae4fb62ed82b52e996d4954d1c638a243b3 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4036 Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/runtime/fakepayload.C')
-rw-r--r--src/usr/runtime/fakepayload.C8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/runtime/fakepayload.C b/src/usr/runtime/fakepayload.C
index 0600bfa68..0890ecdcd 100644
--- a/src/usr/runtime/fakepayload.C
+++ b/src/usr/runtime/fakepayload.C
@@ -70,7 +70,13 @@ void FakePayload::load()
// Copy over the fake payload code.
uint8_t* dest = reinterpret_cast<uint8_t*>(memArea) + entry;
- memcpy(dest, *(reinterpret_cast<void**>(&payload)), size);
+ union fn_ptr
+ {
+ void (*opd)();
+ uint64_t** data;
+ };
+ fn_ptr payload_code = { payload };
+ memcpy(dest, *payload_code.data, size);
// Invalidate the icache since this is instructions.
mm_icache_invalidate(memArea, ALIGN_8(safeClearArea) / sizeof(uint64_t));
OpenPOWER on IntegriCloud