[librm] Transition to protected mode within init_librm()
authorMichael Brown <mcb30@ipxe.org>
Fri, 19 Feb 2016 00:56:20 +0000 (00:56 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 19 Feb 2016 01:01:27 +0000 (01:01 +0000)
commit6eb1c927a3e245dd571507e86bbde8e8a29f582b
tree0117f6a9f7c96babf8ae7fa497ccb422bfcaea61
parent31b5c2e753dbcb3d5023bccc8e644d0bcb56b2ad
[librm] Transition to protected mode within init_librm()

Long-mode operation will require page tables, which are too large to
sensibly fit in our .data16 segment in base memory.

Add a portion of init_librm() running in 32-bit protected mode to
provide access to high memory.  Use this portion of init_librm() to
initialise the .textdata variables "virt_offset", "text16", and
"data16", eliminating the redundant (re)initialisation currently
performed on every mode transition as part of real_to_prot().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/include/librm.h
src/arch/x86/transitions/librm.S