mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
Merged from sys/i386/i386/machdep.c revision 1.400.
This commit is contained in:
parent
5aef48a16b
commit
e2c9a41a3c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64552
@ -253,6 +253,7 @@ vm_offset_t phys_avail[10];
|
||||
static vm_offset_t buffer_sva, buffer_eva;
|
||||
vm_offset_t clean_sva, clean_eva;
|
||||
static vm_offset_t pager_sva, pager_eva;
|
||||
static struct trapframe proc0_tf;
|
||||
|
||||
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||
|
||||
@ -447,6 +448,7 @@ cpu_startup(dummy)
|
||||
mp_start(); /* fire up the APs and APICs */
|
||||
mp_announce();
|
||||
#endif /* SMP */
|
||||
cpu_setregs();
|
||||
}
|
||||
|
||||
int
|
||||
@ -1077,6 +1079,22 @@ setregs(p, entry, stack, ps_strings)
|
||||
p->p_retval[1] = 0;
|
||||
}
|
||||
|
||||
void
|
||||
cpu_setregs(void)
|
||||
{
|
||||
unsigned int cr0;
|
||||
|
||||
cr0 = rcr0();
|
||||
cr0 |= CR0_NE; /* Done by npxinit() */
|
||||
cr0 |= CR0_MP | CR0_TS; /* Done at every execve() too. */
|
||||
#ifdef I386_CPU
|
||||
if (cpu_class != CPUCLASS_386)
|
||||
#endif
|
||||
cr0 |= CR0_WP | CR0_AM;
|
||||
load_cr0(cr0);
|
||||
load_gs(_udatasel);
|
||||
}
|
||||
|
||||
static int
|
||||
sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
@ -2277,6 +2295,7 @@ init386(first)
|
||||
proc0.p_addr->u_pcb.pcb_mpnest = 1;
|
||||
#endif
|
||||
proc0.p_addr->u_pcb.pcb_ext = 0;
|
||||
proc0.p_md.md_regs = &proc0_tf;
|
||||
}
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
|
@ -253,6 +253,7 @@ vm_offset_t phys_avail[10];
|
||||
static vm_offset_t buffer_sva, buffer_eva;
|
||||
vm_offset_t clean_sva, clean_eva;
|
||||
static vm_offset_t pager_sva, pager_eva;
|
||||
static struct trapframe proc0_tf;
|
||||
|
||||
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||
|
||||
@ -447,6 +448,7 @@ cpu_startup(dummy)
|
||||
mp_start(); /* fire up the APs and APICs */
|
||||
mp_announce();
|
||||
#endif /* SMP */
|
||||
cpu_setregs();
|
||||
}
|
||||
|
||||
int
|
||||
@ -1077,6 +1079,22 @@ setregs(p, entry, stack, ps_strings)
|
||||
p->p_retval[1] = 0;
|
||||
}
|
||||
|
||||
void
|
||||
cpu_setregs(void)
|
||||
{
|
||||
unsigned int cr0;
|
||||
|
||||
cr0 = rcr0();
|
||||
cr0 |= CR0_NE; /* Done by npxinit() */
|
||||
cr0 |= CR0_MP | CR0_TS; /* Done at every execve() too. */
|
||||
#ifdef I386_CPU
|
||||
if (cpu_class != CPUCLASS_386)
|
||||
#endif
|
||||
cr0 |= CR0_WP | CR0_AM;
|
||||
load_cr0(cr0);
|
||||
load_gs(_udatasel);
|
||||
}
|
||||
|
||||
static int
|
||||
sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
@ -2277,6 +2295,7 @@ init386(first)
|
||||
proc0.p_addr->u_pcb.pcb_mpnest = 1;
|
||||
#endif
|
||||
proc0.p_addr->u_pcb.pcb_ext = 0;
|
||||
proc0.p_md.md_regs = &proc0_tf;
|
||||
}
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
|
Loading…
Reference in New Issue
Block a user