[edk2-devel] [PATCH V2 24/28] OvmfPkg: Add TdxDxe driver
Min Xu
min.m.xu at intel.com
Mon Oct 18 08:38:18 UTC 2021
On October 12, 2021 7:50 PM, Gerd Hoffmann wrote:
> Hi,
>
> > Besides above features, TdxDxe driver will update the ACPI MADT
> > Mutiprocessor Wakeup Table.
>
> > + ACPI_MADT_MPWK_STRUCT *MadtMpWk;
>
> > + NewBufferSize = 1 * sizeof (*Madt) +
> > + CpuCount * sizeof (*LocalApic) +
> > + 1 * sizeof (*IoApic) +
> > + NUM_8259_IRQS * sizeof (*Iso) +
> > + 1 * sizeof (*LocalApicNmi);
>
> + sizeof(MadtMpWk)
>
> > + CopyMem (&(Madt->Header), AcpiTableBuffer, sizeof
> (EFI_ACPI_DESCRIPTION_HEADER));
> > + Madt->Header.Length = (UINT32) NewBufferSize;
> > + Madt->LocalApicAddress = PcdGet32 (PcdCpuLocalApicBaseAddress);
> > + Madt->Flags = EFI_ACPI_1_0_PCAT_COMPAT;
> > + Ptr = Madt + 1;
>
> [ ... ]
>
> You are not updating the MADT. You create a new one from scratch. Not a
> good plan. I think you should simply get the installed table, copy it to a larger
> buffer and append the ACPI_MADT_MPWK_STRUCT to that.
>
Thanks for reminder. It will be updated in the next version.
Thanks.
Min
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82215): https://edk2.groups.io/g/devel/message/82215
Mute This Topic: https://groups.io/mt/86085765/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list