TianoCore EDK2 master
Loading...
Searching...
No Matches
RamDisk.h File Reference

Go to the source code of this file.

Data Structures

struct  _EFI_RAM_DISK_PROTOCOL
 

Macros

#define EFI_RAM_DISK_PROTOCOL_GUID    { 0xab38a0df, 0x6873, 0x44a9, { 0x87, 0xe6, 0xd4, 0xeb, 0x56, 0x14, 0x84, 0x49 }};
 

Typedefs

typedef struct _EFI_RAM_DISK_PROTOCOL EFI_RAM_DISK_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EFI_RAM_DISK_REGISTER_RAMDISK) (IN UINT64 RamDiskBase, IN UINT64 RamDiskSize, IN EFI_GUID *RamDiskType, IN EFI_DEVICE_PATH *ParentDevicePath OPTIONAL, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
 
typedef EFI_STATUS(EFIAPI * EFI_RAM_DISK_UNREGISTER_RAMDISK) (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 

Variables

EFI_GUID gEfiRamDiskProtocolGuid
 

Detailed Description

This file defines the EFI RAM Disk Protocol.

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

Revision Reference:
This Protocol is introduced in UEFI Specification 2.6

Definition in file RamDisk.h.

Macro Definition Documentation

◆ EFI_RAM_DISK_PROTOCOL_GUID

#define EFI_RAM_DISK_PROTOCOL_GUID    { 0xab38a0df, 0x6873, 0x44a9, { 0x87, 0xe6, 0xd4, 0xeb, 0x56, 0x14, 0x84, 0x49 }};

Definition at line 18 of file RamDisk.h.

Typedef Documentation

◆ EFI_RAM_DISK_PROTOCOL

Definition at line 24 of file RamDisk.h.

◆ EFI_RAM_DISK_REGISTER_RAMDISK

typedef EFI_STATUS(EFIAPI * EFI_RAM_DISK_REGISTER_RAMDISK) (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.

Parameters
[in]RamDiskBaseThe base address of registered RAM disk.
[in]RamDiskSizeThe size of registered RAM disk.
[in]RamDiskTypeThe 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]ParentDevicePathPointer to the parent device path. If there is no parent device path then ParentDevicePath is NULL.
[out]DevicePathOn 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().
Return values
EFI_SUCCESSThe RAM disk is registered successfully.
EFI_INVALID_PARAMETERDevicePath or RamDiskType is NULL. RamDiskSize is 0.
EFI_ALREADY_STARTEDA Device Path Protocol instance to be created is already present in the handle database.
EFI_OUT_OF_RESOURCESThe RAM disk register operation fails due to resource limitation.

Definition at line 57 of file RamDisk.h.

◆ EFI_RAM_DISK_UNREGISTER_RAMDISK

typedef EFI_STATUS(EFIAPI * EFI_RAM_DISK_UNREGISTER_RAMDISK) (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)

Unregister a RAM disk specified by DevicePath.

Parameters
[in]DevicePathA pointer to the device path that describes a RAM Disk device.
Return values
EFI_SUCCESSThe RAM disk is unregistered successfully.
EFI_INVALID_PARAMETERDevicePath is NULL.
EFI_UNSUPPORTEDThe device specified by DevicePath is not a valid ramdisk device path and not supported by the driver.
EFI_NOT_FOUNDThe RAM disk pointed by DevicePath doesn't exist.

Definition at line 82 of file RamDisk.h.

Variable Documentation

◆ gEfiRamDiskProtocolGuid

EFI_GUID gEfiRamDiskProtocolGuid
extern

RAM Disk Protocol GUID variable.