22 {
"arm,armv7-timer" },
58 BOOLEAN AlwaysOnTimer;
61 (GenericTimerInfo ==
NULL))
64 return EFI_INVALID_PARAMETER;
67 Data = fdt_getprop (Fdt, TimerNode,
"always-on", &DataSize);
68 if ((Data ==
NULL) || (DataSize < 0)) {
69 AlwaysOnTimer =
FALSE;
76 if (EFI_ERROR (Status)) {
83 if (EFI_ERROR (Status)) {
90 if (EFI_ERROR (Status)) {
92 if (Status == EFI_NOT_FOUND) {
100 Data = fdt_getprop (Fdt, TimerNode,
"interrupts", &DataSize);
101 if ((Data ==
NULL) ||
109 GenericTimerInfo->SecurePL1TimerGSIV =
111 GenericTimerInfo->SecurePL1TimerFlags =
113 GenericTimerInfo->NonSecurePL1TimerGSIV =
115 GenericTimerInfo->NonSecurePL1TimerFlags =
117 GenericTimerInfo->VirtualTimerGSIV =
119 GenericTimerInfo->VirtualTimerFlags =
121 GenericTimerInfo->NonSecurePL2TimerGSIV =
123 GenericTimerInfo->NonSecurePL2TimerFlags =
127 GenericTimerInfo->SecurePL1TimerFlags |= BIT2;
128 GenericTimerInfo->NonSecurePL1TimerFlags |= BIT2;
129 GenericTimerInfo->VirtualTimerFlags |= BIT2;
130 GenericTimerInfo->NonSecurePL2TimerFlags |= BIT2;
137 GenericTimerInfo->CounterControlBaseAddress = 0xFFFFFFFFFFFFFFFF;
138 GenericTimerInfo->CounterReadBaseAddress = 0xFFFFFFFFFFFFFFFF;
141 GenericTimerInfo->VirtualPL2TimerGSIV = 0;
142 GenericTimerInfo->VirtualPL2TimerFlags = 0;
192 UINT32 TimerNodeCount;
196 if (FdtParserHandle ==
NULL) {
198 return EFI_INVALID_PARAMETER;
201 Fdt = FdtParserHandle->Fdt;
208 if (EFI_ERROR (Status)) {
213 if (TimerNodeCount == 0) {
214 return EFI_NOT_FOUND;
218 TimerNode = FdtBranch;
219 for (Index = 0; Index < TimerNodeCount; Index++) {
228 if (EFI_ERROR (Status)) {
230 if (Status == EFI_NOT_FOUND) {
232 Status = EFI_ABORTED;
239 if (EFI_ERROR (Status)) {
252 if (EFI_ERROR (Status)) {
UINT32 EFIAPI FdtGetInterruptId(UINT32 CONST *Data)
UINT32 EFIAPI FdtGetInterruptFlags(UINT32 CONST *Data)
STATIC CONST COMPATIBILITY_INFO TimerCompatibleInfo
STATIC EFI_STATUS EFIAPI TimerNodeParser(IN CONST VOID *Fdt, IN INT32 TimerNode, IN CM_ARM_GENERIC_TIMER_INFO *GenericTimerInfo)
EFI_STATUS EFIAPI ArmGenericTimerInfoParser(IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN INT32 FdtBranch)
STATIC CONST COMPATIBILITY_STR TimerCompatibleStr[]
@ FdtVirtualTimerIrq
Virtual timer IRQ.
@ FdtSecureTimerIrq
Secure timer IRQ.
@ FdtHypervisorTimerIrq
Hypervisor timer IRQ.
@ FdtMaxTimerItem
Max timer item.
@ FdtNonSecureTimerIrq
Non-secure timer IRQ.
EFI_STATUS EFIAPI GetGicVersion(IN CONST VOID *Fdt, IN INT32 IntcNode, OUT UINT32 *GicVersion)
@ EArmObjGenericTimerInfo
7 - Generic Timer Info
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI AddSingleCmObj(IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN CM_OBJECT_ID ObjectId, IN VOID *Data, IN UINT32 Size, OUT CM_OBJECT_TOKEN *Token OPTIONAL)
#define CREATE_CM_ARM_OBJECT_ID(ObjectId)
EFI_STATUS EFIAPI FdtGetNextCompatNodeInBranch(IN CONST VOID *Fdt, IN INT32 FdtBranch, IN CONST COMPATIBILITY_INFO *CompatNamesInfo, IN OUT INT32 *Node)
EFI_STATUS EFIAPI FdtCountCompatNodeInBranch(IN CONST VOID *Fdt, IN INT32 FdtBranch, IN CONST COMPATIBILITY_INFO *CompatNamesInfo, OUT UINT32 *NodeCount)
EFI_STATUS EFIAPI FdtGetIntcParentNode(IN CONST VOID *Fdt, IN INT32 Node, OUT INT32 *IntcNode)
EFI_STATUS EFIAPI FdtGetInterruptCellsInfo(IN CONST VOID *Fdt, IN INT32 IntcNode, OUT INT32 *IntCells)
#define ARRAY_SIZE(Array)