Ignore:
Timestamp:
2013-05-13T22:34:28Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6e8ed225
Parents:
959d2ec
Message:

make sure we configure two distinct segment descriptors and set the read bit on the code segment before switching back to real-mode for VESA/VBE
this fixes execution on the latest (3.9.1) Linux KVM with real-mode x86 code emulation that is particularly picky about the code segment permission bits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/boot/vesa_real.inc

    r959d2ec rd242cb6  
    3131vesa_init:
    3232        lidtl vesa_idtr
    33         jmp $GDT_SELECTOR(VESA_INIT_DES), $vesa_init_real - vesa_init
     33       
     34        mov $GDT_SELECTOR(VESA_INIT_DATA_DES), %bx
     35       
     36        mov %bx, %es
     37        mov %bx, %fs
     38        mov %bx, %gs
     39        mov %bx, %ds
     40        mov %bx, %ss
     41       
     42        jmp $GDT_SELECTOR(VESA_INIT_CODE_DES), $vesa_init_real - vesa_init
    3443
    3544vesa_idtr:
     
    3948.code16
    4049vesa_init_real:
    41        
    4250        mov %cr0, %eax
    4351        and $~1, %eax
     
    4553       
    4654        jmp $VESA_INIT_SEGMENT, $vesa_init_real2 - vesa_init
    47        
     55
    4856vesa_init_real2:
    4957        mov $VESA_INIT_SEGMENT, %bx
Note: See TracChangeset for help on using the changeset viewer.