From f90ba97d5091ad85f089817231f53e34a0f6f259 Mon Sep 17 00:00:00 2001
From: Luca Dariz <luca.dariz@gmail.com>
Date: Sat, 5 Feb 2022 18:51:24 +0100
Subject: add support for booting from grub with x86_64

* configure: compile for native x86_64 by default instead of xen
* x86_64/Makefrag.am: introduce KERNEL_MAP_BASE to reuse the constant
  in both code and linker script
* x86_64/ldscript: use a .boot section for the very first operations,
  until we reach long mode. This section is not really allocated, so
  it doesn't need to be freed later. The vm system is later
  initialized starting from .text and not including .boot
* link kernel at 0x4000000 as the xen version, higher values causes
  linker errors
* we can't use full segmentation in long mode, so we need to create a
  temporary mapping during early boot to be able to jump to high
  addresses
* build direct map for first 4G in boothdr, it seems required by Linux
  drivers
* add INTEL_PTE_PS bit definition to enable 2MB pages during bootstrap
* ensure write bit is set in PDP entry access rights. This only
  applies to PAE-enabled kernels, mandatory for x86_64. On xen
  platform it seems to be handled differently

Signed-off-by: Luca Dariz <luca@orpolo.org>
Message-Id: <20220205175129.309469-2-luca@orpolo.org>
---
 configure.ac | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'configure.ac')

diff --git a/configure.ac b/configure.ac
index 019842db..3aaa935c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,8 +56,7 @@ case $host_platform:$host_cpu in
   default:i?86)
     host_platform=at;;
   default:x86_64)]
-    AC_MSG_WARN([Platform set to Xen by default, this can not boot on non-Xen systems, you currently need a 32bit build for that.])
-    [host_platform=xen;;
+    [host_platform=at;;
   at:i?86 | xen:i?86 | at:x86_64 | xen:x86_64)
     :;;
   *)]
-- 
cgit v1.2.3