Fix serial output for U-Boot code

* use a static buffer for allocation, as the heap isn't yet working.
This commit is contained in:
François Revol
2012-05-15 19:04:31 +02:00
parent 27d3324651
commit 565039c149
+4 -1
View File
@@ -13,6 +13,7 @@
#include <boot/platform.h> #include <boot/platform.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <boot/stage2.h> #include <boot/stage2.h>
#include <new>
#include <string.h> #include <string.h>
@@ -91,8 +92,10 @@ serial_cleanup(void)
extern "C" void extern "C" void
serial_init(void) serial_init(void)
{ {
static char sUARTBuffer[sizeof(Uart8250)];
// Setup information on uart // Setup information on uart
gLoaderUART = new(nothrow) Uart8250(uart_base_debug()); gLoaderUART = new(sUARTBuffer) Uart8250(uart_base_debug());
if (gLoaderUART == 0) if (gLoaderUART == 0)
return; return;