cpuctl(8): decode L2 cache associativity for VIA CPUs using the AMD cache lookup
table for the 0x80000006 CPUID function associativity value.
Use `cpuid leaf 4' to get cache parameters for Zhaoxin and late VIA CPU models.
Mirrors the changes from identcpu.c rev. 1.142.
Additionally, use via_cpu_probe() and via_cpu_cacheinfo() for CPUVENDOR_IDT
family > 6 CPUs to identify Zhaoxin CPUs and their features.
Also, print feature 5-7 bits for CPUVENDOR_IDT, which appear to be compatible
with Intel.
Use vendorname = "Zhaoxin" for family 7 models.
Tested on various 32-bit and 64-bit VIA and Zhaoxin CPUs
(Samuel 2 / Nehemiah, Esther (32-bit), multiple Nano models, and KX-U6580/7000).
PR kern/60619
pullups needed to netbsd-11 and netbsd-10.
Decode L2 cache associativity for VIA CPUs using the AMD cache lookup table for
the 0x80000006 CPUID function associativity value.
Use `cpuid leaf 4' to get cache parameters for Zhaoxin and late VIA CPU models.
VIA datasheets mention that associativity is stored as a decimal value. However,
in practice, it is encoded the AMD way and does not store the actual value.
Using the raw value leads to an incorrect CPU colors calculation, causing a
panic on KX-7000 (since the result is not a power of two) and incorrect CPU
colors values on other CPU models (e.g. as visible in `vmstat -s').
Decoding value using the AMD cache lookup table produces correct values in all
cases I have tested or verified using CPUID dumps available online.
Additionally, Zhaoxin and late VIA CPUs (CNQ and newer) prefer the Intel
`cpuid leaf 4' function to get cache parameters. Check whether cpuid_level
is equal to or greater than 4 to identify these CPUs and override cache values
(including L1) by calling cpu_dcp_cacheinfo(ci, 4). L3 cache information is
available only through this method.
[7 lines not shown]
Pull up following revision(s) (requested by skrll in ticket #442):
sys/arch/riscv/include/asm.h: revision 1.13
Ensure 4-byte (32bit alignment) in ENTRY_NP so that non-compressable
instructions get the correct alignment.
Pull up following revision(s) (requested by tls in ticket #441):
external/gpl3/gdb/dist/gdb/Makefile.in: revision 1.11
Fix MKCROSSGDB build from release source tars that have had permissions
whanged around
Pull up following revision(s) (requested by tls in ticket #440):
sys/arch/hppa/hppa/process_machdep.c: revision 1.19
sys/arch/hppa/include/cpu.h: revision 1.14
sys/arch/hppa/hppa/machdep.c: revision 1.28
sys/arch/hppa/hppa/machdep.h: revision 1.20
sys/arch/hppa/conf/GENERIC: revision 1.50
sys/arch/hppa/conf/files.hppa: revision 1.30
sys/arch/hppa/hppa/locore.S: revision 1.8
sys/arch/hppa/hppa/hppa_machdep.c: revision 1.34
sys/arch/hppa/hppa/fpu.c: revision 1.28
Add eager FPU switching for hppa - works around QEMU bug, and safer -
may eventually become the default.
Pull up following revision(s) (requested by tls in ticket #439):
sys/dev/pci/vioscsi.c: revision 1.37
sys/dev/pci/files.virtio: revision 1.5
Add VIOSCSI_MAX_TARGET and VIOSCSI_MAX_LUN options to reduce excessive probe time on QEMU
Pull up following revision(s) (requested by tls in ticket #438):
sys/dev/goldfish/gftty.c: revision 1.6
Make console input on virt68k 8-bit clean.
On signed-char ports you can't feed a "char *" to the tty layer. A cursory
glance for more instances of this didn't find any but it's possible.
Pull up following revision(s) (requested by tls in ticket #437):
sys/sys/systm.h: revision 1.307
sys/sys/syscall.h: revision 1.330
sys/kern/syscalls.c: revision 1.335
sys/kern/syscalls_autoload.c: revision 1.51
sys/kern/systrace_args.c: revision 1.57
sys/arch/alpha/alpha/syscall.c: revision 1.46
sys/arch/riscv/riscv/syscall.c: revision 1.7
sys/arch/mips/mips/syscall.c: revision 1.52
sys/kern/init_sysent.c: revision 1.347
sys/kern/makesyscalls.sh: revision 1.189
sys/sys/syscallargs.h: revision 1.313
Fix a longstanding bug on 64 bit ports with ABIs requiring sign-extension when returning 32-bit values in registers. Alpha, MIPS N64, RISCV.
With these ABIs it is necessary for the syscall return code to manually
sign-extend all 32-bit return values. If we don't, everything may look
just fine, until a syscall return value is spilled to the stack and then
[13 lines not shown]
Pull up following revision(s) (requested by tls in ticket #436):
sys/arch/evbmips/malta/pci/pcib.c: revision 1.29
sys/arch/evbmips/malta/dev/mainbus.c: revision 1.21
sys/arch/evbmips/malta/dev/gt.c: revision 1.20
sys/arch/evbmips/malta/malta_intr.c: revision 1.30
sys/arch/evbmips/malta/malta_bus_mem.c: revision 1.10
sys/arch/evbmips/malta/machdep.c: revision 1.51
sys/arch/evbmips/malta/malta_bus_io.c: revision 1.9
sys/arch/evbmips/conf/MALTA: revision 1.107
Address problems with MIPS Malta platform code found running under QEMU.
QEMU's "malta" system emulates a MIPS Malta with the Gallileo host bridge
and 32-bit or 64-bit CPUs of either endianness. It is one of the only
working QEMU system-level emulations that could run NetBSD with all
combinations of endianness and address size. After fixes to QEMU over the
past several years, NetBSD has been unable to use the emulated PCI bus in
big-endian and 64-bit configurations.
[36 lines not shown]
Pull up following revision(s) (requested by tls in ticket #433):
distrib/sets/sets.subr: revision 1.214
Fix MKBINUTILS=no builds. This message brought to you by the number
33,554,432 and the word 'embedded'.
Pull up following revision(s) (requested by tls in ticket #432):
sys/dev/ic/wdc.c: revision 1.314
Avoid crash due to `atactl atabusX reset` when no drives are attached
Pull up following revision(s) (requested by tls in ticket #430):
sys/dev/pci/artsata.c: revision 1.31
sys/dev/pci/pciide_common.c: revision 1.74
sys/dev/pci/svwsata.c: revision 1.25
sys/dev/ic/wdc.c: revision 1.313
sys/dev/ic/wdcvar.h: revision 1.101
Trying again to avoid that 3-second delay on PCI IDE controllers.
This time, the change is conditionalized so it won't hit old-style wdc.
Pull up following revision(s) (requested by tls in ticket #429):
sys/dev/pci/if_pcn.c: revision 1.82
sys/dev/pci/if_pcn.c: revision 1.83
Fix pcn MAC address read on QEMU and possibly some other emulated hardware.
Correct typo in previous (s/1/i/) and remove gratuitous wsp (build fix)
Pull up following revision(s) (requested by tls in ticket #428):
sys/arch/alpha/alpha/mcclock.c: revision 1.24
Fix alpha boot-time hang on unpatched QEMU by accommodating its broken mcclock.
Pull up following revision(s) (requested by tls in ticket #424):
sys/conf/std: revision 1.25
Our security(7) manual page has long documented the functionality
enabled by secmodel_extensions. It's thus not really optional, and
declaring it so causes an odd mismatch in behavior between MODULAR and
non-modular kernels. It's tiny, just add it to std.
Pull up following revision(s) (requested by tls in ticket #423):
etc/etc.hppa/MAKEDEV.conf: revision 1.5
add ld to hppa MAKEDEV; without it, virtio disks are unusable
risc-v: some fixes for the bus_space helper function
- don't sign extend in generic_bs_r_4 for _LP64
- use sll (not srl) for the delta = n << stride calculations
- fix the delta calculation in generic_bs_rr_2
Pull up following revision(s) (requested by tls in ticket #422):
distrib/sets/lists/debug/mi: revision 1.509
dab is not built if MKCXX=no, so its debug cannot be built
Pull up following revision(s) (requested by tls in ticket #421):
external/mpl/mozilla-certdata/Makefile: revision 1.2
Avoid make descending into mozilla-certdata directory and finding no targets,
which broke MKSHARE=no builds