mirror of
https://github.com/ipxe/ipxe
synced 2026-03-16 03:02:07 +03:00
[riscv] Allow for a non-zero link-time address
Using paging (rather than relocation records) will be easier on 64-bit RISC-V if we place iPXE within the negative (kernel) virtual address space. Allow the link-time address to be non-zero and to vary between 32-bit and 64-bit builds. Choose addresses that are expected to be amenable to the use of paging. There is no particular need to use a non-zero address in the 32-bit builds, but doing so allows us to validate that the relocation code is handling this case correctly. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# -*- makefile -*- : Force emacs to use Makefile mode
|
||||
|
||||
# Set base virtual address to 0xffffffffeb000000
|
||||
#
|
||||
# This is aligned to a 2MB boundary and so allows 2MB megapages to be
|
||||
# used to map the iPXE binary. The address pattern is also easily
|
||||
# recognisable if leaked to unexpected contexts.
|
||||
#
|
||||
LDFLAGS += --section-start=.prefix=0xffffffffeb000000
|
||||
|
||||
# Include generic SBI Makefile
|
||||
#
|
||||
MAKEDEPS += arch/riscv/Makefile.sbi
|
||||
|
||||
Reference in New Issue
Block a user