From 351efb22d5beb9dd2fdb4d5e1ea9e77c47cf7681 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 19 Oct 2001 18:04:02 +0000 Subject: [PATCH] Set the accessed bit on the segment descriptors to prevent writing to them. --- src/cpu/i386/entry16.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cpu/i386/entry16.inc b/src/cpu/i386/entry16.inc index 52b693e8f8..d9906c3096 100644 --- a/src/cpu/i386/entry16.inc +++ b/src/cpu/i386/entry16.inc @@ -39,6 +39,7 @@ EXT(_start): jmp _realstart /** GDT. we have modified this from the original freebios to make it * compatible with linux. This puts text at seg 0x10 and data at 0x18 */ +.align 4 .globl EXT(gdtptr) EXT(gdtptr): .word 4*8-1 @@ -51,10 +52,10 @@ gdt: .byte 0x0, 0x0, 0x0, 0x0 .word 0xffff, 0x0000 /* flat code segment */ - .byte 0x0, 0x9a, 0xcf, 0x0 + .byte 0x0, 0x9b, 0xcf, 0x0 .word 0xffff, 0x0000 /* flat data segment */ - .byte 0x0, 0x92, 0xcf, 0x0 + .byte 0x0, 0x93, 0xcf, 0x0 _realstart: @@ -63,7 +64,7 @@ _realstart: /* thanks to kmliu@sis.tw.com for this TBL fix ... */ /**/ /* IMMEDIATELY invalidate the translation lookaside buffer before executing*/ -/* any further code. Even though paging is we, disabled could still get*/ +/* any further code. Even though paging is disabled we could still get*/ /*false address translations due to the TLB if we didn't invalidate it.*/ /**/ xor %eax, %eax @@ -135,3 +136,4 @@ _realstart: movw %ax, %fs movw %ax, %gs +