| 7949703a | 17-Apr-2013 |
Simon Glass <sjg@chromium.org> |
x86: Rationalise kernel booting logic and bootstage
The 'Starting linux' message appears twice in the code, but both call through the same place. Unify these and add calls to bootstage to mark the o
x86: Rationalise kernel booting logic and bootstage
The 'Starting linux' message appears twice in the code, but both call through the same place. Unify these and add calls to bootstage to mark the occasion.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org> Acked-by: Graeme Russ <graeme.russ@gmail.com>
show more ...
|
| 62f7970a | 28-Feb-2013 |
Simon Glass <sjg@chromium.org> |
x86: Add error checking to x86 relocation code
This does not actually change normal behaviour, but adds a check that should detect corruption of relocation data (e.g. by using BSS data prior to relo
x86: Add error checking to x86 relocation code
This does not actually change normal behaviour, but adds a check that should detect corruption of relocation data (e.g. by using BSS data prior to relocation).
Also add additional debugging output when enabled.
During this investigation, two situations have been seen: 1. calculate_relocation_address(): uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;
turns into 111166f: b8 83 c4 17 01 mov $0x117c483,%eax
whih is beyond the end of bss:
0117b484 g .bss 00000000 __bss_end
Somehow the __bss_end here is 255 bytes ahead.
2. do_elf_reloc_fixups():
uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;
Here the __text_start is 0 in the file:
1111d9f: bb a0 e0 13 01 mov $0x113e0a0,%ebx 1111da4: 81 ef 00 00 00 00 sub $0x0,%edi
As it happens, both of these are in pre-relocation code.
For these reasons we silent check and ignore bad relocations.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| b208c7f1 | 03-Nov-2012 |
Gabe Black <gabeblack@chromium.org> |
x86: Add support for CONFIG_OF_CONTROL
Allow a device tree to be provided through the standard mechanisms.
Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.
x86: Add support for CONFIG_OF_CONTROL
Allow a device tree to be provided through the standard mechanisms.
Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 05b71646 | 03-Nov-2012 |
Stefan Reinauer <reinauer@chromium.org> |
x86: Add CONFIG_DELAY_ENVIRONMENT to delay environment loading
This option delays loading of the environment until later, so that only the default environment will be available to U-Boot.
This can
x86: Add CONFIG_DELAY_ENVIRONMENT to delay environment loading
This option delays loading of the environment until later, so that only the default environment will be available to U-Boot.
This can address the security risk of untrusted data being used during boot.
When CONFIG_DELAY_ENVIRONMENT is defined, it is convenient to have a run-time way of enabling loadinlg of the environment. Add this to the fdt as /config/delay-environment.
Note: This patch depends on http://patchwork.ozlabs.org/patch/194342/
Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
show more ...
|
| d65297b6 | 03-Nov-2012 |
Gabe Black <gabeblack@chromium.org> |
x86: Make calculate_relocation_address an overridable function
Different systems may have different mechanisms for picking a suitable place to relocate U-Boot to.
Signed-off-by: Gabe Black <gabebla
x86: Make calculate_relocation_address an overridable function
Different systems may have different mechanisms for picking a suitable place to relocate U-Boot to.
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 32f98735 | 03-Nov-2012 |
Gabe Black <gabeblack@chromium.org> |
x86: Reorder x86's post relocation memory layout
This changes the layout in decreasing addresses from:
1. Stack 2. Sections in the image 3. Heap
to
1. Sections in the image 2. Heap 3. Stack
This
x86: Reorder x86's post relocation memory layout
This changes the layout in decreasing addresses from:
1. Stack 2. Sections in the image 3. Heap
to
1. Sections in the image 2. Heap 3. Stack
This allows the stack to grow significantly more since it isn't constrained by the other u-boot areas. More importantly, the generic memory wipe code assumes that the stack is the lowest addressed area used by the main part of u-boot. In the original layout, that means that u-boot tramples all over itself. In the new layout, it works.
Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 8313315b | 03-Nov-2012 |
Gabe Black <gabeblack@chromium.org> |
x86: Initialise SPI if enabled
If we have SPI support, make sure that we init it.
Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vic Y
x86: Initialise SPI if enabled
If we have SPI support, make sure that we init it.
Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vic Yang <victoryang@chromium.org>
show more ...
|
| ac31a7b8 | 23-Oct-2012 |
Gabe Black <gabeblack@chromium.org> |
x86: Implement arch_phys_memset so that it can wipe memory above 4GB
Implement arch_phys_memset so that it can set memory at physical addresses above 4GB using PAE paging. Because there are only 5 p
x86: Implement arch_phys_memset so that it can wipe memory above 4GB
Implement arch_phys_memset so that it can set memory at physical addresses above 4GB using PAE paging. Because there are only 5 page tables in PAE mode, 1 PDPT and 4 PDTs, those tables are statically allocated in the BSS. The tables must be 4K page aligned and are declared that way, and because U-Boot starts as 4K aligned and the relocation code relocates it to a 4K aligned address, the tables work as intended.
While paging is turned on, all 4GB are identity mapped except for one 2MB page which is used as the window into high memory. This way, U-Boot will continue to work as expected when running code that expects to access memory freely, but the code can still get at high memory through its window.
The window is put at 2MB so that it's 2MB page aligned, low in memory to be out of the way of things U-Boot is likely to care about, and above the lowest 1MB where lots of random things live.
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 14843112 | 23-Oct-2012 |
Simon Glass <sjg@chromium.org> |
x86: Fix indirect jmp warning in zimage.c
This fixes the following warning:
zimage.c:312: Warning: indirect jmp without `*'
Also fixed these warnings to keep checkpatch quiet:
warning: arch/x86/l
x86: Fix indirect jmp warning in zimage.c
This fixes the following warning:
zimage.c:312: Warning: indirect jmp without `*'
Also fixed these warnings to keep checkpatch quiet:
warning: arch/x86/lib/zimage.c,311: unnecessary whitespace before a quoted newline warning: arch/x86/lib/zimage.c,312: unnecessary whitespace before a quoted newline warning: arch/x86/lib/zimage.c,313: unnecessary whitespace before a quoted newline
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|