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:
parent
27d3324651
commit
565039c149
@ -13,6 +13,7 @@
|
||||
#include <boot/platform.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <new>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user