29ArmVirtTimerFdtClientLibConstructor (
37 INT32 SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum;
39 RETURN_STATUS PcdStatus;
41 Status =
gBS->LocateProtocol (
42 &gFdtClientProtocolGuid,
48 Status = FdtClient->FindCompatibleNodeProperty (
52 (
CONST VOID **)&InterruptProp,
55 if (Status == EFI_NOT_FOUND) {
56 Status = FdtClient->FindCompatibleNodeProperty (
60 (
CONST VOID **)&InterruptProp,
65 if (EFI_ERROR (Status)) {
73 ASSERT (PropSize >= 36);
76 + (InterruptProp[0].Type ? 16 : 0);
78 + (InterruptProp[1].Type ? 16 : 0);
80 + (InterruptProp[2].Type ? 16 : 0);
81 HypIntrNum = PropSize < 48 ? 0 :
SwapBytes32 (InterruptProp[3].Number)
82 + (InterruptProp[3].Type ? 16 : 0);
83 HypVirtIntrNum = PropSize < 60 ? 0 :
SwapBytes32 (InterruptProp[4].Number)
84 + (InterruptProp[4].Type ? 16 : 0);
88 "Found Timer interrupts %d, %d, %d, %d\n",
95 PcdStatus =
PcdSet32S (PcdArmArchTimerSecIntrNum, SecIntrNum);
97 PcdStatus =
PcdSet32S (PcdArmArchTimerIntrNum, IntrNum);
99 PcdStatus =
PcdSet32S (PcdArmArchTimerVirtIntrNum, VirtIntrNum);
101 PcdStatus =
PcdSet32S (PcdArmArchTimerHypIntrNum, HypIntrNum);
103 PcdStatus =
PcdSet32S (PcdArmArchTimerHypVirtIntrNum, HypVirtIntrNum);
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
#define ASSERT_EFI_ERROR(StatusParameter)
#define ASSERT_RETURN_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdSet32S(TokenName, Value)