On Mon, Jun 19, 2023 at 8:01 PM Simon Glass <[email protected]> wrote: > > At present this leaves the stack at the pre-relocation value. This is not > ideal since we want to have U-Boot running entirely from the top of > memory. > > In addition, the new global_data pointer is not actually used, since > the global_data pointer itself is relocated, then the pre-relocation value > is changed, so the effective value (after relocation) does not update. > > Adjust the implementation to follow the 32-bit code more closely, with a > trampoline function which is passed the new stack and global_data pointer. > This ensures that the correct values come through even when relocating. > > Signed-off-by: Simon Glass <[email protected]> > --- > > (no changes since v1) > > arch/x86/cpu/start64.S | 19 +++++++++++++++++++ > arch/x86/include/asm/u-boot-x86.h | 11 +++++++++++ > common/board_f.c | 12 +++++++----- > 3 files changed, 37 insertions(+), 5 deletions(-) >
Reviewed-by: Bin Meng <[email protected]>

