diff options
| author | Arslaan Pathan <[email protected]> | 2026-03-20 13:12:45 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-03-20 13:12:45 +1300 |
| commit | bebf05d0c10d7eae0861112a8491aad08403c039 (patch) | |
| tree | e461648de2677b2886ae7e5b4e6780b1e6993786 /src/boot.s | |
| parent | 7e8df0108eb93c0ca63baa396c7ebadada5931bd (diff) | |
| download | FrenchToastOS-bebf05d0c10d7eae0861112a8491aad08403c039.tar.xz FrenchToastOS-bebf05d0c10d7eae0861112a8491aad08403c039.zip | |
try ask grub for framebuffer? one can hope
Diffstat (limited to 'src/boot.s')
| -rw-r--r-- | src/boot.s | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -2,17 +2,33 @@ This software is licensed under the ARPL. See LICENSE for details. */ /* Multiboot header dark magic, do not touch */ -.set ALIGN, 1<<0 -.set MEMINFO, 1<<1 -.set FLAGS, ALIGN | MEMINFO -.set MAGIC, 0x1BADB002 +.set ALIGN, 1<<0 +.set MEMINFO, 1<<1 +.set VIDMODE, 1<<2 +.set FLAGS, ALIGN | MEMINFO | VIDMODE +.set MAGIC, 0x1BADB002 .set CHECKSUM, -(MAGIC + FLAGS) +/* ask grub for framebuffer + if this breaks the OS i might crash out */ +.set WIDTH, 1024 +.set HEIGHT, 768 +.set DEPTH, 32 + .section .multiboot .align 4 .long MAGIC .long FLAGS .long CHECKSUM +.long 0 /* header_addr (unused) */ +.long 0 /* load_addr (unused) */ +.long 0 /* load_end_addr (unused) */ +.long 0 /* bss_end_addr (unused) */ +.long 0 /* entry_addr (unused) */ +.long 0 /* mode_type: 0 = linear framebuffer */ +.long WIDTH /* width */ +.long HEIGHT /* height */ +.long DEPTH /* depth */ /* Multiboot does not define the esp/stack, create the stack ourselves */ .section bss @@ -43,6 +59,7 @@ _start: ABI says we need 16-byte alignment here, we aligned that before and pushed a multiple of 16 bits (zero) so we fine but i will realign for good measure anyway */ .align 16 + push %ebx call kernel_main /* if nothing left then just infinite loop */ |
