[39cc10a] | 1 | /* |
---|
| 2 | * PSIM addresses and constants based upon the configuration |
---|
| 3 | * of devices used in the script provided by RTEMS. |
---|
| 4 | * |
---|
| 5 | * $Id$ |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #ifndef __PSIM_h |
---|
| 9 | #define __PSIM_h |
---|
| 10 | |
---|
| 11 | /* |
---|
| 12 | * RAM Information |
---|
| 13 | */ |
---|
| 14 | #define PSIM_RAM_BASE (void *)0x00000000 |
---|
| 15 | #define PSIM_RAM_SIZE 8388608 |
---|
| 16 | |
---|
| 17 | /* |
---|
| 18 | * NVRAM/RTC Structure and Information |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | #define PSIM_RTC_FREEZE 0xc0 |
---|
| 22 | #define PSIM_RTC_UPDATE 0x00 |
---|
| 23 | |
---|
| 24 | typedef struct { |
---|
| 25 | volatile uint8_t Control; /* 0x04 */ |
---|
| 26 | volatile uint8_t Second; /* 0x05 */ |
---|
| 27 | volatile uint8_t Minute; /* 0x06 */ |
---|
| 28 | volatile uint8_t Hour; /* 0x07 */ |
---|
| 29 | volatile uint8_t Day; /* 0x08 */ |
---|
| 30 | volatile uint8_t Date; /* 0x09 */ |
---|
| 31 | volatile uint8_t Month; /* 0x0a */ |
---|
| 32 | volatile uint8_t Year; /* 0x0b */ |
---|
| 33 | } psim_rtc_t; |
---|
| 34 | |
---|
| 35 | /* |
---|
| 36 | * System V IPC Semaphore -- Read Only |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | typedef struct { |
---|
| 40 | volatile uint32_t obtain_value; /* 0x00 */ |
---|
| 41 | volatile uint32_t lock; /* 0x04 */ |
---|
| 42 | volatile uint32_t unlock; /* 0x08 */ |
---|
| 43 | } psim_sysv_sem_t; |
---|
| 44 | |
---|
| 45 | typedef struct { |
---|
| 46 | /* 0x0c000000 - 0x0c007FFF - AMD 29F040 */ |
---|
| 47 | volatile uint8_t Flash[ 512 * 1024 ]; |
---|
| 48 | |
---|
| 49 | /* 0x0c080000 - 0x0c0FFFFF - NVRAM/NVRAM */ |
---|
| 50 | volatile uint8_t nvram[ 512 * 1024 ]; |
---|
| 51 | |
---|
| 52 | /* 0x0c100000 - 0x0c100007 - NVRAM/RTC */ |
---|
| 53 | psim_rtc_t RTC; |
---|
| 54 | |
---|
| 55 | /* 0x0c100008 - 0x0c10000F - NVRAM/RTC */ |
---|
| 56 | uint8_t gap1[8]; |
---|
| 57 | |
---|
| 58 | /* 0x0c100010 - 0x0c10001b - System V IPC Semaphore */ |
---|
| 59 | psim_sysv_sem_t Semaphore; |
---|
| 60 | |
---|
| 61 | /* 0x0c10001C - 0x0c10FFFF - NVRAM/RTC */ |
---|
| 62 | uint8_t gap2[65508]; |
---|
| 63 | |
---|
| 64 | /* 0x0c110000 - 0x0c12FFFF - System V IPC Shared Memory */ |
---|
| 65 | uint8_t SharedMemory[ 128 * 1024 ]; |
---|
| 66 | |
---|
| 67 | } psim_registers_t; |
---|
| 68 | |
---|
| 69 | /* |
---|
| 70 | * Data Structure Overlay for Registers. See linkcmds for placement. |
---|
| 71 | */ |
---|
| 72 | extern psim_registers_t PSIM; |
---|
| 73 | |
---|
| 74 | #endif |
---|
| 75 | /* end of include file */ |
---|