multiboot stuff '-'

This commit is contained in:
Adrien Bourmault 2019-02-12 22:36:57 +01:00
parent d8a43e0688
commit 6880b6ab80
1 changed files with 33 additions and 0 deletions

33
boot/loader/multiboot.inc Normal file
View File

@ -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 <https://www.gnu.org/licenses/>. ;
;=----------------------------------------------------------------------------=;
;; 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