From 284af948b61d88e9c1c0c547028353e725693f34 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Wed, 25 Nov 2009 04:26:09 +0000 Subject: Use InitializeFloatingPointUnits() from UefiCpuLib to initialize floating point units in SEC phase. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9481 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/Sec/SecMain.c | 7 +++++++ OvmfPkg/Sec/SecMain.inf | 3 +++ 5 files changed, 13 insertions(+) (limited to 'OvmfPkg') diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index cd4adc4d61..5bf76ff67d 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -75,6 +75,7 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf FileHandleLib|ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.inf + UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf [LibraryClasses.common.SEC] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 2dbeb78f88..e1b6477c77 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -75,6 +75,7 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf FileHandleLib|ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.inf + UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf [LibraryClasses.common.SEC] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 4d968f6917..0bdf08572e 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -75,6 +75,7 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf FileHandleLib|ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.inf + UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf [LibraryClasses.common.SEC] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index 1dafa05025..832c0e8a37 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "SecMain.h" @@ -72,6 +73,12 @@ SecCoreStartupWithStack ( UINTN SizeOfTempRam; VOID *IdtPtr; + // + // Initialize floating point operating environment + // to be compliant with UEFI spec. + // + InitializeFloatingPointUnits (); + DEBUG ((EFI_D_ERROR, "SecCoreStartupWithStack(0x%x, 0x%x, 0x%x, 0x%x)\n", (UINT32)(UINTN)BootFirmwareVolumePtr, diff --git a/OvmfPkg/Sec/SecMain.inf b/OvmfPkg/Sec/SecMain.inf index 1646cce978..de217b5691 100644 --- a/OvmfPkg/Sec/SecMain.inf +++ b/OvmfPkg/Sec/SecMain.inf @@ -44,10 +44,13 @@ [Packages] MdePkg/MdePkg.dec + UefiCpuPkg/UefiCpuPkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] BaseLib + UefiCpuLib + PcdLib [Ppis] gEfiTemporaryRamSupportPpiGuid # PPI ALWAYS_PRODUCED -- cgit v1.2.3