1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00
freebsd/sys/x86/include
Andrew Gallatin fd67ff5c7a Use the correct idle routine on recent AMD EPYC servers
We have been incorrectly choosing the "hlt" idle method on modern AMD
EPYC servers for C1 idle. This is because AMD also uses the Functional
Fixed Hardware interface. Due to not parsing the table properly for
AMD, and due to a weird quirk where the mwait latency for C1 is
mis-interpreted as the latency for hlt, we wind up choosing hlt for
c1, which has a far higher wake up latency (similar to IO) of roughly
400us on my test system (AMD 7502P).

This patch fixes this by:

- Looking for AMD in addition to Intel in the FFH
 (Note the vendor id of "2" for AMD is not publically documented, but
 AMD has confirmed they are using "2" and has promised to document it.)

- Using mwait on AMD when specified in the table, and when CPUid says
 its supported

- Fixing a weird issue where we copy the contents of cx_ptr for C1 and
 when moving to C2, we do not reinitialize cx_ptr. This leads to
 mwait being selected, and ignoring the specified i/o halt method
 unless we clear mwait before looking at the table for C2.

Differential Revision: https://reviews.freebsd.org/D47444
Reviewed by: dab, kib, vangyzen
Sponsored by: Netflix
2024-11-08 17:10:44 -05:00
..
xen
_align.h
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h xen/pvh: fix initialization of environment 2024-08-02 12:41:52 +02:00
apicreg.h
apicvar.h apic: add ioapic_get_dev() method 2024-10-17 17:31:50 +03:00
apm_bios.h
bus_dma.h
bus.h
busdma_impl.h
clock.h
cputypes.h
dump.h
elf.h
endian.h
fdt.h
float.h
fpu.h
frame.h
ifunc.h
init.h
intr_machdep.h
iommu.h
kvm.h
legacyvar.h
mca.h Revert "mca: Allow for passing ECC error record to memory controller driver" 2024-09-18 10:44:37 -04:00
metadata.h Add a new sysctl in order to diffrentiate UEFI architectures 2024-09-20 08:45:09 -06:00
mptable.h
ofw_machdep.h
pci_cfgreg.h
ppireg.h
procctl.h
psl.h
ptrace.h
pvclock.h
reg.h
segments.h
setjmp.h
sigframe.h
signal.h
specialreg.h x86 specialreg: add bit masks definitions for LASS and LAM features 2024-10-24 05:41:11 +03:00
stack.h
stdarg.h
sysarch.h
timerreg.h
tls.h
trap.h
ucode.h
ucontext.h
vdso.h
vmware_guestrpc.h
vmware.h
x86_ieeefp.h
x86_smp.h
x86_var.h Use the correct idle routine on recent AMD EPYC servers 2024-11-08 17:10:44 -05:00