ff17a6773e
On the original i386, %dr[4-5] were unimplemented but not very clearly reserved, so debuggers read them to print them. i386 was still doing this. On the original athlon64, %dr[4-5] are documented as reserved but are aliased to %dr[6-7] unless CR4_DE is set, when accessing them traps. On 2 of my systems, accessing %dr[4-5] trapped sometimes. On my Haswell system, the apparent randomness was because the boot CPU starts with CR4_DE set while all other CPUs start with CR4_DE clear. FreeBSD doesn't support the data breakpoints enabled by CR4_DE and it never changes this flag, so the flag remains different across CPUs and the behaviour seemed inconsistent except while booting when the CPU doesn't change. The invalid accesses broke: - read access for printing the registers in ddb "show watches" on CPUs with CR4_DE set - read accesses in fill_dbregs() on CPUs with CR4_DE set. This didn't implement panic(3) since the user case always skipped %dr[4-5]. - write accesses in set_dbregs(). This also didn't affect userland. When it didn't trap, the aliasing made it fragile. Don't print the dummy (zero) values of %dr[4-5] in "show watches" for i386 or amd64. Fix style bugs near this printing. amd64 also has space in the dbregs struct for the reserved %dr[8-15] and already didn't print the dummy values for these, and never accessed any of the 10 reserved debug registers. Remove cpufuncs for making the invalid accesses. Even amd64 had these. |
||
---|---|---|
.. | ||
pc | ||
xen | ||
_align.h | ||
_bus.h | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
acpica_machdep.h | ||
apm_bios.h | ||
apm_segments.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bootinfo.h | ||
bus_dma.h | ||
bus.h | ||
clock.h | ||
counter.h | ||
cpu.h | ||
cpufunc.h | ||
cputypes.h | ||
cserial.h | ||
db_machdep.h | ||
dump.h | ||
efi.h | ||
elan_mmcr.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
fdt.h | ||
float.h | ||
floatingpoint.h | ||
frame.h | ||
gdb_machdep.h | ||
ieeefp.h | ||
if_wl_wavelan.h | ||
in_cksum.h | ||
intr_machdep.h | ||
ioctl_bt848.h | ||
ioctl_meteor.h | ||
iodev.h | ||
kdb.h | ||
limits.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
minidump.h | ||
mp_watchdog.h | ||
nexusvar.h | ||
npx.h | ||
ofw_machdep.h | ||
param.h | ||
pcaudioio.h | ||
pcb_ext.h | ||
pcb.h | ||
pci_cfgreg.h | ||
pcpu.h | ||
perfmon.h | ||
pmap.h | ||
pmc_mdep.h | ||
ppireg.h | ||
proc.h | ||
profile.h | ||
psl.h | ||
ptrace.h | ||
pvclock.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
runq.h | ||
segments.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smapi.h | ||
smp.h | ||
speaker.h | ||
specialreg.h | ||
stack.h | ||
stdarg.h | ||
sysarch.h | ||
timerreg.h | ||
trap.h | ||
tss.h | ||
ucontext.h | ||
varargs.h | ||
vdso.h | ||
vm86.h | ||
vm.h | ||
vmparam.h | ||
xbox.h |