TianoCore EDK2 master
Loading...
Searching...
No Matches
RamDiskDriver.c File Reference
#include "RamDiskImpl.h"

Go to the source code of this file.

Functions

VOID EFIAPI RamDiskAcpiCheck (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI RamDiskDxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI RamDiskDxeUnload (IN EFI_HANDLE ImageHandle)
 

Variables

EFI_HANDLE mRamDiskHandle = NULL
 
EFI_RAM_DISK_PROTOCOL mRamDiskProtocol
 
LIST_ENTRY RegisteredRamDisks
 
EFI_ACPI_TABLE_PROTOCOLmAcpiTableProtocol = NULL
 
EFI_ACPI_SDT_PROTOCOLmAcpiSdtProtocol = NULL
 

Detailed Description

The driver entry point for RamDiskDxe driver.

Copyright (c) 2016, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file RamDiskDriver.c.

Function Documentation

◆ RamDiskAcpiCheck()

VOID EFIAPI RamDiskAcpiCheck ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Check whether EFI_ACPI_TABLE_PROTOCOL and EFI_ACPI_SDT_PROTOCOL are produced. If both protocols are produced, publish all the reserved memory type RAM disks to the NVDIMM Firmware Interface Table (NFIT).

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextThe pointer to the notification function's context, which is implementation-dependent.

Definition at line 49 of file RamDiskDriver.c.

◆ RamDiskDxeEntryPoint()

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

The entry point for RamDiskDxe driver.

Parameters
[in]ImageHandleThe image handle of the driver.
[in]SystemTableThe system table.
Return values
EFI_ALREADY_STARTEDThe driver already exists in system.
EFI_OUT_OF_RESOURCESFail to execute entry point due to lack of resources.
EFI_SUCCESAll the related protocols are installed on the driver.

Definition at line 116 of file RamDiskDriver.c.

◆ RamDiskDxeUnload()

EFI_STATUS EFIAPI RamDiskDxeUnload ( IN EFI_HANDLE  ImageHandle)

Unload the RamDiskDxe driver and its configuration form.

Parameters
[in]ImageHandleThe driver's image handle.
Return values
EFI_SUCCESSThe RamDiskDxe driver and its configuration form is unloaded.
OthersFailed to unload the form.

Definition at line 207 of file RamDiskDriver.c.

Variable Documentation

◆ mAcpiSdtProtocol

EFI_ACPI_SDT_PROTOCOL* mAcpiSdtProtocol = NULL

Definition at line 35 of file RamDiskDriver.c.

◆ mAcpiTableProtocol

EFI_ACPI_TABLE_PROTOCOL* mAcpiTableProtocol = NULL

Definition at line 34 of file RamDiskDriver.c.

◆ mRamDiskHandle

EFI_HANDLE mRamDiskHandle = NULL

Definition at line 15 of file RamDiskDriver.c.

◆ mRamDiskProtocol

EFI_RAM_DISK_PROTOCOL mRamDiskProtocol
Initial value:
= {
}
EFI_STATUS EFIAPI RamDiskRegister(IN UINT64 RamDiskBase, IN UINT64 RamDiskSize, IN EFI_GUID *RamDiskType, IN EFI_DEVICE_PATH *ParentDevicePath OPTIONAL, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI RamDiskUnregister(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)

Definition at line 21 of file RamDiskDriver.c.

◆ RegisteredRamDisks

LIST_ENTRY RegisteredRamDisks

Definition at line 29 of file RamDiskDriver.c.