[edk2-devel] [PATCH 2/2] OvmfPkg: Switch timer in build time for OvmfPkg

Gerd Hoffmann kraxel at redhat.com
Fri Oct 29 11:37:25 UTC 2021


> --- a/OvmfPkg/AmdSev/AmdSevX64.dsc
> +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
> @@ -670,10 +670,9 @@
>    }
>  
>    MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> -  OvmfPkg/8259InterruptControllerDxe/8259.inf
>    UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>    UefiCpuPkg/CpuDxe/CpuDxe.inf
> -  OvmfPkg/8254TimerDxe/8254Timer.inf
> +  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>    OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>    OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
>    MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {

Also needs "gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000"

(same for the other OvmfPkg files).

> --- a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.c
> +++ b/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.c
> @@ -173,7 +173,7 @@ TimerDriverSetTimerPeriod (
>      //
>      DisableApicTimerInterrupt();
>    } else {
> -    TimerFrequency = PcdGet32(PcdFSBClock) / DivideValue;
> +    TimerFrequency = PcdGet32(PcdFSBClock) / (UINT32)DivideValue;

Why is this cast needed?

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82934): https://edk2.groups.io/g/devel/message/82934
Mute This Topic: https://groups.io/mt/86671464/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