4 * CONFIG_RAMBASE : text segment
12 * Bootstrap code for the STPC Consumer
13 * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
17 * Written by Johan Rydberg, based on work by Daniel Kahlin.
18 * Rewritten by Eric Biederman
19 * 2005.12 yhlu add coreboot_ram cross the vga font buffer handling
22 /* We use ELF as output format. So that we can debug the code in some form. */
30 /* First we place the code and read only data (typically const declared).
31 * This could theoretically be placed in rom.
45 *(.rodata.console_drivers)
46 econsole_drivers = . ;
56 /* kevinh/Ispiri - Added an align, because the objcopy tool
57 * incorrectly converts sections that are not long word aligned.
63 /* After the code we place initialized data (typically initialized
64 * global variables). This gets copied into ram by startup code.
65 * __data_start and __data_end shows where in ram this should be placed,
66 * whereas __data_loadstart and __data_loadend shows where in rom to
75 /* bss does not contain data, it is just a space that should be zero
76 * initialized on startup. (typically uninitialized global variables)
77 * crt0.S fills between _bss and _ebss with zeroes.
88 /* coreboot really "ends" here. Only heap and stack are placed after
92 . = ALIGN(CONFIG_STACK_SIZE);
96 /* Reserve a stack for each possible cpu */
97 . += CONFIG_MAX_CPUS*CONFIG_STACK_SIZE;
103 /* Reserve CONFIG_HEAP_SIZE bytes for the heap */
104 . = CONFIG_HEAP_SIZE ;
109 /* Some assertions to print human readable errors for certain linker
113 /* Avoid running into 0xa0000-0xfffff */
114 _bogus = ASSERT(CONFIG_RAMBASE >= 0x100000 || _eheap < 0xa0000, "Please move RAMBASE to 1MB");
116 /* The ram segment. This includes all memory used by the memory
117 * resident copy of coreboot, except the tables that are produced on
118 * the fly, but including stack and heap.
123 /* CONFIG_RAMTOP is the upper address of cached memory (among other
124 * things). We must not exceed beyond that address, there be dragons.
126 _bogus = ASSERT( ( _eram_seg < (CONFIG_RAMTOP)) , "Please increase CONFIG_RAMTOP");
128 /* This rule is only good for the few broken targets that still live
129 * below 1MB per default. Those are the Geode and VIA targets that come
130 * with their own version of real mode switches that can't live above
131 * 1MB. Once these are fixed, this rule should go away.
133 _bogus = ASSERT( !((CONFIG_CONSOLE_VGA || CONFIG_PCI_ROM_RUN || CONFIG_VGA_ROM_RUN || CONFIG_HAVE_SMI_HANDLER) && ((_ram_seg<0xa0000) && (_eram_seg>0xa0000))), "Please increase CONFIG_RAMTOP and if still fail, try to set CONFIG_RAMBASE to 1M");
135 /* Discard the sections we don't need/want */