From 565039c1499f2a6769a65460496275550be88e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Tue, 15 May 2012 19:04:31 +0200 Subject: [PATCH] Fix serial output for U-Boot code * use a static buffer for allocation, as the heap isn't yet working. --- src/system/boot/platform/u-boot/serial.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/system/boot/platform/u-boot/serial.cpp b/src/system/boot/platform/u-boot/serial.cpp index 28f8406c93..88300e5a82 100644 --- a/src/system/boot/platform/u-boot/serial.cpp +++ b/src/system/boot/platform/u-boot/serial.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -91,8 +92,10 @@ serial_cleanup(void) extern "C" void serial_init(void) { + static char sUARTBuffer[sizeof(Uart8250)]; + // Setup information on uart - gLoaderUART = new(nothrow) Uart8250(uart_base_debug()); + gLoaderUART = new(sUARTBuffer) Uart8250(uart_base_debug()); if (gLoaderUART == 0) return;