⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psm_ext.h

📁 YLP270的Windows CE5.0 bsp源码。
💻 H
📖 第 1 页 / 共 2 页
字号:
/****************************************************************************
*
* PSM_FormatOptions
* PSM_FormatOptionsPtr
*
* DESCRIPTION:
*    Stores user-configurable format options.
*
* MEMBERS:
*    MinimumReclaimSize - This defines the minimum amount of dirty space, in
*                         bytes, that must exist in an erase block before it
*                         can automatically be reclaimed in a threshold
*                         reclaim operation.  Allowable range is 0 to 252KB.
*                         This member works in conjunction with the
*                         ReclaimThreshold member (see below).  Note that,
*                         internally, this value is rounded up to the nearest
*                         multiple of 4KB (e.g. 6000 bytes would be rounded up
*                         to 8192 bytes).
*
*    StreamingGranularity - This defines the smallest granularity, in bytes,
*                           that an object can be allocated at, when using the
*                           streaming interface.  For example, a 5 byte data
*                           object (written using the streaming interface) will
*                           cause the number of bytes specified in this member
*                           to be reserved for future additions to the original
*                           logical unit.  Non-streamed writes use a much
*                           smaller, internal granularity that is not
*                           user-definable.  Allowable values for this member
*                           are 256, 512, 1024, 2048, 4096, and 8192.  If a
*                           value is given that is in between the ones listed,
*                           it is rounded down to the nearest valid value.
*                           Note that values less than 1024 decrease OVERALL
*                           performance significantly (not just for streamed
*                           writes), but use flash much more efficiently.
*                           Values above 2048 can improve performance slightly,
*                           but tend to make much less efficient use of
*                           available memory.
*
*    MaxFilenameLength - The maximum length of a single path element
*                        (e.g. file or directory name), in characters.
*                        Includes ALL filename characters (name, extension,
*                        '.' delimiter, etc.).  Allowable range is 8 to 1024,
*                        in 4 character intervals.  Values that do not divide
*                        evenly into 4 are rounded up to the next nearest
*                        multiple of 4.
*
*    ReclaimThreshold - This defines the minimum amount of space that must
*                       exist in an erase block before it can automatically
*                       be reclaimed in a threshold reclaim operation.  This
*                       differs from the MinimumReclaimSize (see above) in
*                       that it is expressed as a percentage of the total
*                       available space in the erase block, rather than a
*                       fixed value.  For example, if this is set to 20, a
*                       block will only be eligible for threshold reclaim if
*                       20% of its available space is dirty.  Available space
*                       is defined as all space not occupied by valid data.
*                       Note that this value is ALWAYS overridden by the
*                       MinimumReclaimSize, in case the percentage works out to
*                       be a very small value.  Also note that, internally,
*                       this value is rounded up to the nearest percentage that
*                       is a multiple of 4 (e.g. 13% would be rounded up to
*                       16%).
*
*    StreamingOverhead - This defines the amount of overhead that is set aside
*                        during the format to ensure that a constant data rate
*                        can be maintained during overwrite/streaming data
*                        operations.  For this release, the value shown below
*                        is the only valid value for this member.  Other
*                        options may be added in the future.
*
*                          PSM_StreamingOverheadNone - Indicates that no extra
*                                                      overhead will be set
*                                                      aside.  No constant data
*                                                      rates can be guaranteed.
*
*    UpdateAccessTimesEnabled - When set to TRUE, a file or directory's time
*                               and date stamp is updated every time it is
*                               accessed, or whenever its contents are updated.
*                               When set to FALSE, this information is not
*                               stored, greatly reducing the amount of flash
*                               that is dirtied.  In this latter case, the
*                               creation timestamp will be returned in place
*                               of the update/access timestamps.
*
*    Reserved - This member is reserved for future use.  It's contents are
*               undefined, and are ignored by the PSM software stack.
*
****************************************************************************/

typedef struct PSM_FormatOptions * PSM_FormatOptionsPtr;
typedef struct PSM_FormatOptions {
   UINT32 MinimumReclaimSize;
   UINT16 StreamingGranularity;
   UINT16 MaxFilenameLength;
   UINT8  ReclaimThreshold;
   UINT8  StreamingOverhead;
   UINT8  UpdateAccessTimesEnabled;
   UINT8  Reserved;
} PSM_FormatOptions;


/****************************************************************************
*
* PLAT_OEM_VPENToggleInfo
* PLAT_OEM_VPENToggleInfoPtr
*
* DESCRIPTION:
*    This structure is used to pass OEM VPEN specific information about the
*    hardware platform to the IPSM software stack during initialization.
*
* MEMBERS:
*    VPEN_VirtualReadRegAddress - A pointer containing an address which can be
*                                 used to read the current state I/O register
*                                 controlling the VPEN line of the flash 
*                                 device.  This information is required to 
*                                 properly change the VPEN I/O bit without 
*                                 changing the state of the other I/O bits that
*                                 may be controled by the register. This 
*                                 address MUST be a valid system address if 
*                                 VPEN_ReadModifyWrite is set to TRUE. 
*
*    VPEN_VirtualSetRegAddress - A pointer containing an address which can be
*                                  used to access the I/O register that controls 
*                                  setting (ouput set to TRUE) VPEN line of the 
*                                  flash device.  This information is required  
*                                  to properly change the VPEN I/O bit.  This 
*                                  address MUST be a valid system address.
*
*    VPEN_VirtualClearRegAddress - A pointer containing an address which can be
*                                  used to access the I/O register that controls 
*                                  clearing (ouput set to FALSE) VPEN line of the 
*                                  flash device.  This information is required  
*                                  to properly change the VPEN I/O bit.  This 
*                                  address MUST be a valid system address. 
*
*    VPEN_SetMask - Defines the bit mask needed to set the VPEN bit active.
*
*    VPEN_ClearMask - Defines the bit mask needed to set the VPEN bit inactive.
*
*    VPEN_ToggleEnabled - Set to TRUE if toggling of VPEN will be used.        
*
*    VPEN_ReadModifyWrite - This defines wether or not the register controlling
*                           the VPEN can be read from.  
*                           Set to FALSE if the register is a read only.  The 
*                           mask value will be store at the Virtual write 
*                           register address location.
*                           Set to TRUE - the current register value will be 
*                           read from the read register address.  Next the mask
*                           will be applied to this value.  (Note if negative 
*                           logic the mask value inverted first) The the value 
*                           is stored at the write register address.   
* 
*
****************************************************************************/

typedef struct PLAT_OEM_VPENToggleInfo {
   VOID_PTR VPEN_VirtualReadRegAddress;
   VOID_PTR VPEN_VirtualSetRegAddress;
   VOID_PTR VPEN_VirtualClearRegAddress;
   UINT32   VPEN_SetMask;
   UINT32   VPEN_ClearMask;
   BOOL     VPEN_ToggleEnabled;
   BOOL     VPEN_ReadModifyWrite;
   
} PLAT_OEM_VPENToggleInfo, * PLAT_OEM_VPENToggleInfoPtr;

/* 
 * Bug Fix Montague 3.5G SCR #333 
 * The IRQ and FIQ mask address was added to this structure for the TI925 
 * proccessor.  The masking of the interrupts must be done in software.
 */

/****************************************************************************
*
* "PLAT_INTC_AddrInitInfo"
*
* DESCRIPTION:
*   This structure is called by the PSM software stack to determine the OEM
*   IRQ Pending Register Address(icip) & FIQ interuppt Pending Register Address
*   location (icfp, if applicable).  These Registers will be polled by PSM to
*   check the pending interrupts to be serviced.  OEM must set appropriate polling
*   flag (say if only IRQ is enabled by OEM or both IRQ and FIQ are enabled)
*
*    INTC_icipVirtualReadAddress:   This is the absolute virtual address location 
*                                   where the OEM implemented the IRQ Pending Register
*    INTC_icfpVirtualReadAdderss:   This is the absolute virtual address location 
*                                   where the OEM implemented the  FIQ Pending Register
*    INTC_icipVirtualMaskAddress:   This is the absolute virtual address location 
*                                   where the OEM implemented the IRQ Mask Register
*    INTC_icfpVirtualMaskAdderss:   This is the absolute virtual address location 
*                                   where the OEM implemented the  FIQ Mask Register                                    
****************************************************************************/


typedef struct PLAT_OEM_INTC_AddrInfo{
   VOID_PTR INTC_icipVirtualReadAddress;
   VOID_PTR INTC_icfpVirtualReadAddress;
   VOID_PTR INTC_icipVirtualMaskAddress;
   VOID_PTR INTC_icfpVirtualMaskAddress;
}PLAT_OEM_INTC_AddrInfo, *PLAT_OEM_INTC_AddrInfoPtr;

/*End Bug Fix Montague 3.5G SCR #333 */

/*---------------------------- End of PSM_EXT.H ---------------------------*/


#endif   /* For the "#if !defined (__PSM_EXT_H)" multiple-inclusion sentry */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -