[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] [PATCH] Crash during serial debugging



Description:

When MFP_DEBUG_DIRECT isn't defined, BIOS function "Bconout( )" is
called to output debug messages. During initialization until all
interrupts vectors and new trap routines are initialized this function
is used through a normal trap, and later trough a trap wrapper. The
flag "intr_done" is activated to mark this point. During the boot
process the macro DEBUG is used after interrupts initialization and
before the flag is activated, this makes the kernel crash when using
serial debugging with "Bconout( )".
Index: init.c
===================================================================
RCS file: /mint/freemint/sys/init.c,v
retrieving revision 1.121
diff -u -8 -p -r1.121 init.c
--- init.c	13 Jan 2010 17:13:49 -0000	1.121
+++ init.c	1 Dec 2010 10:25:13 -0000
@@ -449,23 +449,23 @@ init (void)
 	/* Disable all CPU caches */
 # ifndef M68000
 	ccw_set(0x00000000L, 0x0000c57fL);
 	DEBUG (("ccw_set() ok!"));
 # endif
 
 	/* initialize interrupt vectors */
 	init_intr ();
-	DEBUG (("init_intr() ok!"));
 
 	/* after init_intr we are in kernel
 	 * trapping isn't allowed anymore; use direct calls
 	 * from now on
 	 */
 	intr_done = 1;
+	DEBUG (("init_intr() ok!"));
 
 	/* Enable superscalar dispatch on 68060 */
 # ifndef M68000
 	get_superscalar();
 # endif
 
 	/* Init done, now enable/unfreeze all caches.
 	 * Don't touch the write/allocate bits, though.