opnsense-src/sys/amd64/include
Ed Maste 9051987e40 amd64: Bump MAXCPU to 1024 (from 256)
Hardware with more than 256 CPU cores is currently available and will
become increasingly common over FreeBSD 14's lifetime.  Increase MAXCPU
in the amd64 GENERIC kernel configuration to 1024.

Earlier commits increased some related limits.  These prerequisite
commits include at least:

- d7ed40243769 Increase MAX_APIC_ID safeguard to 0x800
- d1639e43c5 cpuset: increase userland maximum size to 1024

Global and allocated arrays sized by MAXCPU result in excessive bloat
on systems with lower core counts.  In addition, some code used u_char
(8 bits) to hold a CPU index, which is not valid if MAXCPU is greater
than 256.

A number of recent commits addressed these sorts of issues, including
at least:

- 133935d26f pf: atomically increment state ids
- 74ac712f72 vmm: Dynamically allocate a couple of per-CPU state save areas
- 78cfa762eb callout: Move per-CPU callout state into the dpcpu region
- 42f722e721 amd64: store pcids pmap data in pcpu zone
- 9801e7c275 smp_topo: dynamically allocate group array
- 9fb6718d1b smp: Dynamically allocate the stoppcbs array
- 2bb16c6352 x86: retire use of intr_bind

There are some additional allocations still to be converted and
more scalability work is required to make effective use of very high
core count systems, but this change allows us to boot on these systems
and provides a Kernel Binary Interface (KBI) for the FreeBSD 14 release
that supports these configurations.

Special thanks to AMD for providing hardware to test these changes.

PR:		269572
Reviewed by:	des
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36838
2023-08-03 17:41:26 -04:00
..
pc spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
xen xen/intr: introduce dev/xen/bus/intr-internal.h 2023-04-14 15:58:53 +02:00
_align.h
_bus.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
_inttypes.h
_limits.h
_pmap.h amd64: move definition of the struct pmap_pcids into _pmap.h 2023-05-02 14:32:20 +03:00
_stdint.h
_types.h
acpica_machdep.h
apm_bios.h
asan.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
asm.h amd64: -m32 support for machine/asm(macros).h 2022-06-13 18:35:39 +01:00
asmacros.h elfnote: place note in a PT_NOTE program header 2022-06-28 09:51:57 +02:00
atomic.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
bus.h
bus_dma.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
clock.h x86: Deduplicate clock.h 2021-12-06 10:39:08 -05:00
counter.h Fix MINIMAL build on amd64 2023-07-14 09:18:43 +02:00
cpu.h Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
cpufunc.h Consistently provide ffs/fls using builtins 2023-07-06 14:46:41 -03:00
cputypes.h
csan.h Limit when we call DELAY from KCSAN on amd64 2021-02-25 12:38:05 +00:00
db_machdep.h Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dump.h
efi.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
elf.h
endian.h
exec.h
fdt.h
float.h
floatingpoint.h
fpu.h Add domain policy allocation for amd64 fpu_kern_ctx 2020-07-03 14:54:46 +00:00
frame.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
gdb_machdep.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
ieeefp.h Remove checks for __GNUCLIKE_ASM assuming it is always true. 2022-04-12 10:05:45 -07:00
in_cksum.h machine/in_cksum.h: don't include sys/cdefs.h 2022-04-18 21:02:19 +01:00
intr_machdep.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
iodev.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
iommu.h o Add machine/iommu.h and include MD iommu headers from it, 2020-08-05 19:11:31 +00:00
kdb.h smp: Dynamically allocate the stoppcbs array 2023-05-25 18:09:55 -04:00
limits.h Remove checks for __CC_SUPPORTS_WARNING assuming it is always true. 2022-04-12 10:06:13 -07:00
md_var.h amd64: be more precise when enabling the AlderLake small core PCID workaround 2023-01-06 01:30:29 +02:00
memdev.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
metadata.h
minidump.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
msan.h kmsan: Add a comment explaining why KMSAN doesn't shadow above KERNBASE 2023-07-27 16:01:58 -04:00
nexusvar.h
npx.h
ofw_machdep.h
param.h amd64: Bump MAXCPU to 1024 (from 256) 2023-08-03 17:41:26 -04:00
pcb.h Fix for mis-interpretation of PCB_KERNFPU. 2020-10-14 23:01:41 +00:00
pci_cfgreg.h
pcpu.h amd64 pcpu.h: Add missing 'do' from do-while loop around __PCPU_SET. 2023-07-08 12:59:26 -07:00
pcpu_aux.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pmap.h amd64/arm64 pmap: Stop requiring the accessed bit for superpage promotion 2023-06-12 13:40:57 -05:00
pmc_mdep.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
proc.h Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h 2023-02-02 00:59:26 +02:00
procctl.h
profile.h amd64: -m32 support for machine/profile.h 2022-06-13 18:35:39 +01:00
psl.h
ptrace.h
pvclock.h
reg.h
reloc.h
resource.h
runq.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
segments.h amd64: -m32 support for machine/segments.h 2022-06-13 18:35:39 +01:00
setjmp.h
sf_buf.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
sgx.h
sgxreg.h
sigframe.h
signal.h
smp.h amd64: rework AP startup 2021-07-27 20:11:15 +03:00
specialreg.h
stack.h Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h 2023-02-02 00:59:26 +02:00
stdarg.h
sysarch.h
tls.h Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
trap.h
tss.h amd64: move common_tss into pcpu. 2019-11-10 09:28:18 +00:00
ucontext.h
vdso.h
vm.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmm.h vmm: Avoid embedding cpuset_t ioctl ABIs 2023-05-23 21:15:59 -04:00
vmm_dev.h vmm: Avoid embedding cpuset_t ioctl ABIs 2023-05-23 21:15:59 -04:00
vmm_instruction_emul.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmm_snapshot.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmparam.h vm: centralize VM_BATCHQUEUE_SIZE definition 2023-01-21 14:30:00 -05:00