From 6880b6ab80f7aff03baeb68a279799c0375e3b20 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 12 Feb 2019 22:36:57 +0100 Subject: [PATCH] multiboot stuff '-' --- boot/loader/multiboot.inc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 boot/loader/multiboot.inc diff --git a/boot/loader/multiboot.inc b/boot/loader/multiboot.inc new file mode 100644 index 0000000..c0322dd --- /dev/null +++ b/boot/loader/multiboot.inc @@ -0,0 +1,33 @@ +;=----------------------------------------------------------------------------=; +; GNU GPL OS/K ; +; ; +; Desc: Multiboot header ; +; (x86_64 architecture only) ; +; ; +; ; +; Copyright © 2018-2019 The OS/K Team ; +; ; +; This file is part of OS/K. ; +; ; +; OS/K is free software: you can redistribute it and/or modify ; +; it under the terms of the GNU General Public License as published by ; +; the Free Software Foundation, either version 3 of the License, or ; +; (at your option) any later version. ; +; ; +; OS/K is distributed in the hope that it will be useful, ; +; but WITHOUT ANY WARRANTY; without even the implied warranty of ; +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; +; GNU General Public License for more details. ; +; ; +; You should have received a copy of the GNU General Public License ; +; along with OS/K. If not, see . ; +;=----------------------------------------------------------------------------=; + +;; MULTIBOOT HEADER +%define MB_AOUT_KLUDGE 1 << 16 ; We are not an ELF executable +%define MB_ALIGN 1 << 0 ; Ask to align loaded modules on page boundaries +%define MB_MEMINFO 1 << 1 ; Ask to provide memory map +%define MB_HEADER_MAGIC 0x1BADB002 +%define MB_HEADER_FLAGSMULTI BOOT_AOUT_KLUDGE|MULTIBOOT_ALIGN|MULTIBOOT_MEMINFO +%define CHECKSUM -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) +%define KERNEL_STACK 0x00200000 ; Stack starts at the 2mb address & grows down