📄 davrecip.h
字号:
/* Copyright (c) 1995-2002 Intel Corporation */
/* Intel Confidential */
/* ###########################################################################
### RECINPLC
###
### Module: davrecip.h - Reclaim In Place
###
### $Workfile: davrecip.h $
### $Revision: 49 $
### $NoKeywords: $
########################################################################### */
/*
*****************************************************************
* NOTICE OF LICENSE AGREEMENT
*
* This code is provided by Intel Corp., and the use is governed
* under the terms of a license agreement. See license agreement
* for complete terms of license.
*
* YOU MAY ONLY USE THE SOFTWARE WITH INTEL FLASH PRODUCTS. YOUR
* USE OF THE SOFTWARE WITH ANY OTHER FLASH PRODUCTS IS EXPRESSLY
* PROHIBITED UNLESS AND UNTIL YOU APPLY FOR, AND ARE GRANTED IN
* INTEL'S SOLE DISCRETION, A SEPARATE WRITTEN SOFTWARE LICENSE
* FROM INTEL LICENSING ANY SUCH USE.
*****************************************************************
*/
#ifndef __dav_recinplc_h /* sentry header */
#define __dav_recinplc_h
/*### Include Files
#########################*/
#if (DIRECT_ACCESS_VOLUME == TRUE)
/*### Local Declarations
#########################*/
/*### Global Declarations
#########################*/
/* Reallocate Table Object Data Structure */
typedef struct
{
UINT16 UniqueId1;
UINT8 BottomStatus;
UINT8 byte_align1;
UINT32 BottomAddress;
UINT32 TopAddress;
UINT16 UniqueId2;
UINT8 TopStatus;
UINT8 byte_align2;
} RECINPLC_ReAllocateTable, __FAR_ * RECINPLC_ReAllocateTablePtr;
extern BOOLEAN RECINPLC_DoNotPerformReclaim;
#define RECINPLC_ReAllocateTableSize \
RoundUp(sizeof(RECINPLC_ReAllocateTable), FDI_ParagraphLength)
#define RECINPLC_OffsetToUniqueId1 (offsetof(RECINPLC_ReAllocateTable, UniqueId1))
#define RECINPLC_OffsetToBottomStatus (offsetof(RECINPLC_ReAllocateTable, BottomStatus))
#define RECINPLC_OffsetToBottomAddress (offsetof(RECINPLC_ReAllocateTable, BottomAddress))
#define RECINPLC_OffsetToTopAddress (offsetof(RECINPLC_ReAllocateTable, TopAddress))
#define RECINPLC_OffsetToTopStatus (offsetof(RECINPLC_ReAllocateTable, TopStatus))
#define RECINPLC_OffsetToUniqueId2 (offsetof(RECINPLC_ReAllocateTable, UniqueId2))
/*### This is the amount of space that must be taken from free space in order*/
/*### to ensure a reclaim in place(ReAllocate) */
/*### (1 Header entry + 1 ReAllocate table) */
#define RECINPLC_ReAllocateTableSpace \
(HDR_FixedSize + RECINPLC_ReAllocateTableSize)
/*### RECINPLC_TableEntry: Field Masks & Shift values*/
#define RECINPLC_Number_Of_Status_Bits 8
#define RECINPLC_MASK_Status 0xFF
/*### RECINPLC_TableEntry: Status */
#define RECINPLC_MASK_EraseInProgress 0x03
#define RECINPLC_MASK_EraseComplete 0x0C
#define RECINPLC_MASK_CopyComplete 0x30
#define RECINPLC_MASK_BlockDone 0xC0
#define RECINPLC_ST_NoStatus 0xFF
#define RECINPLC_ST_EraseInProgress 0xFC
#define RECINPLC_ST_EraseComplete 0xF0
#define RECINPLC_ST_CopyComplete 0xC0
#define RECINPLC_ST_BlockDone 0x00
#define RECINPLC_SetReAllocateTableEntryStatus(block_status_bits, value) \
(block_status_bits = ((block_status_bits & 0 ) | value))
#define RECINPLC_GetReAllocateTableEntryStatus(block_status_bits) \
(block_status_bits)
#define RECINPLC_CombineStatus(bottom_entry, top_entry) \
((RECINPLC_RestartStatus) \
(((RECINPLC_GetReAllocateTableEntryStatus(bottom_entry)) << \
RECINPLC_Number_Of_Status_Bits) | \
(RECINPLC_GetReAllocateTableEntryStatus(top_entry))))
/*ISF defines and Macros*/
#define RECINPLC_EntryISF_MASK 0xAAAAAAAA /* 0x00002AAA*/
#define GetRATQuasiState(status) ((status ^ (status << 1)) & RECTBL_EntryISF_MASK)
#define FixRATQuasiStateTo00(unknown, status) \
((~(unknown | (unknown >> 1))) & status)
#define FixRATQuasiStateTo11(temp_state, status) ((temp_state | (temp_state >> 1)) | status)
/*End ISF defines and Macros*/
/*### Global Functions*/
/*### Local Functions #########################*/
/*### Global Functions
#########################*/
/* E.5.0.652 Begin */
ERR_CODE RECINPLC_ReclaimObjectInPlace(HDR_SearchInfo *srch_info_ptr,
BOOLEAN restart);
/* E.5.0.652 End */
#endif /* sentry header */
#endif /* DIRECT_ACCESS_VOLUME */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -