Ignore:
Timestamp:
2018-11-13T20:14:30Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2214382, 64f85f5
Parents:
6ae5e3f (diff), 9a791eb9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-13 20:14:30)
git-committer:
GitHub <noreply@…> (2018-11-13 20:14:30)
Message:

Remove realmode VESA code (#59)

Enables framebuffer initialization via multiboot1(multiboot2 already did it), and removes the obsolete code. Then deduplicates code for the two multiboots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/boot/multiboot2.S

    r6ae5e3f re3fa1720  
    3232#include <arch/cpuid.h>
    3333#include <genarch/multiboot/multiboot2.h>
    34 
    35 #define START_STACK  (BOOT_OFFSET - BOOT_STACK_SIZE)
    3634
    3735.section K_TEXT_START, "ax"
     
    7876                .word MULTIBOOT2_FLAGS_REQUIRED
    7977                .long tag_entry_address_end - tag_entry_address_start
    80                 .long multiboot2_image_start
     78                .long multiboot_image_start
    8179        tag_entry_address_end:
    8280
     
    120118        tag_terminator_end:
    121119multiboot2_header_end:
    122 
    123 SYMBOL(multiboot2_image_start)
    124         cli
    125         cld
    126 
    127         /* Initialize stack pointer */
    128         movl $START_STACK, %esp
    129 
    130         /*
    131          * Initialize Global Descriptor Table and
    132          * Interrupt Descriptor Table registers
    133          */
    134         lgdtl bootstrap_gdtr
    135         lidtl bootstrap_idtr
    136 
    137         /* Kernel data + stack */
    138         movw $GDT_SELECTOR(KDATA_DES), %cx
    139         movw %cx, %es
    140         movw %cx, %fs
    141         movw %cx, %gs
    142         movw %cx, %ds
    143         movw %cx, %ss
    144 
    145         jmpl $GDT_SELECTOR(KTEXT_DES), $multiboot2_meeting_point
    146         multiboot2_meeting_point:
    147 
    148         /* Save multiboot arguments */
    149         movl %eax, multiboot_eax
    150         movl %ebx, multiboot_ebx
    151 
    152 #ifndef PROCESSOR_i486
    153 
    154         movl $(INTEL_CPUID_LEVEL), %eax
    155         cpuid
    156         cmp $0x0, %eax  /* any function > 0? */
    157         jbe pse_unsupported
    158 
    159         movl $(INTEL_CPUID_STANDARD), %eax
    160         cpuid
    161         bt $(INTEL_PSE), %edx
    162         jnc pse_unsupported
    163 
    164                 /* Map kernel and turn paging on */
    165                 call map_kernel_pse
    166                 jmp stack_init
    167 
    168 #endif /* PROCESSOR_i486 */
    169 
    170         pse_unsupported:
    171 
    172                 /* Map kernel and turn paging on */
    173                 call map_kernel_non_pse
    174 
    175         stack_init:
    176 
    177         /* Create the first stack frame */
    178         pushl $0
    179         movl %esp, %ebp
    180 
    181         /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */
    182         pushl multiboot_ebx
    183         pushl multiboot_eax
    184         call ia32_pre_main
    185 
    186         /* Call main_bsp() */
    187         call main_bsp
    188 
    189         /* Not reached */
    190         cli
    191         hlt0:
    192                 hlt
    193                 jmp hlt0
Note: See TracChangeset for help on using the changeset viewer.