From 20250c0b1f6de53b2bfddd1c714fb8c97e655ce2 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Wed, 11 Oct 2017 11:56:19 -0500 Subject: Ensure AbaPtr is not used in runtime code The AbaPtr makes assumptions that we have pointer values that are only 32-bits long. In our runtime (HBRT) environment that assumption is not true so we need to make sure none of the code that runs there is trying to use the AbaPtr code. Change-Id: I0a26558f305fada723bf3cb3447a2bdfddb194d0 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48248 Reviewed-by: Martin Gloff Tested-by: Jenkins Server Reviewed-by: Matt Derksen Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/util/lockfree/abaptr.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/include/util/lockfree') diff --git a/src/include/util/lockfree/abaptr.H b/src/include/util/lockfree/abaptr.H index ed13f83ca..5ea5868ff 100644 --- a/src/include/util/lockfree/abaptr.H +++ b/src/include/util/lockfree/abaptr.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -25,6 +25,12 @@ #ifndef __UTIL_LOCKFREE_ABAPTR_H #define __UTIL_LOCKFREE_ABAPTR_H +// This code makes assumptions on pointer sizes that are not valid within +// our runtime environment, therefore it cannot ever be used there. +#ifdef __HOSTBOOT_RUNTIME +#error "AbaPtr is not allowed in HBRT" +#endif + #include #include -- cgit v1.2.1