j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: afaerber Date: Sat Oct 30 18:15:17 2010 New Revision: 931 URL: http://tracker.coreboot.org/trac/openbios/changeset/931
Log: ppc64: Quickfix for pointer2cell() and cell2pointer()
Add a uintptr_t cast as an interim solution to resolve errors for ppc64, where pointer size is larger than cell size.
v2: * Add comment on potential better fix. Postpone potential conversion to inline function until investigated.
Signed-off-by: Andreas Färber andreas.faerber@web.de
Modified: trunk/openbios-devel/include/kernel/stack.h
Modified: trunk/openbios-devel/include/kernel/stack.h ============================================================================== --- trunk/openbios-devel/include/kernel/stack.h Sat Oct 30 17:44:08 2010 (r930) +++ trunk/openbios-devel/include/kernel/stack.h Sat Oct 30 18:15:17 2010 (r931) @@ -31,8 +31,9 @@
#ifdef NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -#define pointer2cell(x) ((ucell)(x)) -#define cell2pointer(x) ((u8 *)(x)) +// XXX Check whether we can take the larger-than code path for ppc64 instead. +#define pointer2cell(x) ((ucell)(uintptr_t)(x)) +#define cell2pointer(x) ((u8 *)(uintptr_t)(x)) #endif #ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH #define pointer2cell(x) ((ucell)(((unsigned long)(x))-base_address))