Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/machdep.c
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | #ifdef VFP | ||||
struct pcb *pcb; | struct pcb *pcb; | ||||
pcb = td->td_pcb; | pcb = td->td_pcb; | ||||
if ((pcb->pcb_fpflags & PCB_FP_STARTED) != 0) { | if ((pcb->pcb_fpflags & PCB_FP_STARTED) != 0) { | ||||
/* | /* | ||||
* If we have just been running VFP instructions we will | * If we have just been running VFP instructions we will | ||||
* need to save the state to memcpy it below. | * need to save the state to memcpy it below. | ||||
*/ | */ | ||||
if (td == curthread) | |||||
jhb: This includes D11972 because I tested these in a shared tree, but I will commit D11972 first. | |||||
vfp_save_state(td, pcb); | vfp_save_state(td, pcb); | ||||
KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate, | KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate, | ||||
("Called fill_fpregs while the kernel is using the VFP")); | ("Called fill_fpregs while the kernel is using the VFP")); | ||||
memcpy(regs->fp_q, pcb->pcb_fpustate.vfp_regs, | memcpy(regs->fp_q, pcb->pcb_fpustate.vfp_regs, | ||||
sizeof(regs->fp_q)); | sizeof(regs->fp_q)); | ||||
regs->fp_cr = pcb->pcb_fpustate.vfp_fpcr; | regs->fp_cr = pcb->pcb_fpustate.vfp_fpcr; | ||||
regs->fp_sr = pcb->pcb_fpustate.vfp_fpsr; | regs->fp_sr = pcb->pcb_fpustate.vfp_fpsr; | ||||
} else | } else | ||||
▲ Show 20 Lines • Show All 811 Lines • ▼ Show 20 Lines | if (!valid) | ||||
panic("Invalid bus configuration: %s", | panic("Invalid bus configuration: %s", | ||||
kern_getenv("kern.cfg.order")); | kern_getenv("kern.cfg.order")); | ||||
init_proc0(abp->kern_stack); | init_proc0(abp->kern_stack); | ||||
msgbufinit(msgbufp, msgbufsize); | msgbufinit(msgbufp, msgbufsize); | ||||
mutex_init(); | mutex_init(); | ||||
init_param2(physmem); | init_param2(physmem); | ||||
dbg_monitor_init(); | dbg_init(); | ||||
kdb_init(); | kdb_init(); | ||||
pan_enable(); | pan_enable(); | ||||
early_boot = 0; | early_boot = 0; | ||||
} | |||||
void | |||||
dbg_init(void) | |||||
{ | |||||
/* Clear OS lock */ | |||||
WRITE_SPECIALREG(OSLAR_EL1, 0); | |||||
/* This permits DDB to use debug registers for watchpoints. */ | |||||
dbg_monitor_init(); | |||||
/* TODO: Eventually will need to initialize debug registers here. */ | |||||
} | } | ||||
#ifdef DDB | #ifdef DDB | ||||
#include <ddb/ddb.h> | #include <ddb/ddb.h> | ||||
DB_SHOW_COMMAND(specialregs, db_show_spregs) | DB_SHOW_COMMAND(specialregs, db_show_spregs) | ||||
{ | { | ||||
#define PRINT_REG(reg) \ | #define PRINT_REG(reg) \ | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |
This includes D11972 because I tested these in a shared tree, but I will commit D11972 first.