Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x2APIC APIC ID value less than 255



On Sat, Dec 30, 2023 at 05:30:38PM +0900, Masanobu SAITOH wrote:
>  Hi, all.
> 
>  I have access to an Intel Sapphire Rapids machine.
> 
>  It seems NetBSD/amd64 has some problems to boot on the machine.
> One of problems is related x2APIC
> 
> -----------
>         case ACPI_MADT_TYPE_LOCAL_X2APIC:
>                 x2apic = (ACPI_MADT_LOCAL_X2APIC *)hdrp;
> 
>                 /* ACPI spec: "Logical processors with APIC ID values
>                  * less than 255 must use the Processor Local APIC
>                  * structure to convey their APIC information to OSPM."
>                  * But Xen with PVH dom0 breaks this ACPI spec.
>                  */
>                 if (x2apic->LocalApicId <= 0xff && vm_guest != VM_GUEST_XENPVH) {
>                         printf("bogus MADT X2APIC entry (id = 0x%"PRIx32")\n",
>                             x2apic->LocalApicId);
>                         break;
>                 }
> ------------
> 
> This machine uses less than 255 APIC IDs.
> 
> rin@ found that the following compatibility note:
> 
> https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#processor-local-x2apic-structure
> 
> [Compatibility note] On some legacy OSes, Logical processors with APIC ID
> values less than 255 (whether in XAPIC or X2APIC mode) must use the Processor
> Local APIC structure to convey their APIC information to OSPM, and those
> processors must be declared in the DSDT using the Processor() keyword. Logical
> processors with APIC ID values 255 and greater must use the Processor Local
> x2APIC structure and be declared using the Device() keyword.
> 
> Is it possible to delete the above test completely?

For Xen it shoulnd't change anything (obviously); for native I don't know
if not ignoring such entries can break on some hardware.
I don't know if the ACPI configuration leading to this path is broken
or not: I don't know if we can get there from a Processor() entry.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index