diff options
author | Tom Rini <trini@konsulko.com> | 2024-08-26 14:06:16 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-08-26 14:06:16 -0600 |
commit | 02d587a447ccae12618abbfb2b8ddd88ac3c7648 (patch) | |
tree | 23acd3b2a0e077ab3a4f8924d132a137ea01ad20 /arch/x86/cpu/i386/cpu.c | |
parent | 7670200d4b7bbb572290d0fb2ed9cd0fb1f989cc (diff) | |
parent | cafaa1a17f765e684e3a5b52448d495c0e1da83d (diff) |
Merge patch series "global_data: Reduce size of struct global_data"
Simon Glass <sjg@chromium.org> says:
The global data structure has grown quite a lot over the years, being
the best place to put an important pointer or something that must be
accessed before and after relocation.
This series attempts to reduce the size a little, by moving some things
out and shrinking and aligning some fields.
Some fields are needed during init but not afterwards. To deal with this
a new 'boardf' structure is created, which sits on the stack and is only
present during board_init_f(). It is possible that more fields could
move to this struct, but for now only 4 are moved.
An assumption is made that an int is 32-bits wide on all architectures,
which seems to be true, but maintainers should be able to confirm.
Mostly the code-size impact is neutral, but the patch
'Use less space for environment fields' does increase U-Boot's size by
about 30 bytes on aarch64.
For firefly-rk3399 (64-bit) the size of global reduces from 456 to 368
bytes. For SPL it reduces from 416 to 272 bytes.
There are other things which could be attempted, for example:
- Using hlist instead of list for some lists
- Checking that only necessary fields are present in SPL
Diffstat (limited to 'arch/x86/cpu/i386/cpu.c')
-rw-r--r-- | arch/x86/cpu/i386/cpu.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index db2727d7485..934e98ac582 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -412,12 +412,6 @@ int cpu_phys_address_size(void) return 32; } -/* Don't allow PCI region 3 to use memory in the 2-4GB memory hole */ -static void setup_pci_ram_top(void) -{ - gd_set_pci_ram_top(0x80000000U); -} - static void setup_mtrr(void) { u64 mtrr_cap; @@ -469,7 +463,6 @@ int x86_cpu_init_f(void) setup_cpu_features(); setup_identity(); setup_mtrr(); - setup_pci_ram_top(); /* Set up the i8254 timer if required */ if (IS_ENABLED(CONFIG_I8254_TIMER)) @@ -483,7 +476,6 @@ int x86_cpu_reinit_f(void) long addr; setup_identity(); - setup_pci_ram_top(); addr = locate_coreboot_table(); if (addr >= 0) { gd->arch.coreboot_table = addr; |