X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcbmem_console.c;fp=src%2Flib%2Fcbmem_console.c;h=2e22decd68a93bfaab3b7d807955cac1ca1fc3a9;hb=19e7e7d2e7cb4ff0ae821448355ec8b14e0bd2bf;hp=8cfb33bdf70376ca96a163e4e4deedf55e8aa7ab;hpb=4d04a715475a60f627ddeded3385ca04d883a55b;p=coreboot.git diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index 8cfb33bdf..2e22decd6 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -19,6 +19,7 @@ #include #include +#include #include /* @@ -39,7 +40,9 @@ struct cbmem_console { * ram space is used for the console buffer storage. The size and location of * the area are defined in the config. */ -#define cbmem_console_p ((struct cbmem_console *)CONFIG_DCACHE_RAM_BASE) + +static struct cbmem_console car_cbmem_console CAR_CBMEM; +#define cbmem_console_p (&car_cbmem_console) /* * Once DRAM is initialized and the cache as ram mode is disabled, while still @@ -92,7 +95,7 @@ void cbmemc_tx_byte(unsigned char data) * DCACHE_RAM_BASE), use the redirect pointer to find out where the * actual console buffer is. */ - if ((u32)&cursor < (u32)CONFIG_DCACHE_RAM_BASE) + if ((uintptr_t)&cursor < (uintptr_t)&car_cbmem_console) cbm_cons_p = CBMEM_CONSOLE_REDIRECT; #endif if (!cbm_cons_p)