16#ifndef _FW_BLOCK_SERVICE_H
17#define _FW_BLOCK_SERVICE_H
22#define FVB_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FwVolBlockInstance, FVB_DEVICE_SIGNATURE)
23#define FVB_DEVICE_SIGNATURE SIGNATURE_32 ('F', 'V', 'B', 'N')
52#define EMU_FVB_BLOCK_SIZE \
54#define EMU_FVB_NUM_SPARE_BLOCKS \
55 EFI_SIZE_TO_PAGES ((UINTN)FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize))
56#define EMU_FVB_NUM_TOTAL_BLOCKS \
57 (2 * EMU_FVB_NUM_SPARE_BLOCKS)
59 (EMU_FVB_NUM_TOTAL_BLOCKS * EMU_FVB_BLOCK_SIZE)
60#define FTW_WRITE_QUEUE_SIZE \
61 (FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) - \
62 sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER))
63#define EMU_FV_HEADER_LENGTH OFFSET_OF (FVB_FV_HDR_AND_VARS_TEMPLATE, VarHdr)
65#define NOT_ERASED_BIT 0
67#define ERASED_UINT8 0xff
68#define ERASED_UINT32 0xffffffff
75FvbProtocolGetAttributes (
83FvbProtocolSetAttributes (
91FvbProtocolGetPhysicalAddress (
99FvbProtocolGetBlockSize (
131FvbProtocolEraseBlocks (
UINT32 EFI_FVB_ATTRIBUTES_2
UINT64 EFI_PHYSICAL_ADDRESS