TianoCore EDK2 master
Loading...
Searching...
No Matches
KvmtoolRtcFdtClientLib.c File Reference

Go to the source code of this file.

Macros

#define RTC_INDEX_REG_OFFSET   0x0ULL
 
#define RTC_TARGET_REG_OFFSET   0x1ULL
 

Functions

STATIC EFI_STATUS KvmtoolRtcMapMemory (IN EFI_HANDLE ImageHandle, IN EFI_PHYSICAL_ADDRESS RtcPageBase)
 
EFI_STATUS EFIAPI KvmtoolRtcFdtClientLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Detailed Description

FDT client library for motorola,mc146818 RTC driver

Copyright (c) 2020, ARM Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file KvmtoolRtcFdtClientLib.c.

Macro Definition Documentation

◆ RTC_INDEX_REG_OFFSET

#define RTC_INDEX_REG_OFFSET   0x0ULL

RTC Index register is at offset 0x0

Definition at line 19 of file KvmtoolRtcFdtClientLib.c.

◆ RTC_TARGET_REG_OFFSET

#define RTC_TARGET_REG_OFFSET   0x1ULL

RTC Target register is at offset 0x1

Definition at line 23 of file KvmtoolRtcFdtClientLib.c.

Function Documentation

◆ KvmtoolRtcFdtClientLibConstructor()

EFI_STATUS EFIAPI KvmtoolRtcFdtClientLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entrypoint for KvmtoolRtcFdtClientLib.

Locate the RTC node in the DT and update the Index and Target register base addresses in the respective PCDs. Add the RTC memory region to the memory map. Disable the RTC node as the RTC is owned by UEFI.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDFlash device not found.

Definition at line 120 of file KvmtoolRtcFdtClientLib.c.

◆ KvmtoolRtcMapMemory()

STATIC EFI_STATUS KvmtoolRtcMapMemory ( IN EFI_HANDLE  ImageHandle,
IN EFI_PHYSICAL_ADDRESS  RtcPageBase 
)

Add the RTC controller address range to the memory map.

Parameters
[in]ImageHandleThe handle to the image.
[in]RtcPageBaseBase address of the RTC controller.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDFlash device not found.

Definition at line 36 of file KvmtoolRtcFdtClientLib.c.