Author: rminnich Date: 2007-10-02 21:30:23 +0200 (Tue, 02 Oct 2007) New Revision: 37
Modified: trunk/filo-0.5/i386/sys_info.c Log: Undo erroneous patch. Signed-off-by: Ronald G. Minnich rminnich@gmail.com Acked-by: Ronald G. Minnich rminnich@gmail.com
Modified: trunk/filo-0.5/i386/sys_info.c =================================================================== --- trunk/filo-0.5/i386/sys_info.c 2007-10-02 17:04:57 UTC (rev 36) +++ trunk/filo-0.5/i386/sys_info.c 2007-10-02 19:30:23 UTC (rev 37) @@ -11,8 +11,6 @@ { int i; unsigned long long total = 0; - /* this fake memory range covers the case that we can't find any LB structs. */ - static struct memrange fakememrange[2];
/* Pick up paramters given by bootloader to us */ info->boot_type = boot_ctx->eax; @@ -32,12 +30,7 @@ printf("Can't get memory map from firmware. " "Using hardcoded default.\n"); info->n_memranges = 2; - /* NOTE: DO NOT USE MALLOC HERE * - * malloc structs are not initialized until this information is filled in. - * Use of malloc will create a circular dependency. So use - * the static allocated above. - */ - info->memrange = fakememrange; + info->memrange = malloc(2 * sizeof(struct memrange)); info->memrange[0].base = 0; info->memrange[0].size = 640*1024; info->memrange[1].base = 1024*1024;