Subversion Repositories HelenOS

Rev

Rev 1787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1787 Rev 1888
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
 /** @addtogroup mips32
29
/** @addtogroup mips32 
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
35
#ifndef __mips32_ARC_H__
35
#ifndef KERN_mips32_ARC_H_
36
#define __mips32_ARC_H__
36
#define KERN_mips32_ARC_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
39
#include <console/chardev.h>
39
#include <console/chardev.h>
40
 
40
 
41
#define ARC_BASE_ADDR 0x1000;
41
#define ARC_BASE_ADDR 0x1000;
Line 51... Line 51...
51
    CmResourceTypeDma,
51
    CmResourceTypeDma,
52
    CmResourceTypeDeviceSpecific,
52
    CmResourceTypeDeviceSpecific,
53
    CmResourceTypeVendor,
53
    CmResourceTypeVendor,
54
    CmResourceTypeProductName,
54
    CmResourceTypeProductName,
55
    CmResourceTypeSerialNumber
55
    CmResourceTypeSerialNumber
56
}cm_resource_type;
56
} cm_resource_type;
57
 
57
 
58
typedef struct {
58
typedef struct {
59
    uint8_t type;
59
    uint8_t type;
60
    uint8_t sharedisposition;
60
    uint8_t sharedisposition;
61
    uint16_t flags;
61
    uint16_t flags;
Line 72... Line 72...
72
        struct {
72
        struct {
73
            long long start; /* 64-bit phys address */
73
            long long start; /* 64-bit phys address */
74
            unsigned long length;
74
            unsigned long length;
75
        }memory;
75
        }memory;
76
    }u;
76
    }u;
77
}__attribute__ ((packed)) cm_resource_descriptor;
77
} __attribute__ ((packed)) cm_resource_descriptor;
78
 
78
 
79
typedef struct {
79
typedef struct {
80
    uint16_t version;
80
    uint16_t version;
81
    uint16_t revision;
81
    uint16_t revision;
82
    unsigned long count;
82
    unsigned long count;
83
    cm_resource_descriptor descr[1];
83
    cm_resource_descriptor descr[1];
84
}__attribute__ ((packed)) cm_resource_list;
84
} __attribute__ ((packed)) cm_resource_list;
85
 
85
 
86
typedef enum {
86
typedef enum {
87
    SystemClass = 0,
87
    SystemClass = 0,
88
    ProcessorClass,
88
    ProcessorClass,
89
    CacheClass,
89
    CacheClass,
Line 135... Line 135...
135
    XTalkAdapter,
135
    XTalkAdapter,
136
    PCIAdapter,
136
    PCIAdapter,
137
    GIOAdapter,
137
    GIOAdapter,
138
    TPUAdapter,
138
    TPUAdapter,
139
    Anonymous
139
    Anonymous
140
}arc_component_type;
140
} arc_component_type;
141
 
141
 
142
typedef enum {
142
typedef enum {
143
    Failed = 1,
143
    Failed = 1,
144
    ReadOnly = 2,
144
    ReadOnly = 2,
145
    Removable = 4,
145
    Removable = 4,
146
    ConsoleIn = 8,
146
    ConsoleIn = 8,
147
    ConsoleOut = 16,
147
    ConsoleOut = 16,
148
    Input = 32,
148
    Input = 32,
149
    Output = 64
149
    Output = 64
150
}arc_component_flags;
150
} arc_component_flags;
151
 
151
 
152
typedef struct  {
152
typedef struct  {
153
    arc_component_class class;
153
    arc_component_class class;
154
    arc_component_type type;
154
    arc_component_type type;
155
    arc_component_flags flags;
155
    arc_component_flags flags;
Line 180... Line 180...
180
    FreeMemory,
180
    FreeMemory,
181
    BadMemory,
181
    BadMemory,
182
    LoadedProgram,
182
    LoadedProgram,
183
    FirmwareTemporary,
183
    FirmwareTemporary,
184
    FirmwarePermanent
184
    FirmwarePermanent
185
}arc_memorytype_t;
185
} arc_memorytype_t;
186
 
186
 
187
typedef struct  {
187
typedef struct  {
188
    arc_memorytype_t type;
188
    arc_memorytype_t type;
189
    uint32_t basepage;  /* *4096 = baseaddr */
189
    uint32_t basepage;  /* *4096 = baseaddr */
190
    uint32_t basecount;
190
    uint32_t basecount;
191
}arc_memdescriptor_t;
191
} arc_memdescriptor_t;
192
 
192
 
193
typedef struct {
193
typedef struct {
194
    char vendorid[8];
194
    char vendorid[8];
195
    char prodid[8];
195
    char prodid[8];
196
}arc_sysid_t;
196
} arc_sysid_t;
197
 
197
 
198
typedef struct {
198
typedef struct {
199
    long (*load)(void); /* ... */
199
    long (*load)(void); /* ... */
200
    long (*invoke)(uint32_t eaddr,uint32_t saddr,uint32_t argc,char **argv,
200
    long (*invoke)(uint32_t eaddr,uint32_t saddr,uint32_t argc,char **argv,
201
               char **envp);
201
               char **envp);
Line 252... Line 252...
252
    uint32_t firmwarevectorlen;
252
    uint32_t firmwarevectorlen;
253
    arc_func_vector_t *firmwarevector;
253
    arc_func_vector_t *firmwarevector;
254
    uint32_t privvectorlen;
254
    uint32_t privvectorlen;
255
    void *privvector;
255
    void *privvector;
256
    uint32_t adaptercount;
256
    uint32_t adaptercount;
257
}__attribute__ ((packed)) arc_sbp;
257
} __attribute__ ((packed)) arc_sbp;
258
 
258
 
259
extern int arc_init(void);
259
extern int arc_init(void);
260
extern int arc_enabled(void);
260
extern int arc_enabled(void);
261
void arc_frame_init(void);
261
void arc_frame_init(void);
262
void arc_console(void);
262
void arc_console(void);
263
 
263
 
264
#endif
264
#endif
265
 
265
 
266
 /** @}
266
 /** @}
267
 */
267
 */
268
 
-