📄 davcfgtbl.h
字号:
/* Copyright (c) 1995-2004 Intel Corporation */
/* Intel Confidential */
/* ###########################################################################
### DAV - Direct Access Volume Enhancement to FDI
###
### Module: DavCfgTbl.h - Header Types & Macros Include File
###
### $Workfile: DavCfgTbl.h $
### $Revision: 10 $
### $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_CFG_TABLE_H__ /* sentry header */
#define __DAV_CFG_TABLE_H__
#if (DIRECT_ACCESS_VOLUME == TRUE)
#include "DavOttTbl.h"
/*### Global Declarations
#########################*/
#define CFGHDR_MaxConfigurationEntries 15
#define CFGHDR_HeaderAddress DAV_MEM_FirstHeaderAddr
/*########################################################################*/
/*### Reserved Header */
/*
// CFGTBL_Entry (8 bytes)
//
// 3 2 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 <- Bits ( 4 Bytes)
// +-------------------------------+-------+-----------+-----------+
// 0 | Progress(Used by PAGE_RECLAIM)| Type |Allocation | Status |
// +---------------+---------------+-------+-------+---+-----------+
// | 0 | 1 | 2 | 3 | <- Byte
//
*/
typedef struct
{
UINT16 ProgressState;
UINT16 TypeAllocStatus; /* Write 1st */
} CFGTBL_Entry, __FAR_ * CFGTBL_EntryPtr;
/* Entry Type Field */
#define CFGTBL_MASK_CtEntryType 0xF000 /* 1111 XXXX XXXX XXXX */
#define CFGTBL_CtEntryType_NotUsed 0x0F /* XXXX 1111 */
#define CFGTBL_CtEntryType_PAGE_RECLAIM 0x0E /* XXXX 1110 */
#define CFGTBL_CtEntryType_OTT 0x0C /* XXXX 1100 */
#define CFGTBL_CtEntryType_RT 0x08 /* XXXX 1000 */
#define CFGTBL_CtEntryType_RAT 0x00 /* XXXX 0000 */
void CFGTBL_SetCtEntryType(CFGTBL_EntryPtr aPtr, UINT8 aByte);
UINT8 CFGTBL_GetCtEntryType(CFGTBL_EntryPtr aPtr);
/* Entry Allocate Status Field */
#define CFGTBL_MASK_CtAllocationStatus 0x0FC0 /* XXXX 1111 11XX XXXX */
#define CFGTBL_CtAllocationStatus_Empty 0x3F /* XX11 1111 */
#define CFGTBL_CtAllocationStatus_WriteInProgress 0x3C /* XX11 1100 */
#define CFGTBL_CtAllocationStatus_Valid 0x30 /* XX11 0000 */
#define CFGTBL_CtAllocationStatus_InValid 0x00 /* XX00 0000 */
void CFGTBL_SetCtAllocationStatus(CFGTBL_EntryPtr aPtr, UINT8 aByte);
UINT8 CFGTBL_GetCtAllocationStatus(CFGTBL_EntryPtr aPtr);
/* Recovery is handled by CFGTBL_GetRecoveredEntryStatusAndRepairAllocation */
/* Entry Status Field */
#define CFGTBL_MASK_CtEntryStatus 0x003F /* XXXX XXXX XX11 1111 */
#define CFGTBL_CtEntryStatus_EntryUnused 0x3F /* XX11 1111 Table does not exist */
#define CFGTBL_CtEntryStatus_EntryAllocating 0x3C /* XX11 1100 Table exists/inprogress */
#define CFGTBL_CtEntryStatus_EntryValid 0x30 /* XX11 0000 Table exists/good */
#define CFGTBL_CtEntryStatus_EntryInValid 0x00 /* XX00 0000 Table exists/dirty */
void CFGTBL_SetCtEntryStatus(CFGTBL_EntryPtr aPtr, UINT8 aByte);
UINT8 CFGTBL_GetCtEntryStatus(CFGTBL_EntryPtr aPtr);
/* E5.5.969 Start */
UINT8 CFGTBL_GetRecoveredEntryStatusAndRepairAllocation( CFGTBL_EntryPtr aEntryPtr,
FDI_Handle aHandle,
ERR_CODE * statusPtr);
/* E5.5.969 End */
/* Entry Progress State Field */
#define CFGTBL_MASK_CtProgressState 0xFFFF /* 16 bit Mask */
#define CFGTBL_CtProgressState_NoOperationInProgress 0xFFFF /* 1111 1111 1111 1111 */
#define CFGTBL_CtProgressState_InitializeInProgress 0xFFFC /* 1111 1111 1111 1100 */
#define CFGTBL_CtProgressState_MoveInProgress 0xFFF0 /* 1111 1111 1111 0000 */
#define CFGTBL_CtProgressState_RelocateHeadersInProgress 0xFFC0 /* 1111 1111 1100 0000 */
#define CFGTBL_CtProgressState_InitializeRatInProgress 0xFF00 /* 1111 1111 0000 0000 */
#define CFGTBL_CtProgressState_ModifyInProgress 0xFC00 /* 1111 1100 0000 0000 */
#define CFTTBL_CtProgressState_DefragComplete 0xF000 /* 1111 0000 0000 0000 */
#define CFTTBL_CtProgressState_NotUsed 0xC000 /* 1100 0000 0000 0000 */
void CFGTBL_SetCtProgressState(CFGTBL_EntryPtr aPtr, UINT16 aWord);
UINT16 CFGTBL_GetCtProgressState(CFGTBL_EntryPtr aPtr);
/* E5.5.970 Start */
UINT16 CFGTBL_GetRecoveredCtProgressState( CFGTBL_EntryPtr aPtr,
FDI_Handle aHandle,
ERR_CODE * statusPtr);
/* E5.5.970 End */
/*
// CFGTBL_PgReclaimEntry ([15 * 4] + 4 = 64 bytes)
//
// 3 2 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 <- Bits ( 4 Bytes)
// +-------------------------------+-------------------------------+
// 0 | UniqueId 1 | UniqueId 2 |
// +-------------------------------+-------------------------------+
// 1 | CtEntry[PAGE_RECLAIM] |
// +-------------------------------+-------------------------------+
// 2 | CtEntry[OTT] |
// +-------------------------------+-------------------------------+
// 3 | CtEntry[RT] |
// +-------------------------------+-------------------------------+
// 4 | CtEntry[RAT] |
// +-------------------------------+-------------------------------+
// 5 | |
// + +
// .. | CtEntry[CFGHDR_MaxConfigurationEntries-4] |
// + +
// 11 | |
// +---------------+---------------+---------------+---------------+
// | 0 | 1 | 2 | 3 | <- Byte
//
*/
typedef struct
{
UINT16 UniqueId1; /* Write Once */
UINT16 UniqueId2; /* Write Once */
CFGTBL_Entry CtEntry[CFGHDR_MaxConfigurationEntries];
} CFGTBL_PgReclaimEntry, __FAR_ * CFGTBL_PgReclaimEntryPtr;
/* UniqueId1 */
#define CFGTBL_UniqueId1 0xF0F0
void CFGTBL_SetPgUniqueId1(CFGTBL_PgReclaimEntryPtr aPtr, UINT16 aWord);
UINT16 CFGTBL_GetPgUniqueId1(CFGTBL_PgReclaimEntryPtr aPtr);
/* UniqueId2 */
#define CFGTBL_UniqueId2 0xF0F0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -