📄 psm_ext.h
字号:
/****************************************************************************
*** Intel Confidential
*** Copyright (C) Intel Corporation 1994-2000
*** All Rights Reserved.
*** ------------------------------------------------------------------------
***
***
*** Project Name: Persistent Storage Manager (PSM)
***
*** Module Name: <none> (Common Internal Files)
***
*** File: PSM_EXT.H - External project-wide data types and constants
***
*** File Revision: $Revision:: 1 $
*** $Date:: 6/30/03 4:58p $
*** $Author:: Ejvanals $
***
*** Purpose: Defines all external data types and constants that are
*** used within the Intel Persistent Storage Manager (tm)
*** core software stack.
***
*** $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.
*****************************************************************
*/
#if !defined (__PSM_EXT_H) /* Multiple-inclusion sentry - DO NOT REMOVE */
#define __PSM_EXT_H
/*--------------------------- Start of PSM_EXT.H --------------------------*/
/****************************************************************************
*
* Include Files:
*
* STANDTYP.H - Standard data type definitions
*
****************************************************************************/
#include "STANDTYP.H"
/*------------------------------- Constants -------------------------------*/
/****************************************************************************
*
* "PSM_StreamingOverheadNone"
*
* DESCRIPTION:
* This value is used to indicate how much extra overhead to reserve when
* formatting the media, to guarantee constant data rates when performing
* overwrite/streamed data operations. See the PSM_FormatOptions structure
* definition for more information.
*
****************************************************************************/
#define PSM_StreamingOverheadNone 0
// Intel PSM Flash File System KernelIoControl entry
#define IOCTL_PSM_FLASH_CMD CTL_CODE(FILE_DEVICE_HAL,4066, METHOD_BUFFERED, FILE_ANY_ACCESS)
/*------------------------- Data Type Definitions -------------------------*/
/****************************************************************************
*
* PSM_OEMInfo
* PSM_OEMInfoPtr
*
* DESCRIPTION:
* This structure is used to pass OEM-specific information about the
* hardware platform to the IPSM software stack during initialization.
*
* MEMBERS:
* ReadStartAddress - A pointer containing an address which can be used to
* read from the very beginning of the flash memory array.
* This should include ALL flash in the system (not just
* the portion being managed by IPSM). This information
* is required to properly locate the physical boundaries
* between multiple flash devices; without this, IPSM will
* fail to function properly. If there are multiple
* non-contiguous arrays of flash memory in the system,
* this address must be set to the beginning of the array
* that includes the memory region being managed by IPSM.
* In all cases, this address MUST be aligned with the
* physical starting address of a flash memory device.
*
* WriteStartAddress - A pointer containing an address which can be used to
* write to the very beginning of the flash memory array.
* The purpose of this member is identical to that of the
* ReadStartAddress member (above), and is bound to ALL
* the same restrictions. The two separate addresses are
* provided for systems whose memory management schemes
* will not allow write cycles at certain addresses where
* reads must be performed. For example, the "read"
* address of the memory array might be mapped into the
* system's ROM space, to allow booting and executing
* directly from flash. Since many MMUs won't allow
* write cycles to memory regions they believe to be
* read-only, the same flash array must be mapped (again)
* for write access at a separate memory address through
* a different chip select.
*
* BurstReadStartAddress - A pointer containing an address which can be used
* to read from the very beginning of the flash
* memory array. All reads from this base address
* are performed in "burst" mode. If the device
* does not support bursting, set this to the same
* address as the normal ReadStartAddress member.
* The purpose of this member is identical to that
* of the ReadStartAddress member (above), and is
* bound to ALL the same restrictions.
*
* MaximumArrayLength - The maximum possible length of the flash memory
* array, in bytes. The initialization algorithms in
* IPSM will not attempt to identify any flash memory
* devices beyond this point, regardless of whether or
* not any additional devices are present. IPSM will
* stop searching for flash devices on its own, if it
* fails to find any valid flash devices before fully
* covering this range of memory.
*
* MaximumRegistrySize - Defines the maximum size, in bytes, that the system
* registry can grow to. This value is required to
* remain constant. Changing this value after initial
* registry information has been written will corrupt
* both the saved registry values, and the managed
* data partition.
*
* ManagedAreaStart - The start offset for the region of memory being managed
* by IPSM. This is represented as a the number of bytes
* from the address supplied in the ReadStartAddress
* member above, at which the managed area begins. The
* address generated by adding this offset to the value of
* the ReadStartAddress member MUST fall on an erase block
* boundary.
*
* ManagedAreaLength - The total length, in bytes, of the region of memory
* being managed by IPSM. The length given here must
* completely span some number of erase blocks; a length
* that covers only part of an erase block is invalid.
*
* ReadBusWidth - The width of the system bus, when performing reads from
* the flash memory array, in bits (i.e. 8-bit bus, 16-bit
* bus, etc.). This information is only required if the
* system bus requires data to be an EXACT width when being
* read. If the system can accept reads of any size, as long
* as they are aligned, set this value to zero.
*
* WriteBusWidth - The width of the system bus, when performing writes to
* to the flash memory array, in bits (i.e. 8-bit bus, 16-bit
* bus, etc.). This information is only required if the
* system bus requires data to be an EXACT width when being
* written. If the system can accept writes of any size, as
* long as they are aligned, set this value to zero.
*
* BurstReadBusWidth - The width of the system bus, when performing burst
* reads from the flash memory array, in bits (i.e. 8-bit
* bus, 16-bit bus, etc.). This information is only
* required if the system bus requires data to be an
* EXACT width when being read in burst mode. If the
* system can accept burst reads of any size, as long as
* they are aligned, set this value to zero.
*
****************************************************************************/
typedef struct PSM_OEMInfo * PSM_OEMInfoPtr;
typedef struct PSM_OEMInfo {
VOID_PTR PhysicalReadStartAddress;
VOID_PTR PhysicalWriteStartAddress;
VOID_PTR PhysicalBurstReadStartAddress;
VOID_PTR VirtualReadStartAddress;
VOID_PTR VirtualWriteStartAddress;
VOID_PTR VirtualBurstReadStartAddress;
UINT32 MaximumArrayLength;
UINT32 MaximumRegistrySize;
UINT32 ManagedAreaStart;
UINT32 ManagedAreaLength;
UINT8 ReadBusWidth;
UINT8 WriteBusWidth;
UINT8 BurstReadBusWidth;
} PSM_OEMInfo;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -