OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [ppcn_60x/] [nvram/] [prepnvr.h] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/* Structure map for NVRAM on PowerPC Reference Platform */
2
 
3
/* Revision 1 changes (8/25/94):
4
        - Power Management (RESTART_BLOCK struct)
5
        - Normal added to PM_MODE
6
        - OSIRQMask (HEADER struct) */
7
 
8
/* All fields are either character/byte strings which are valid either
9
endian or they are big-endian numbers.
10
 
11
There are a number of Date and Time fields which are in RTC format,
12
big-endian. These are stored in UT (GMT).
13
 
14
For enum's: if given in hex then they are bit significant, i.e. only
15
one bit is on for each enum.
16
*/
17
 
18
#ifndef _NVRAM_
19
#define _NVRAM_
20
 
21
#define VERSION  1
22
#define REVISION 0
23
 
24
#define OSAREASIZE 1024   /* size of OSArea space */
25
#define CONFSIZE 512      /* guess at size of Configuration space */
26
 
27
typedef struct _SECURITY {
28
  unsigned long BootErrCnt;         /* Count of boot password errors */
29
  unsigned long ConfigErrCnt;       /* Count of config password errors */
30
  unsigned long BootErrorDT[2];     /* Date&Time from RTC of last error in pw */
31
  unsigned long ConfigErrorDT[2];   /* Date&Time from RTC of last error in pw */
32
  unsigned long BootCorrectDT[2];   /* Date&Time from RTC of last correct pw */
33
  unsigned long ConfigCorrectDT[2]; /* Date&Time from RTC of last correct pw */
34
  unsigned long BootSetDT[2];       /* Date&Time from RTC of last set of pw */
35
  unsigned long ConfigSetDT[2];     /* Date&Time from RTC of last set of pw */
36
  unsigned char Serial[16];         /* Box serial number */
37
  } SECURITY;
38
 
39
typedef enum _OS_ID {
40
  Unknown = 0,
41
  Firmware = 1,
42
  AIX = 2,
43
  NT = 3,
44
  WPOS2 = 4,
45
  WPAIX = 5,
46
  Taligent = 6,
47
  Solaris = 7,
48
  Netware = 8,
49
  USL = 9,
50
  Low_End_Client = 10,
51
  SCO = 11
52
  } OS_ID;
53
 
54
typedef struct _ERROR_LOG {
55
  unsigned char ErrorLogEntry[40]; /* To be architected */
56
  } ERROR_LOG;
57
 
58
/*---Revision 1: Change the following struct:---*/
59
typedef struct _RESUME_BLOCK {
60
                                        /* Hibernation Resume Device will be an
61
                                           environment variable */
62
    unsigned long CheckSum;             /* Checksum of RESUME_BLOCK */
63
    volatile unsigned long BootStatus;
64
 
65
    void * ResumeAddr;                  /* For Suspend Resume */
66
    void * SaveAreaAddr;                /* For Suspend Resume */
67
    unsigned long SaveAreaLength;       /* For Suspend Resume */
68
 
69
    unsigned long HibResumeImageRBA;    /* RBA (512B blocks) of compressed OS
70
                                           memory image to be loaded by FW
71
                                           on Resume from hibernation */
72
    unsigned long HibResumeImageRBACount; /* Size of image in 512B blocks*/
73
    unsigned long Reserved;
74
  } RESUME_BLOCK;
75
 
76
typedef enum _OSAREA_USAGE {
77
  Empty = 0,
78
  Used = 1
79
  } OSAREA_USAGE;
80
 
81
typedef enum _PM_MODE {
82
  Suspend = 0x80,     /* Part of state is in memory */
83
  Hibernate = 0x40,   /* Nothing in memory - state saved elsewhere */
84
/* Revision 1: Normal added (actually was already here) */
85
  Normal = 0x00       /* No power management in effect */
86
  } PMMode;
87
 
88
typedef struct _HEADER {
89
  unsigned short Size;    /* NVRAM size in K(1024) */
90
  unsigned char Version;  /* Structure map different */
91
  unsigned char Revision; /* Structure map the same -
92
                             may be new values in old fields
93
                             in other words old code still works */
94
  unsigned short Crc1;    /* check sum from beginning of nvram to OSArea */
95
  unsigned short Crc2;    /* check sum of config */
96
  unsigned char LastOS;   /* OS_ID */
97
  unsigned char Endian;   /* B if big endian, L if little endian */
98
  unsigned char OSAreaUsage; /* OSAREA_USAGE */
99
  unsigned char PMMode;   /* Shutdown mode */
100
  RESUME_BLOCK ResumeBlock;
101
  SECURITY Security;
102
  ERROR_LOG ErrorLog[2];
103
 
104
/* Global Environment information */
105
  void * GEAddress;
106
  unsigned long GELength;
107
  /* Date&Time from RTC of last change to Global Environment */
108
  unsigned long GELastWriteDT[2];
109
 
110
/* Configuration information */
111
  void * ConfigAddress;
112
  unsigned long ConfigLength;
113
  /* Date&Time from RTC of last change to Configuration */
114
  unsigned long ConfigLastWriteDT[2];
115
  unsigned long ConfigCount; /* Count of entries in Configuration */
116
 
117
/* OS dependent temp area */
118
  void * OSAreaAddress;
119
  unsigned long OSAreaLength;
120
  /* Date&Time from RTC of last change to OSAreaArea */
121
  unsigned long OSAreaLastWriteDT[2];
122
 
123
/* Revision 1: add this mask - function tbd */
124
  /*unsigned short OSIRQMask;  OS to FW IRQ Mask - "I've used this one" */
125
  } HEADER, *PHEADER;
126
 
127
 #endif  /* ndef _NVRAM_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.