Skip to content
  • Roger Pau Monné's avatar
    x86: bump MAX_APIC_ID to 512 · a74bb29a
    Roger Pau Monné authored
    Introduce a new define to take int account the xAPIC ID limit, for
    systems where x2APIC is not available/reliable.
    
    Also change some of the usages of the APIC ID to use an unsigned int
    (which is the correct storage type to deal with x2APIC IDs as found in
    x2APIC MADT entries).
    
    This allows booting FreeBSD on a box with 256 CPUs and APIC IDs up to
    295:
    
    FreeBSD/SMP: Multiprocessor System Detected: 256 CPUs
    FreeBSD/SMP: 1 package(s) x 64 core(s) x 4 hardware threads
    Package HW ID = 0
    	Core HW ID = 0
    		CPU0 (BSP): APIC ID: 0
    		CPU1 (AP/HT): APIC ID: 1
    		CPU2 (AP/HT): APIC ID: 2
    		CPU3 (AP/HT): APIC ID: 3
    [...]
    	Core HW ID = 73
    		CPU252 (AP): APIC ID: 292
    		CPU253 (AP/HT): APIC ID: 293
    		CPU254 (AP/HT): APIC ID: 294
    		CPU255 (AP/HT): APIC ID: 295
    
    Submitted by:		kib (previous version)
    Relnotes:		yes
    MFC after:		1 month
    Reviewed by:		kib
    Differential revision:	https://reviews.freebsd.org/D11913
    a74bb29a