summaryrefslogtreecommitdiff
path: root/OvmfPkg/AcpiPlatformDxe
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-15 00:03:35 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-15 00:03:35 +0000
commitff8dd312ddaa945a313f091c7157a34a12e7067a (patch)
treeb58556d43fb0c26e4f6a46111e89c89c1fa882f2 /OvmfPkg/AcpiPlatformDxe
parente148512e5132e38accf2fe8188a9bdf9d1de02d8 (diff)
downloadedk2-ff8dd312ddaa945a313f091c7157a34a12e7067a.zip
edk2-ff8dd312ddaa945a313f091c7157a34a12e7067a.tar.gz
edk2-ff8dd312ddaa945a313f091c7157a34a12e7067a.tar.bz2
OvmfPkg/AcpiPlatformDxe: Fix Visual Studio build issues
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13634 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/AcpiPlatformDxe')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/Qemu.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/Qemu.c b/OvmfPkg/AcpiPlatformDxe/Qemu.c
index 1ac443f..5ab89aa 100644
--- a/OvmfPkg/AcpiPlatformDxe/Qemu.c
+++ b/OvmfPkg/AcpiPlatformDxe/Qemu.c
@@ -100,8 +100,8 @@ QemuInstallAcpiMadtTable (
return EFI_OUT_OF_RESOURCES;
}
- Madt->Header = *(EFI_ACPI_DESCRIPTION_HEADER *) AcpiTableBuffer;
- Madt->Header.Length = NewBufferSize;
+ 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;
@@ -110,8 +110,8 @@ QemuInstallAcpiMadtTable (
for (Loop = 0; Loop < CpuCount; ++Loop) {
LocalApic->Type = EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC;
LocalApic->Length = sizeof (*LocalApic);
- LocalApic->AcpiProcessorId = Loop;
- LocalApic->ApicId = Loop;
+ LocalApic->AcpiProcessorId = (UINT8) Loop;
+ LocalApic->ApicId = (UINT8) Loop;
LocalApic->Flags = 1; // enabled
++LocalApic;
}
@@ -120,7 +120,7 @@ QemuInstallAcpiMadtTable (
IoApic = Ptr;
IoApic->Type = EFI_ACPI_1_0_IO_APIC;
IoApic->Length = sizeof (*IoApic);
- IoApic->IoApicId = CpuCount;
+ IoApic->IoApicId = (UINT8) CpuCount;
IoApic->Reserved = EFI_ACPI_RESERVED_BYTE;
IoApic->IoApicAddress = 0xFEC00000;
IoApic->SystemVectorBase = 0x00000000;
@@ -148,13 +148,13 @@ QemuInstallAcpiMadtTable (
Iso->Type = EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE;
Iso->Length = sizeof (*Iso);
Iso->Bus = 0x00; // ISA
- Iso->Source = Loop;
- Iso->GlobalSystemInterruptVector = Loop;
+ Iso->Source = (UINT8) Loop;
+ Iso->GlobalSystemInterruptVector = (UINT32) Loop;
Iso->Flags = 0x000D; // Level-tiggered, Active High
++Iso;
}
ASSERT (
- Iso - (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE *)Ptr ==
+ (UINTN) (Iso - (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE *)Ptr) ==
1 + PciLinkIsoCount
);
Ptr = Iso;
@@ -174,7 +174,7 @@ QemuInstallAcpiMadtTable (
LocalApicNmi->LocalApicInti = 0x01;
Ptr = LocalApicNmi + 1;
- ASSERT ((UINT8 *)Ptr - (UINT8 *)Madt == NewBufferSize);
+ ASSERT ((UINTN) ((UINT8 *)Ptr - (UINT8 *)Madt) == NewBufferSize);
Status = InstallAcpiTable (AcpiProtocol, Madt, NewBufferSize, TableKey);
FreePool (Madt);