cbmem console: use cache-as-ram API and cleanup
authorAaron Durbin <adurbin@chromium.org>
Fri, 10 May 2013 05:45:37 +0000 (00:45 -0500)
committerAaron Durbin <adurbin@google.com>
Wed, 15 May 2013 23:30:17 +0000 (01:30 +0200)
commit2ad6bd23a7ebcaf593f717db9c356284237ed639
treeae86ae82dcf7953c7aacbe9624f16f6a86e09a76
parent677e1558c32d1c88ade486e5ac42e60a3da1fdcf
cbmem console: use cache-as-ram API and cleanup

Allow for automatic cache-as-ram migration for the cbmem
console. The code was refactored in the thought of making
it easier to read. The #ifdefs still exist, but they are no
longer sprinkled throughout the code. The cbmem_console_p
variable now exists globally in both romstage and ramstage.
However, the cbmem_console_p is referenced using the
cache-as-ram API. When cbmem is initialized the console
is automatically copied over by calling cbmemc_reinit()
through a callback.

Change-Id: I9f4a64e33c58b8b7318db27942e37c13804e6f2c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/3235
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
src/lib/cbmem_console.c