From eb562f2c860061868e4ea1a821a84147b694dd07 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 21 Aug 1998 16:39:52 +0000 Subject: Patch from Eric Valette : Here is a patch that enables to catch exception and get message before crashing RTEMS :) It should be generic to any Intel port although enabled only for pc386 BSP... [Joel] I fixed the bug I introduced in irq_asm.s... --- c/src/lib/libbsp/i386/pc386/start/start16.s | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'c/src/lib/libbsp/i386/pc386/start/start16.s') diff --git a/c/src/lib/libbsp/i386/pc386/start/start16.s b/c/src/lib/libbsp/i386/pc386/start/start16.s index c10a658718..778c0dd597 100644 --- a/c/src/lib/libbsp/i386/pc386/start/start16.s +++ b/c/src/lib/libbsp/i386/pc386/start/start16.s @@ -33,7 +33,7 @@ .set HDROFF, 0x24 # offset into bin2boot header of start32 addr .set STACKOFF, 0x200-0x10 # offset to load into %esp, from start of image - +/* #define NEW_GAS*/ /*----------------------------------------------------------------------------+ | CODE section +----------------------------------------------------------------------------*/ @@ -78,14 +78,20 @@ _start16: /*---------------------------------------------------------------------+ | Bare PC machines boot in real mode! We have to turn protected mode on. +---------------------------------------------------------------------*/ - +#ifdef NEW_GAS + data32 + addr32 +#endif lgdt gdtptr - start16 # load Global Descriptor Table - movl %cr0, %eax orl $CR0_PE, %eax movl %eax, %cr0 # turn on protected mode +#ifdef NEW_GAS + ljmpl $PROT_CODE_SEG, $1f # flush prefetch queue, and reload %cs +#else ljmp $PROT_CODE_SEG, $1f # flush prefetch queue, and reload %cs +#endif 1: .code32 -- cgit v1.2.3