summaryrefslogtreecommitdiff
path: root/arch/i386/cpu
Commit message (Collapse)AuthorAgeLines
* x86: Implement fully relocatable imageGraeme Russ2010-10-07-0/+6
| | | | | | | | u-boot.bin can be loaded at any 4-byte aligned memory location and directly 'jumped' to using the 'go' command using the load address as the start address. Doing so performs a 'warm boot' which skips memory initialisation and other low-level initialisations, relocates U-Boot to upper memory and starts U-Boot in RAM as per normal 'cold boot'
* x86: Set cold/warm boot flagGraeme Russ2010-10-07-16/+10
|
* x86: Place global data below stack before entering CGraeme Russ2010-10-07-0/+8
| | | | | | | By reserving space for the Global Data immediately below the stack during assembly level initialisation, the C declaration of the static global data can be removed, along with the 'RAM Bootstrap' function. This results in cleaner code, and the ability to pass boot-up flags from assembler into C
* x86: Dont clobber %eax after getting memory sizeGraeme Russ2010-10-07-3/+2
| | | | By using another register, reduce code size by one instruction
* x86: Don't clobber %ebxGraeme Russ2010-10-07-7/+12
| | | | %ebx will hold low-level boot flags and must be preserved
* x86: Remove usage of %ebp as a return pointerGraeme Russ2010-10-07-10/+10
| | | | Using %ebp as a return pointer prevents creating 'load anywhere' images
* x86: Move ECC initialisation outside RAM initialisationGraeme Russ2010-10-07-14/+14
| | | | | To allow for 'load anywhere' images, the %ebp return pointer 'hack' must be removed, so we cannot have two 'calls' to get_mem_size
* x86: Remove progress indication in low-level initGraeme Russ2010-10-07-42/+2
| | | | | Progress indication is not relocation friendly so remove it in preperation for full relocatability support
* x86: Fix %ss and %esp in register structure for interruptsGraeme Russ2010-10-07-4/+19
|
* x86: Change compiler optionsGraeme Russ2010-10-07-15/+4
| | | | | | | | | | | Change to: - reparam=3 - no-from-pointer - no-stack-protector - preferred-stack-boundary=2 - no-top-level-reorder These options make the code a little smaller and faster
* x86: Coding Style CleanupGraeme Russ2010-10-07-373/+362
| | | | Perform some basic code cleanups of the x86 files
* x86: Move loading of GTD to C codeGraeme Russ2010-10-07-96/+57
| | | | | Linux has C macros and code to load the GTD after switching to Protected Mode. Using these greatly simplifies the assembler code
* x86: Fix x86 Cold BootGraeme Russ2010-09-13-0/+5
| | | | | | Commit 077e1958ca4afe12d88043b123ded058c51b89f7 broke the ability of the x86 port to boot from a cold-reset by removing the initial IDT. Re- instate the initial IDT to allow cold-booting of x86 boards
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* sc520: Fix minor DRAM Controller Setup bugGraeme Russ2010-05-06-1/+1
| | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* sc520: Update to new AMD CopyrightGraeme Russ2010-05-06-40/+77
| | | | | | | AMD recently changed the licensing of the RAM sizing code to the GPLv2 (or at your option any later version) Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* sc520: Board Specific PCI InitGraeme Russ2010-05-06-37/+2
| | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* sc520: Allow boards to override udelayGraeme Russ2010-05-06-0/+4
| | | | | | | If the board has a high precision mico-second timer, it maked sense to use it instead of the on-chip one Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Use CONFIG_SERIAL_MULTIGraeme Russ2010-05-06-507/+1
| | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Move GDT to a safe location in RAMGraeme Russ2010-05-06-14/+103
| | | | | | | | | Currently, the GDT is either located in FLASH or in the non-relocated U-Boot image in RAM. Both of these locations are unsafe as those locations can be erased during a U-Boot update. Move the GDT into the highest available memory location and relocate U-Boot to just below it Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Add RAM bootstrap functionalityGraeme Russ2010-05-06-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | Add a parameter to the 32-bit entry to indicate if entry is from Real Mode or not. If entry is from Real Mode, execute the destructive 'sizer' routine to determine memory size as we are booting cold and running in Flash. If not entering from Real Mode, we are executing a U-Boot image from RAM and therefore the memory size is already known (and running 'sizer' will destroy the running image) There are now two 32-bit entry points. The first is the 'in RAM' entry point which exists at the start of the U-Boot binary image. As such, you can load u-boot.bin in RAM and jump directly to the load address without needing to calculate any offsets. The second entry point is used by the real-to-protected mode switch This patch also changes TEXT_BASE to 0x6000000 (in RAM). You can load the resulting image at 0x6000000 and simple go 0x6000000 from the u-boot prompt Hopefully a later patch will completely elliminate any dependency on TEXT_BASE like a relocatable linux kernel (perfect world) Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Split sc520 memory sizing versus reportingGraeme Russ2010-05-06-38/+61
| | | | | | | | This patch allows the low-level assembler boot-strap to obtain the RAM size without calling the destructive 'sizer' routine. This allows boot-strapping from a U-Boot image loaded in RAM Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Fix sc520 memory size reportingGraeme Russ2010-05-06-18/+17
| | | | | | | | There is an error in how the assembler version of the sc520 memory size reporting code works. As a result, it will only ever report at most the size of one bank of RAM Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Add register dump to crash handlersGraeme Russ2010-05-06-34/+180
| | | | | | | | Shamelessly steal the Linux x86 crash handling code and shove it into U-Boot (cool - it fits). Be sure to include suitable attribution to Linus Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* x86: Fix MMCR AccessGraeme Russ2010-05-06-52/+63
| | | | | | Change sc520 MMCR Access to use memory accessor functions Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* i386: Move cpu/i386/* to arch/i386/cpu/*Peter Tyser2010-04-13-0/+2643
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>