OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcAppleRamDiskLib.h File Reference
#include <Protocol/AppleRamDisk.h>
#include <Protocol/SimpleFileSystem.h>

Go to the source code of this file.

Functions

CONST APPLE_RAM_DISK_EXTENT_TABLEOcAppleRamDiskAllocate (IN UINTN Size, IN EFI_MEMORY_TYPE MemoryType)
 
BOOLEAN OcAppleRamDiskRead (IN CONST APPLE_RAM_DISK_EXTENT_TABLE *ExtentTable, IN UINTN Offset, IN UINTN Size, OUT VOID *Buffer)
 
BOOLEAN OcAppleRamDiskWrite (IN CONST APPLE_RAM_DISK_EXTENT_TABLE *ExtentTable, IN UINTN Offset, IN UINTN Size, IN CONST VOID *Buffer)
 
BOOLEAN OcAppleRamDiskLoadFile (IN OUT CONST APPLE_RAM_DISK_EXTENT_TABLE *ExtentTable, IN EFI_FILE_PROTOCOL *File, IN UINTN FileSize)
 
VOID OcAppleRamDiskFree (IN CONST APPLE_RAM_DISK_EXTENT_TABLE *ExtentTable)
 

Detailed Description

Apple RAM Disk library.

Copyright (C) 2019, Download-Fritz. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file OcAppleRamDiskLib.h.

Function Documentation

◆ OcAppleRamDiskAllocate()

CONST APPLE_RAM_DISK_EXTENT_TABLE * OcAppleRamDiskAllocate ( IN UINTN Size,
IN EFI_MEMORY_TYPE MemoryType )

Request allocation of Size bytes in extents table.

Parameters
[in]SizeRequested memory size.
[in]MemoryTypeRequested memory type.
Return values
Allocatedextent table.

Definition at line 322 of file OcAppleRamDiskLib.c.

◆ OcAppleRamDiskFree()

VOID OcAppleRamDiskFree ( IN CONST APPLE_RAM_DISK_EXTENT_TABLE * ExtentTable)

Free RAM disk.

Parameters
[in]ExtentTableAllocated extent table.

Definition at line 602 of file OcAppleRamDiskLib.c.

◆ OcAppleRamDiskLoadFile()

BOOLEAN OcAppleRamDiskLoadFile ( IN OUT CONST APPLE_RAM_DISK_EXTENT_TABLE * ExtentTable,
IN EFI_FILE_PROTOCOL * File,
IN UINTN FileSize )

Load file into RAM disk as it is.

Parameters
[in]ExtentTableAllocated extent table.
[in]FileFile protocol open for reading.
[in]FileSizeAmount of data to write.
Return values
TRUEon success.

◆ OcAppleRamDiskRead()

BOOLEAN OcAppleRamDiskRead ( IN CONST APPLE_RAM_DISK_EXTENT_TABLE * ExtentTable,
IN UINTN Offset,
IN UINTN Size,
OUT VOID * Buffer )

Read RAM disk data.

Parameters
[in]ExtentTableAllocated extent table.
[in]OffsetOffset in RAM disk.
[in]SizeAmount of data to read.
[out]BufferResulting data.
Return values
TRUEon success.

Definition at line 354 of file OcAppleRamDiskLib.c.

◆ OcAppleRamDiskWrite()

BOOLEAN OcAppleRamDiskWrite ( IN CONST APPLE_RAM_DISK_EXTENT_TABLE * ExtentTable,
IN UINTN Offset,
IN UINTN Size,
IN CONST VOID * Buffer )

Write RAM disk data.

Parameters
[in]ExtentTableAllocated extent table.
[in]OffsetOffset in RAM disk.
[in]SizeAmount of data to write.
[in]BufferSource data.
Return values
TRUEon success.

Definition at line 413 of file OcAppleRamDiskLib.c.