Partially revert r917: Leave bootstrap functionality in kernel/cross.h

The base_address for native bitwidth smaller than host bitwidth
is available only in kernel/bootstrap.c and thus cannot be used
elsewhere.

The bitwidth equality code path will have to be enhanced
for different cell sizes instead.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@939 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Andreas Färber
2010-10-31 16:37:33 +00:00
committed by Andreas Färber
parent ce371d6307
commit 52d7516592
2 changed files with 4 additions and 8 deletions

View File

@@ -114,11 +114,15 @@
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH
extern unsigned long base_address;
#define pointer2cell(x) ((ucell)(((unsigned long)(x))-base_address))
#define cell2pointer(x) ((u8 *)(((unsigned long)(x))+base_address))
#define FMT_CELL_x "x"
#define FMT_CELL_d "d"
#endif
#ifdef NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH
#define pointer2cell(x) ((ucell)(unsigned long)(x))
#define cell2pointer(x) ((u8 *)((unsigned long)(x)&0xFFFFFFFFUL))
#define FMT_CELL_x "llx"
#define FMT_CELL_d "lld"
#endif