Fix the printf() in init_heap so that it can run before the console is up.

Pointed out by:	marius
This commit is contained in:
Nathan Whitehorn 2010-10-29 00:37:35 +00:00
parent 51b1acac58
commit 49939626be
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214495

View File

@ -47,13 +47,17 @@ static char bootargs[128];
#define HEAP_SIZE 0x80000
#define OF_puts(fd, text) OF_write(fd, text, strlen(text))
void
init_heap(void)
{
void *base;
ihandle_t stdout;
if ((base = ofw_alloc_heap(HEAP_SIZE)) == (void *)0xffffffff) {
printf("Heap memory claim failed!\n");
OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
OF_puts(stdout, "Heap memory claim failed!\n");
OF_enter();
}