diff options
author | Damien Zammit <damien@zamaudio.com> | 2024-10-24 00:11:04 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-10-26 23:33:46 +0200 |
commit | 7ea3a05d1dd190db757d577757f2e3dba85e3e15 (patch) | |
tree | 88ac0e39afae2c34124a878486e29385251a345a /i386/i386at/boothdr.S | |
parent | 19aa2eed99e4a05ae25095a6c06d0d157a42fba2 (diff) | |
download | gnumach-7ea3a05d1dd190db757d577757f2e3dba85e3e15.tar.gz gnumach-7ea3a05d1dd190db757d577757f2e3dba85e3e15.tar.bz2 gnumach-7ea3a05d1dd190db757d577757f2e3dba85e3e15.zip |
multiboot: Support graphic mode preferences
This change forces multiboot loader to provide video mode info
and also sets the preferred video mode to EGA text to ensure
existing console behaviour still works.
When support for graphical consoles is provided, we can change
the preferred mode to linear framebuffer.
Message-ID: <20241024001047.3033826-2-damien@zamaudio.com>
Diffstat (limited to 'i386/i386at/boothdr.S')
-rw-r--r-- | i386/i386at/boothdr.S | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/i386/i386at/boothdr.S b/i386/i386at/boothdr.S index daaf57db..ff055746 100644 --- a/i386/i386at/boothdr.S +++ b/i386/i386at/boothdr.S @@ -1,9 +1,17 @@ #include <mach/machine/asm.h> +#include <mach/machine/multiboot.h> #include <i386/apic.h> #include <i386/seg.h> #include <i386/i386asm.h> +#ifdef __ELF__ +#define AOUT_KLUDGE 0 +#else +#define AOUT_KLUDGE MULTIBOOT_AOUT_KLUDGE +#endif /* __ELF__ */ +#define MULTIBOOT_FLAGS MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_MODE | AOUT_KLUDGE + /* * This section will be put first into .text. See also i386/ldscript. */ @@ -16,12 +24,6 @@ _start: jmp boot_entry /* MultiBoot header - see multiboot.h. */ -#define MULTIBOOT_MAGIC 0x1BADB002 -#ifdef __ELF__ -#define MULTIBOOT_FLAGS 0x00000003 -#else /* __ELF__ */ -#define MULTIBOOT_FLAGS 0x00010003 -#endif /* __ELF__ */ P2ALIGN(2) boot_hdr: .long MULTIBOOT_MAGIC @@ -37,7 +39,17 @@ boot_hdr: .long _edata /* load_end_addr */ .long _end /* bss_end_addr */ .long boot_entry /* entry */ +#else + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 #endif /* __ELF__ */ + .long MULTIBOOT_VIDEO_MODE_TYPE_EGA_TEXT + .long 80 + .long 25 + .long MULTIBOOT_VIDEO_PARAM_NO_PREFERENCE boot_entry: movl $percpu_array - KERNELBASE, %eax |