Changeset d242cb6 in mainline for kernel/arch/amd64


Ignore:
Timestamp:
2013-05-13T22:34:28Z (13 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

Location:
kernel/arch/amd64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/arch/pm.h

    r959d2ec rd242cb6  
    5757#ifdef CONFIG_FB
    5858
    59 #define VESA_INIT_DES      8
    6059#define VESA_INIT_SEGMENT  0x8000
     60#define VESA_INIT_CODE_DES      8
     61#define VESA_INIT_DATA_DES      9
    6162
    6263#undef GDT_ITEMS
    63 #define GDT_ITEMS  9
     64#define GDT_ITEMS  10
    6465
    6566#endif /* CONFIG_FB */
  • kernel/arch/amd64/src/pm.c

    r959d2ec rd242cb6  
    112112        /* VESA Init descriptor */
    113113#ifdef CONFIG_FB
    114         {
    115                 0xffff, 0, VESA_INIT_SEGMENT >> 12, AR_PRESENT | AR_CODE | DPL_KERNEL,
    116                     0xf, 0, 0, 0, 0, 0
    117         }
     114        { 0xffff, 0, VESA_INIT_SEGMENT >> 12, AR_PRESENT | AR_CODE | AR_READABLE | DPL_KERNEL, 0xf, 0, 0, 0, 0, 0 },
     115        { 0xffff, 0, VESA_INIT_SEGMENT >> 12, AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_KERNEL, 0xf, 0, 0, 0, 0, 0 }
    118116#endif
    119117};
Note: See TracChangeset for help on using the changeset viewer.