TianoCore EDK2 master
|
#include "RamDiskImpl.h"
Go to the source code of this file.
Functions | |
VOID | RamDiskInitDeviceNode (IN RAM_DISK_PRIVATE_DATA *PrivateData, IN OUT MEDIA_RAM_DISK_DEVICE_PATH *RamDiskDevNode) |
EFI_STATUS | RamDiskPublishSsdt (VOID) |
EFI_STATUS | RamDiskPublishNfit (IN RAM_DISK_PRIVATE_DATA *PrivateData) |
EFI_STATUS | RamDiskUnpublishNfit (IN RAM_DISK_PRIVATE_DATA *PrivateData) |
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) |
Variables | |
RAM_DISK_PRIVATE_DATA | mRamDiskPrivateDataTemplate |
MEDIA_RAM_DISK_DEVICE_PATH | mRamDiskDeviceNodeTemplate |
BOOLEAN | mRamDiskSsdtTableKeyValid = FALSE |
UINTN | mRamDiskSsdtTableKey |
The realization of EFI_RAM_DISK_PROTOCOL.
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RamDiskProtocol.c.
VOID RamDiskInitDeviceNode | ( | IN RAM_DISK_PRIVATE_DATA * | PrivateData, |
IN OUT MEDIA_RAM_DISK_DEVICE_PATH * | RamDiskDevNode | ||
) |
Initialize the RAM disk device node.
[in] | PrivateData | Points to RAM disk private data. |
[in,out] | RamDiskDevNode | Points to the RAM disk device node. |
Definition at line 40 of file RamDiskProtocol.c.
EFI_STATUS RamDiskPublishNfit | ( | IN RAM_DISK_PRIVATE_DATA * | PrivateData | ) |
Publish the RAM disk NVDIMM Firmware Interface Table (NFIT) to the ACPI table.
[in] | PrivateData | Points to RAM disk private data. |
EFI_SUCCESS | The RAM disk NFIT has been published. |
others | The RAM disk NFIT has not been published. |
Definition at line 128 of file RamDiskProtocol.c.
EFI_STATUS RamDiskPublishSsdt | ( | VOID | ) |
Initialize and publish NVDIMM root device SSDT in ACPI table.
EFI_SUCCESS | The NVDIMM root device SSDT is published. |
Others | The NVDIMM root device SSDT is not published. |
Definition at line 65 of file RamDiskProtocol.c.
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 | ||
) |
Register a RAM disk with specified address, size and type.
[in] | RamDiskBase | The base address of registered RAM disk. |
[in] | RamDiskSize | The size of registered RAM disk. |
[in] | RamDiskType | The type of registered RAM disk. The GUID can be any of the values defined in section 9.3.6.9, or a vendor defined GUID. |
[in] | ParentDevicePath | Pointer to the parent device path. If there is no parent device path then ParentDevicePath is NULL. |
[out] | DevicePath | On return, points to a pointer to the device path of the RAM disk device. If ParentDevicePath is not NULL, the returned DevicePath is created by appending a RAM disk node to the parent device path. If ParentDevicePath is NULL, the returned DevicePath is a RAM disk device path without appending. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). |
EFI_SUCCESS | The RAM disk is registered successfully. |
EFI_INVALID_PARAMETER | DevicePath or RamDiskType is NULL. RamDiskSize is 0. |
EFI_ALREADY_STARTED | A Device Path Protocol instance to be created is already present in the handle database. |
EFI_OUT_OF_RESOURCES | The RAM disk register operation fails due to resource limitation. |
Definition at line 593 of file RamDiskProtocol.c.
EFI_STATUS RamDiskUnpublishNfit | ( | IN RAM_DISK_PRIVATE_DATA * | PrivateData | ) |
Unpublish the RAM disk NVDIMM Firmware Interface Table (NFIT) from the ACPI table.
[in] | PrivateData | Points to RAM disk private data. |
EFI_SUCCESS | The RAM disk NFIT has been unpublished. |
others | The RAM disk NFIT has not been unpublished. |
Definition at line 380 of file RamDiskProtocol.c.
EFI_STATUS EFIAPI RamDiskUnregister | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
Unregister a RAM disk specified by DevicePath.
[in] | DevicePath | A pointer to the device path that describes a RAM Disk device. |
EFI_SUCCESS | The RAM disk is unregistered successfully. |
EFI_INVALID_PARAMETER | DevicePath is NULL. |
EFI_UNSUPPORTED | The device specified by DevicePath is not a valid ramdisk device path and not supported by the driver. |
EFI_NOT_FOUND | The RAM disk pointed by DevicePath doesn't exist. |
Definition at line 762 of file RamDiskProtocol.c.
MEDIA_RAM_DISK_DEVICE_PATH mRamDiskDeviceNodeTemplate |
Definition at line 18 of file RamDiskProtocol.c.
RAM_DISK_PRIVATE_DATA mRamDiskPrivateDataTemplate |
Definition at line 13 of file RamDiskProtocol.c.
UINTN mRamDiskSsdtTableKey |
Definition at line 30 of file RamDiskProtocol.c.
BOOLEAN mRamDiskSsdtTableKeyValid = FALSE |
Definition at line 29 of file RamDiskProtocol.c.