| 9e6c572f | 31-Dec-2011 |
Graeme Russ <graeme.russ@gmail.com> |
x86: Use fs for global data
Use the base address of the 'F' segment as a pointer to the global data structure. By adding the linear address (i.e. the 'D' segment address) as the first word of the gl
x86: Use fs for global data
Use the base address of the 'F' segment as a pointer to the global data structure. By adding the linear address (i.e. the 'D' segment address) as the first word of the global data structure, the address of the global data relative to the 'D' segment can be found simply, for example, by:
fs movl 0, %eax
This makes the gd 'pointer' writable prior to relocation (by reloading the Global Desctriptor Table) which brings x86 into line with all other arches
NOTE: Writing to the gd 'pointer' is expensive (but we only do it twice) but using it to access global data members (read and write) is still fairly cheap
-- Changes for v2: - Rebased against changes made to patch #3 - Removed extra indent - Tweaked commit message
show more ...
|
| 74bfbe1b | 29-Dec-2011 |
Graeme Russ <graeme.russ@gmail.com> |
x86: Rework Global Descriptor Table loading
The inline assembler is ugly and uses hard coded magic numbers. Make it more elegant to allow cleaner implementation of future GDT related patches. The co
x86: Rework Global Descriptor Table loading
The inline assembler is ugly and uses hard coded magic numbers. Make it more elegant to allow cleaner implementation of future GDT related patches. The compiler seems smart enough to generate the same code anyway
-- Changes for v2: - Rebased against revised patch #3 - Use GDT size define instead of magic number - Added commit message
show more ...
|
| 63f559cd | 05-Dec-2011 |
Gabe Black <gabeblack@chromium.org> |
x86: Import code from coreboot's libpayload to parse the coreboot table
This change also forces the lib_sysinfo structure to be in the .data section. Otherwise it ends up in the .bss section. U-boot
x86: Import code from coreboot's libpayload to parse the coreboot table
This change also forces the lib_sysinfo structure to be in the .data section. Otherwise it ends up in the .bss section. U-boot assumes that it doesn't need to copy it over during relocation, and instead fills that whole section with zeroes. If we really were booting from ROM that would be appropriate, but we need some information from the coreboot tables (memory size) before then and have to fill that structure before relocation. We skirt u-boot's assumption by putting this in .data where it assumes there is still read only but non-zero data.
Signed-off-by: Gabe Black <gabeblack@chromium.org>
show more ...
|
| a206cc23 | 08-Nov-2011 |
Graeme Russ <graeme.russ@gmail.com> |
x86: Add multiboot header
By adding a multiboot header, U-Boot can be loaded by GRUB2. Using GRUB2 to bootstrap U-Boot is useful for using an existing BIOS to get an initial U-Boot port up and runni
x86: Add multiboot header
By adding a multiboot header, U-Boot can be loaded by GRUB2. Using GRUB2 to bootstrap U-Boot is useful for using an existing BIOS to get an initial U-Boot port up and running before implementing the low-level reset vector code, SDRAM init, etc. and overwriting the BIOS
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
show more ...
|
| b7af5831 | 13-Apr-2011 |
Graeme Russ <graeme.russ@gmail.com> |
sc520: Move reset to stand-alone file
Partial linking allows weak functions to be overridden in files containing only one function. Moving the sc520 override of reset_cpu gets rid of an ugly #ifdef
sc520: Move reset to stand-alone file
Partial linking allows weak functions to be overridden in files containing only one function. Moving the sc520 override of reset_cpu gets rid of an ugly #ifdef
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
show more ...
|