Walking through the code to distinguish between VGA_ROM_RUN and CONSOLE_VGA, I've seen assumptions about the memory layout and PCI_ROM_RUN, which I considered errors; CONSOLE_VGA || PCI_ROM_RUN was probably cut and pasted? I removed the PCI_ROM_RUN, please check.
Signed-off-by: Torsten Duwe duwe@lst.de
diff -BNurbp LinuxBIOSv2.orig/src/config/linuxbios_ram.ld LinuxBIOSv2/src/config/linuxbios_ram.ld --- LinuxBIOSv2.orig/src/config/linuxbios_ram.ld 2007-07-25 18:26:10.000000000 +0200 +++ LinuxBIOSv2/src/config/linuxbios_ram.ld 2008-01-05 17:14:27.000000000 +0100 @@ -92,8 +92,8 @@ SECTIONS _stack = .; .stack . : { /* Reserve a stack for each possible cpu */ - /* the stack for ap will be put after pgtbl in 1M to CONFIG_LB_MEM_TOPK range when VGA and ROM_RUN and CONFIG_LB_MEM_TOPK>1024*/ - . = ((CONFIG_CONSOLE_VGA || CONFIG_PCI_ROM_RUN)&&(_RAMBASE<0x100000)&&(CONFIG_LB_MEM_TOPK>(0x100000>>10)) ) ? STACK_SIZE : (CONFIG_MAX_CPUS*STACK_SIZE); + /* the stack for ap will be put after pgtbl in 1M to CONFIG_LB_MEM_TOPK range when VGA mem is used and CONFIG_LB_MEM_TOPK>1024*/ + . = (CONFIG_CONSOLE_VGA &&(_RAMBASE<0x100000)&&(CONFIG_LB_MEM_TOPK>(0x100000>>10)) ) ? STACK_SIZE : (CONFIG_MAX_CPUS*STACK_SIZE); } _estack = .; _heap = .; @@ -111,7 +111,7 @@ SECTIONS
_bogus = ASSERT( ( (_eram_seg>>10) < (CONFIG_LB_MEM_TOPK)) , "please increase CONFIG_LB_MEM_TOPK");
- _bogus = ASSERT( !((CONFIG_CONSOLE_VGA || CONFIG_PCI_ROM_RUN) && ((_ram_seg<0xa0000) && (_eram_seg>0xa0000))) , "please increase CONFIG_LB_MEM_TOPK and if still fail, try to set _RAMBASE more than 1M"); + _bogus = ASSERT( !(CONFIG_CONSOLE_VGA && ((_ram_seg<0xa0000) && (_eram_seg>0xa0000))) , "please increase CONFIG_LB_MEM_TOPK and if still fail, try to set _RAMBASE more than 1M");
/DISCARD/ : { *(.comment) diff -BNurbp LinuxBIOSv2.orig/src/cpu/x86/lapic/lapic_cpu_init.c LinuxBIOSv2/src/cpu/x86/lapic/lapic_cpu_init.c --- LinuxBIOSv2.orig/src/cpu/x86/lapic/lapic_cpu_init.c 2007-07-25 18:25:59.000000000 +0200 +++ LinuxBIOSv2/src/cpu/x86/lapic/lapic_cpu_init.c 2008-01-05 17:11:43.000000000 +0100 @@ -226,7 +226,7 @@ int start_cpu(device_t cpu) index = ++last_cpu_index; /* Find end of the new processors stack */ -#if (CONFIG_LB_MEM_TOPK>1024) && (_RAMBASE < 0x100000) && ((CONFIG_CONSOLE_VGA==1) || (CONFIG_PCI_ROM_RUN == 1)) +#if (CONFIG_LB_MEM_TOPK>1024) && (_RAMBASE < 0x100000) && (CONFIG_CONSOLE_VGA==1) if(index<1) { // only keep bsp on low stack_end = ((unsigned long)_estack) - (STACK_SIZE*index) - sizeof(struct cpu_info); } else { diff -BNurbp LinuxBIOSv2.orig/src/cpu/x86/pae/pgtbl.c LinuxBIOSv2/src/cpu/x86/pae/pgtbl.c --- LinuxBIOSv2.orig/src/cpu/x86/pae/pgtbl.c 2007-07-25 18:25:59.000000000 +0200 +++ LinuxBIOSv2/src/cpu/x86/pae/pgtbl.c 2008-01-05 17:11:20.000000000 +0100 @@ -54,7 +54,7 @@ void *map_2M_page(unsigned long page) struct pde pdp[512]; } __attribute__ ((packed));
-#if (CONFIG_LB_MEM_TOPK>1024) && (_RAMBASE<0x100000) && ((CONFIG_CONSOLE_VGA==1) || (CONFIG_PCI_ROM_RUN == 1)) +#if (CONFIG_LB_MEM_TOPK>1024) && (_RAMBASE<0x100000) && (CONFIG_CONSOLE_VGA==1) /* pgtbl is too big, so use last one 1M before CONFIG_LB_MEM_TOP, otherwise for 8 way dual core with vga support will push stack and heap cross 0xa0000, and that region need to be used as vga font buffer. Please make sure set CONFIG_LB_MEM_TOPK=2048 in MB Config diff -BNurbp LinuxBIOSv2.orig/src/stream/rom_stream.c LinuxBIOSv2/src/stream/rom_stream.c --- LinuxBIOSv2.orig/src/stream/rom_stream.c 2007-07-25 18:26:00.000000000 +0200 +++ LinuxBIOSv2/src/stream/rom_stream.c 2008-01-05 17:06:01.000000000 +0100 @@ -79,7 +79,7 @@ int stream_init(void)
#if _RAMBASE<0x00100000 olen = *(unsigned int *)dest; -#if (CONFIG_CONSOLE_VGA==1) || (CONFIG_PCI_ROM_RUN == 1) +#if CONFIG_CONSOLE_VGA==1 if((dest < 0xa0000) && ((dest+olen)>0xa0000)) { dest = (CONFIG_LB_MEM_TOPK<<10); }