XINU
|
Go to the source code of this file.
Data Structures | |
struct | file |
struct | flash |
struct | flash_block |
struct | flash_region |
struct | trx_header |
Macros | |
#define | AMD_BLOCKMOD 0x60 |
#define | AMD_CLR_SR 0x50 |
#define | AMD_ERASE_CYCLE3 0x80 |
#define | AMD_ERASE_CYCLE6 0x30 |
#define | AMD_GET_16(addr) *((volatile unsigned int16 *)((unsigned int)(addr))) |
#define | AMD_GET_8(addr) *((volatile unsigned char *)((unsigned int)(addr))) |
#define | AMD_H_LOCK 0x02 |
#define | AMD_LOCK 0x01 |
#define | AMD_PROGRAM_CYCLE3 0xA0 |
#define | AMD_PUT_16(addr, word) *((volatile unsigned int16 *)((unsigned int)(addr)))=(word) |
#define | AMD_PUT_8(addr, byte) *((volatile unsigned char *)((unsigned int)(addr)))=(byte) |
#define | AMD_READ 0xFF |
#define | AMD_REG_CYCLE1 0x555 |
#define | AMD_REG_CYCLE2 0x2AA |
#define | AMD_RESET 0xF0 |
#define | AMD_S_LOCK 0x01 |
#define | AMD_SR_WSMS 0x001 |
#define | AMD_UNLOCK_CYCLE1 0xAA |
#define | AMD_UNLOCK_CYCLE2 0x55 |
#define | CFE_MAX_BLOCK 0x01FF |
#define | CFE_MIN_BLOCK 0x0000 |
#define | CFI_COMMAND_SET 0x13 |
#define | CFI_DEV_INTERFACE 0x28 |
#define | CFI_DEV_SIZE 0x27 |
#define | CFI_DEVICE 0x01 |
#define | CFI_GET_8(addr, offset) *((volatile unsigned char *)((addr)+((offset)<<FLASH_WIDEMODE))) |
#define | CFI_MANUFACTURER 0x00 |
#define | CFI_MAX_BUFFER 0x2A |
#define | CFI_PUT_8(addr, offset, cmd) *((volatile unsigned char *)((addr)+((offset)<<FLASH_WIDEMODE)))=(cmd) |
#define | CFI_QUERY_ADDR 0x55 |
#define | CFI_QUERY_EXIT 0xFF |
#define | CFI_QUERY_MODE 0x98 |
#define | CFI_QUERY_STRING 0x10 |
#define | CFI_REGION_COUNT 0x2C |
#define | CFI_REGION_TAB 0x2D |
#define | CFI_SIGNATURE 0x10 |
#define | FLASH_AMD_ECS 0x0004 |
#define | FLASH_AMD_SCS 0x0002 |
#define | FLASH_BLK_SIZE 512 |
#define | FLASH_BLOCK 0x00 |
#define | FLASH_BLOCK_CLEAN 1 |
#define | FLASH_BLOCK_DIRTY 2 |
#define | FLASH_BLOCK_FREE 0 |
#define | FLASH_BLOCK_SIZE 0x0000 |
#define | FLASH_ERASE_PREP 0x0014 |
#define | FLASH_INTEL_ECS 0x0001 |
#define | FLASH_INTEL_SCS 0x0003 |
#define | FLASH_LOCK 0x0011 |
#define | FLASH_LOCKDOWN 0x0013 |
#define | FLASH_LOCKED 0x0010 |
#define | FLASH_LOGBLOCK 0x01 |
#define | FLASH_MODE 0x0001 |
#define | FLASH_MTSU_ECS 0x0101 |
#define | FLASH_MTSU_SCS 0x0100 |
#define | FLASH_N_BLOCKS 0x0001 |
#define | FLASH_RESET 0x0015 |
#define | FLASH_STATUS 0x0000 |
#define | FLASH_SYNC 0x0002 |
#define | FLASH_UNLOCK 0x0012 |
#define | FLASH_WIDEMODE 1 |
#define | INTEL_BLOCKMOD 0x60 |
#define | INTEL_CLR_SR 0x50 |
#define | INTEL_CONFIRM 0xD0 |
#define | INTEL_ERASE 0x20 |
#define | INTEL_GET_16(addr) *((volatile unsigned int16 *)((unsigned int)(addr))) |
#define | INTEL_GET_8(addr) *((volatile unsigned char *)((unsigned int)(addr))) |
#define | INTEL_H_LOCK 0x02 |
#define | INTEL_ID_BLS 0x04 |
#define | INTEL_ID_DEV 0x02 |
#define | INTEL_ID_MFG 0x00 |
#define | INTEL_LOCK 0x01 |
#define | INTEL_LOCKDOWN 0x2F |
#define | INTEL_PROGRAM 0x40 |
#define | INTEL_PUT_16(addr, word) *((volatile unsigned int16 *)((unsigned int)(addr)))=(word) |
#define | INTEL_PUT_8(addr, byte) *((volatile unsigned char *)((unsigned int)(addr)))=(byte) |
#define | INTEL_READ 0xFF |
#define | INTEL_READ_ID 0x90 |
#define | INTEL_READ_SR 0x70 |
#define | INTEL_RESUME 0xD0 |
#define | INTEL_S_LOCK 0x01 |
#define | INTEL_SR_BLS 1 |
#define | INTEL_SR_ES 5 |
#define | INTEL_SR_ESS 6 |
#define | INTEL_SR_PS 4 |
#define | INTEL_SR_PSS 2 |
#define | INTEL_SR_WSMS 7 |
#define | INTEL_SUSPEND 0xB0 |
#define | INTEL_UNLOCK 0xD0 |
#define | KERNEL_MAX_BLOCK 0x03FF |
#define | KERNEL_MIN_BLOCK 0x0200 |
#define | MAX_LIVE_BLOCKS 8 |
#define | MAX_REGIONS 8 |
#define | NVRAM_MAX_BLOCK 0x1FFF |
#define | NVRAM_MIN_BLOCK 0x1FC0 |
#define | TRX_MAGIC 0x30524448 |
Variables | |
struct flash_block | bad_block |
struct flash | flashtab [] |
This file provides various definitions and prototypes for the flash driver and all its affiliates
Definition in file flash.h.
#define AMD_GET_16 | ( | addr | ) | *((volatile unsigned int16 *)((unsigned int)(addr))) |
#define AMD_GET_8 | ( | addr | ) | *((volatile unsigned char *)((unsigned int)(addr))) |
#define AMD_PUT_16 | ( | addr, | |
word | |||
) | *((volatile unsigned int16 *)((unsigned int)(addr)))=(word) |
#define CFI_GET_8 | ( | addr, | |
offset | |||
) | *((volatile unsigned char *)((addr)+((offset)<<FLASH_WIDEMODE))) |
#define CFI_PUT_8 | ( | addr, | |
offset, | |||
cmd | |||
) | *((volatile unsigned char *)((addr)+((offset)<<FLASH_WIDEMODE)))=(cmd) |
#define FLASH_BLOCK 0x00 |
block is a flash_block struct
#define FLASH_BLOCK_CLEAN 1 |
#define FLASH_ERASE_PREP 0x0014 |
#define FLASH_UNLOCK 0x0012 |
#define INTEL_BLOCKMOD 0x60 |
#define INTEL_GET_16 | ( | addr | ) | *((volatile unsigned int16 *)((unsigned int)(addr))) |
#define INTEL_GET_8 | ( | addr | ) | *((volatile unsigned char *)((unsigned int)(addr))) |
#define INTEL_PUT_16 | ( | addr, | |
word | |||
) | *((volatile unsigned int16 *)((unsigned int)(addr)))=(word) |
struct flash_block logicalMap | ( | struct flash * | , |
uint32 | |||
) |
devcall physicalAMDRead | ( | struct flash * | , |
struct flash_block * | |||
) |
devcall physicalControl | ( | struct flash * | , |
struct flash_block * | , | ||
byte | , | ||
uint32 | |||
) |
devcall physicalErase | ( | struct flash * | , |
struct flash_block * | |||
) |
devcall physicalIntelControl | ( | struct flash * | , |
struct flash_block * | , | ||
byte | , | ||
uint32 | |||
) |
devcall physicalIntelErase | ( | struct flash * | , |
struct flash_block * | |||
) |
devcall physicalIntelRead | ( | struct flash * | , |
struct flash_block * | |||
) |
devcall physicalIntelWrite | ( | struct flash * | , |
struct flash_block * | |||
) |
devcall physicalRead | ( | struct flash * | , |
struct flash_block * | |||
) |
devcall physicalWrite | ( | struct flash * | , |
struct flash_block * | |||
) |
bool validateTrx | ( | struct file * | ) |
struct flash_block bad_block |
struct flash flashtab[] |