From a3fe978f8ab957ea216b6d50982c7da2b70abea2 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 10 Dec 2013 19:12:16 +0100 Subject: [PATCH] boot loader: Always show 4 GB memory limit safemode option On x86 we mainly want to disable PAE, which is now also used with less memory as long as NX support is available. Ideally we'd check this condition as well and only add the menu item, if the kernel would enable PAE. --- src/system/boot/loader/menu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/system/boot/loader/menu.cpp b/src/system/boot/loader/menu.cpp index 400b8e4148..8f35f19ce6 100644 --- a/src/system/boot/loader/menu.cpp +++ b/src/system/boot/loader/menu.cpp @@ -1135,8 +1135,12 @@ add_safe_mode_menu() } } - // ... add the menu, if so - if (hasMemoryBeyond4GB) { + bool needs64BitPaging = true; + // TODO: Determine whether 64 bit paging (i.e. PAE for x86) is needed + // for other reasons (NX support). + + // ... add the menu item, if so + if (hasMemoryBeyond4GB || needs64BitPaging) { safeMenu->AddItem( item = new(nothrow) MenuItem("Ignore memory beyond 4 GiB")); item->SetData(B_SAFEMODE_4_GB_MEMORY_LIMIT);