[librm] Always disable paging when switching to protected mode

Commit 6143057 ("[librm] Add support for running in 64-bit long mode")
treated disabling paging on the transition into protected mode as
something that needed to be done as a precaution only in a 64-bit
build, on the assumption that in a 32-bit BIOS system nothing else
would be enabling paging.

The Intel SDM states that setting CR0.PG in real mode (with CR0.PE
clear) will raise a general-protection exception anyway, and so we
should never encounter a situation in which CR0.PG is set at this
point.  A review of the bochs source code suggests that it may be
possible to encounter the combination of CR0.PG set with CR0.PE clear
in an SVM guest.

Err on the side of paranoia and always disable paging as part of the
transition from real mode to protected mode.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
1 file changed
tree: d47384f47fa5aa694afcea1a674c3c29962420b1
  1. .claude/
  2. .github/
  3. contrib/
  4. src/
  5. AGENTS.md
  6. CHANGELOG.md
  7. CLAUDE.md
  8. CONTRIBUTING.md
  9. COPYING
  10. COPYING.GPLv2
  11. COPYING.UBDL
  12. README.md
  13. RELEASE.md
  14. RELNOTES.tmpl.md
  15. SECURITY.md
README.md

iPXE network bootloader

Build Coverity Release

iPXE is the leading open source network boot firmware. It provides a full PXE implementation enhanced with additional features such as:

  • boot from a web server via HTTP or HTTPS,

  • boot from an iSCSI, FCoE, or AoE SAN,

  • control the boot process with a script,

  • create interactive forms and menus.

You can use iPXE to replace the existing PXE ROM on your network card, or you can chainload into iPXE to obtain the features of iPXE without the hassle of reflashing.

iPXE is free, open-source software licensed under the GNU GPL (with some portions under GPL-compatible licences).

You can download the rolling release binaries (built from the latest commit), or use the most recent stable release.

For full documentation, visit the iPXE website.