]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Increase MAX_APIC_ID safeguard to 0x800
authorEd Maste <emaste@FreeBSD.org>
Thu, 20 Oct 2022 13:04:37 +0000 (09:04 -0400)
committerEd Maste <emaste@FreeBSD.org>
Thu, 27 Oct 2022 16:33:34 +0000 (12:33 -0400)
commitc8113dad7ed4024376901a834fc239d754292049
treed2f14f5cf666127b0742e61ced143500d07b15da
parent64c3edc237a5281e2210b3dd27868175f87b3973
Increase MAX_APIC_ID safeguard to 0x800

MAX_APIC_ID must be at least twice MAXCPU.  Increase it to 0x800 so that
it is possible to set MAXCPU to 512 or 1024 in a custom kernel config
file.

Note that increasing this limit does not itself cause any allocations
to be larger; it just allows madt_parse_cpu() to process higher APIC
IDs.

APIC IDs may be sparse and so we can waste memory.  This is independent
of this change, but becomes more of an issue as the maximum APIC ID
grows.  This should be addressed with future work.

Reviewed by: royger
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37067
sys/x86/include/apicvar.h