Ignore:
Timestamp:
2011-12-02T17:29:43Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b8b1e631, c3887ad
Parents:
c48f6ab
Message:

implement multiboot v2 specification and use it in GRUB for UEFI

  • improve multiboot v1 code, move defines to a common location
  • rename VESA framebuffer stuff to generic "boot framebuffer"
  • small collateral changes
File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/boot/multiboot.S

    rc48f6ab r1f5c9c96  
    3030
    3131#include <arch/boot/boot.h>
    32 #include <arch/boot/memmap.h>
    3332#include <arch/mm/page.h>
    3433#include <arch/mm/ptl.h>
    3534#include <arch/pm.h>
     35#include <genarch/multiboot/multiboot.h>
     36#include <arch/cpuid.h>
    3637#include <arch/cpu.h>
    37 #include <arch/cpuid.h>
    3838
    3939#define START_STACK  (BOOT_OFFSET - BOOT_STACK_SIZE)
     
    101101        multiboot_meeting_point:
    102102       
    103         /* Save GRUB arguments */
    104         movl %eax, grub_eax
    105         movl %ebx, grub_ebx
     103        /*
     104         * Protected 32-bit. We want to reuse the code-seg descriptor,
     105         * the Default operand size must not be 1 when entering long mode.
     106         */
     107       
     108        /* Save multiboot arguments */
     109        movl %eax, multiboot_eax
     110        movl %ebx, multiboot_ebx
    106111       
    107112        pm_status $status_prot
     
    149154       
    150155#include "vesa_prot.inc"
    151        
    152         /*
    153          * Protected 32-bit. We want to reuse the code-seg descriptor,
    154          * the Default operand size must not be 1 when entering long mode.
    155          */
    156156       
    157157        pm2_status $status_prot2
     
    422422        long_status $status_long
    423423       
    424         /* Call arch_pre_main(grub_eax, grub_ebx) */
     424        /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */
    425425        xorq %rdi, %rdi
    426         movl grub_eax, %edi
     426        movl multiboot_eax, %edi
    427427        xorq %rsi, %rsi
    428         movl grub_ebx, %esi
     428        movl multiboot_ebx, %esi
    429429       
    430430        movabsq $arch_pre_main, %rax
     
    645645.section K_DATA_START, "aw", @progbits
    646646
     647.global bootstrap_gdtr
    647648bootstrap_gdtr:
    648649        .word GDT_SELECTOR(GDT_ITEMS)
    649650        .long KA2PA(gdt)
    650651
    651 grub_eax:
     652.global multiboot_eax
     653multiboot_eax:
    652654        .long 0
    653655
    654 grub_ebx:
     656.global multiboot_ebx
     657multiboot_ebx:
    655658        .long 0
    656659
     
    670673status_vesa_copy:
    671674        .asciz "[vesa_copy] "
    672 status_grub_cmdline:
    673         .asciz "[grub_cmdline] "
     675status_multiboot_cmdline:
     676        .asciz "[multiboot_cmdline] "
    674677status_vesa_real:
    675678        .asciz "[vesa_real] "
Note: See TracChangeset for help on using the changeset viewer.