mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 01:34:09 +00:00
Fixed hang on booting with -d. mtx_enter() was called on an uninitialized
lock. The quick fix in trap.c was not quite the version tested and had no effect; back it out.
This commit is contained in:
parent
715ca46f5c
commit
9c15b3c143
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65811
|
@ -1953,6 +1953,12 @@ init386(first)
|
|||
isa_defaultirq();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Giant is used early for at least debugger traps, unexpected traps,
|
||||
* and vm86bios initialization.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
|
||||
#ifdef DDB
|
||||
kdb_init();
|
||||
if (boothowto & RB_KDB)
|
||||
|
@ -1987,12 +1993,6 @@ init386(first)
|
|||
dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL);
|
||||
dblfault_tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL);
|
||||
|
||||
/*
|
||||
* We grab Giant during the vm86bios routines, so we need to ensure
|
||||
* that it is up and running before we use vm86.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
|
||||
vm86_initialize();
|
||||
getmemsize(first);
|
||||
|
||||
|
|
|
@ -279,8 +279,7 @@ trap(frame)
|
|||
enable_intr();
|
||||
}
|
||||
|
||||
if (p != NULL || !cold)
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
restart:
|
||||
|
@ -640,8 +639,7 @@ trap(frame)
|
|||
user:
|
||||
userret(p, &frame, sticks, 1);
|
||||
out:
|
||||
if (p != NULL || !cold)
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
|
|
|
@ -1953,6 +1953,12 @@ init386(first)
|
|||
isa_defaultirq();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Giant is used early for at least debugger traps, unexpected traps,
|
||||
* and vm86bios initialization.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
|
||||
#ifdef DDB
|
||||
kdb_init();
|
||||
if (boothowto & RB_KDB)
|
||||
|
@ -1987,12 +1993,6 @@ init386(first)
|
|||
dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL);
|
||||
dblfault_tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL);
|
||||
|
||||
/*
|
||||
* We grab Giant during the vm86bios routines, so we need to ensure
|
||||
* that it is up and running before we use vm86.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
|
||||
vm86_initialize();
|
||||
getmemsize(first);
|
||||
|
||||
|
|
|
@ -279,8 +279,7 @@ trap(frame)
|
|||
enable_intr();
|
||||
}
|
||||
|
||||
if (p != NULL || !cold)
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
restart:
|
||||
|
@ -640,8 +639,7 @@ trap(frame)
|
|||
user:
|
||||
userret(p, &frame, sticks, 1);
|
||||
out:
|
||||
if (p != NULL || !cold)
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
|
|
|
@ -279,8 +279,7 @@ trap(frame)
|
|||
enable_intr();
|
||||
}
|
||||
|
||||
if (p != NULL || !cold)
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
restart:
|
||||
|
@ -640,8 +639,7 @@ trap(frame)
|
|||
user:
|
||||
userret(p, &frame, sticks, 1);
|
||||
out:
|
||||
if (p != NULL || !cold)
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
|
|
Loading…
Reference in a new issue