OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcApfsInternal.h File Reference
#include <Uefi.h>
#include <IndustryStandard/Apfs.h>
#include <Protocol/BlockIo.h>
#include <Protocol/ApfsEfiBootRecordInfo.h>

Go to the source code of this file.

Data Structures

struct  APFS_PRIVATE_DATA_
 

Macros

#define APFS_PRIVATE_DATA_SIGNATURE   SIGNATURE_32 ('A', 'F', 'J', 'S')
 
#define APFS_MOD_MAX_UINT32(Value, Result)
 

Typedefs

typedef struct APFS_PRIVATE_DATA_ APFS_PRIVATE_DATA
 

Functions

EFI_STATUS InternalApfsReadSuperBlock (IN EFI_BLOCK_IO_PROTOCOL *BlockIo, OUT APFS_NX_SUPERBLOCK **SuperBlockPtr)
 
EFI_STATUS InternalApfsReadDriver (IN APFS_PRIVATE_DATA *PrivateData, OUT UINT32 *DriverSize, OUT VOID **DriverBuffer)
 
VOID InternalApfsInitFusionData (IN APFS_NX_SUPERBLOCK *SuperBlock, OUT APFS_PRIVATE_DATA *PrivateData)
 
EFI_BLOCK_IO_PROTOCOL * InternalApfsTranslateBlock (IN APFS_PRIVATE_DATA *PrivateData, IN UINT64 Block, OUT EFI_LBA *Lba)
 

Variables

LIST_ENTRY mApfsPrivateDataList
 

Detailed Description

Copyright (C) 2020, vit9696. All rights reserved.

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 OcApfsInternal.h.

Macro Definition Documentation

◆ APFS_MOD_MAX_UINT32

#define APFS_MOD_MAX_UINT32 ( Value,
Result )
Value:
do { DivU64x32Remainder ((Value), MAX_UINT32, (Result)); } while (0)
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
Definition UserMath.c:25

On Intel 64-bit we can use 128-bit multiplication instead of slow division: (x * (UINT128) 0x8000000080000001) >> 31. Let the compiler do it for us.

Definition at line 33 of file OcApfsInternal.h.

◆ APFS_PRIVATE_DATA_SIGNATURE

#define APFS_PRIVATE_DATA_SIGNATURE   SIGNATURE_32 ('A', 'F', 'J', 'S')

Definition at line 23 of file OcApfsInternal.h.

Typedef Documentation

◆ APFS_PRIVATE_DATA

Private data storing fusion pairs and location protocol data.

Definition at line 36 of file OcApfsInternal.h.

Function Documentation

◆ InternalApfsInitFusionData()

VOID InternalApfsInitFusionData ( IN APFS_NX_SUPERBLOCK * SuperBlock,
OUT APFS_PRIVATE_DATA * PrivateData )

Definition at line 24 of file OcApfsFusion.c.

◆ InternalApfsReadDriver()

EFI_STATUS InternalApfsReadDriver ( IN APFS_PRIVATE_DATA * PrivateData,
OUT UINT32 * DriverSize,
OUT VOID ** DriverBuffer )

Definition at line 403 of file OcApfsIo.c.

◆ InternalApfsReadSuperBlock()

EFI_STATUS InternalApfsReadSuperBlock ( IN EFI_BLOCK_IO_PROTOCOL * BlockIo,
OUT APFS_NX_SUPERBLOCK ** SuperBlockPtr )

Definition at line 283 of file OcApfsIo.c.

◆ InternalApfsTranslateBlock()

EFI_BLOCK_IO_PROTOCOL * InternalApfsTranslateBlock ( IN APFS_PRIVATE_DATA * PrivateData,
IN UINT64 Block,
OUT EFI_LBA * Lba )

Definition at line 106 of file OcApfsFusion.c.

Variable Documentation

◆ mApfsPrivateDataList

LIST_ENTRY mApfsPrivateDataList
extern

List of discovered partitions.

Definition at line 34 of file OcApfsConnect.c.