gng.h
4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/**************************************************************************
* *
* Copyright (C) 1995, 1996 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
*************************************************************************/
/*
* File: gng.h
* Creator: hal@sgi.com
* Purpose: Definitions for the go/no-go test program.
*
*/
#define STACKSIZE 0x2000
#define reserved_rdram 0xa0000300
#define PASS_MESSAGE_RETRACE_COUNT 0
/* Various frame and zbuffer hardcoded addresses for rdp/vi tests */
/* Make sure that you don't have anything at these addresses that */
/* are going to be clobbered when the rdp/vi tests are run if you */
/* need them later. */
#define L26V 0x80544800
#define L28V 0x80744800
#define L26R 0x80500000
#define H28R 0x80500000
#define LL24R 0x80396000 /*mini frame buffer (80x32) for rdp display*/
#define MEM_4M 0x400000
#define MEM_6M 0x600000
#define MEM_8M 0x800000
#define STATIC_SEGMENT1_DRAM_6M 0x80400000
#define STATIC_SEGMENT2_DRAM_8M 0x80700000
#define game_addr 0x8
#define game_offset 0x1000
#define game_size 0xfffff /* Real DMA size = game_size - 1 */
#define GNG_INHIBIT_PRINT 0x00000000
#define GNG_PASS_FAIL_BIT 0x00000001
#define GNG_NMI_TEST_BIT 0x00000002
#define GNG_FINAL_TEST_BIT 0x00000004
/* individual tests return number of failures */
#define GNG_TEST_SUCCESS 0
#define GNG_TEST_FAILURE 1
#define STATIC_SEGMENT 1
#define DYNAMIC_SEGMENT 2
#define TEXTURE_SEGMENT 3
#define CFB_SEGMENT 4
#define STATIC_SEGMENT1 5
#define STATIC_SEGMENT2 6
#define INT1_ADDR 0x1f000000
#define INT1_SET_DATA 0xffffffff
#define INT1_CLR_DATA 0x00000000
#define NTSC_USEC_PER_RETRACE 16667
#define NTSC_USEC_RANGE 100
#define PAL_USEC_PER_RETRACE 20000
#define PAL_USEC_RANGE 100
#define EXPANSION_MEM_BASE 0x80400000
/*
* the following ifdef is needed because this file is included by the spec file
* and by rdramTest.s
*/
#ifdef _LANGUAGE_C
#include "zaru.h"
#include "nowtime.h" /* sasano added */
#ifdef _FINALROM
/* cc will give warnings about argument mismatch in rom version */
#ifdef __sgi__
#define PRINTF(a)
#else
#define PRINTF
#endif
#else
#define PRINTF rmonPrintf
#endif
/* $BHo8!::J*%S%G%*J}<0$rH=JL$9$k0Y$K;HMQ$9$kNs5s@k8@(B */
enum VIDEO_SYSTEM{ PAL,
NTSC,
MPAL
};
/*
* The following structure exists in locore. Cleared on cold reset
* during osInitialize(). Untouched after NMI
*/
typedef struct {
u32 rdram_diag_status;
u32 rdram_diag_errors;
u32 nmi_count;
u32 nmi_first_timer;
u32 nmi_second_timer;
u32 testFailed; /* TRUE if any test FAILs */
u32 rdram_diag_sasano;
u32 rdram_diag_expect;
u32 rdram_diag_readdt;
} gngstatus;
void gng_report(char *message, int testStatus, int flags, int delay);
/* Global variables tests need */
extern int zaruexists;
extern int controllerSlot;
extern OSMesgQueue retraceMessageQ;
extern OSMesgQueue siMessageQ;
#endif
/*
* Provide offsets to the rdram_diag_status, rdram_diag_errors variables
* so that they can be accessed by the assembly code in rdramTest.s
*/
#define rdram_diag_status_offset 0x1c
#define rdram_diag_errors_offset 0x20
/*
#define rdram_diag_nmi_count 0x24
#define rdram_diag_nmi_first 0x28
#define rdram_diag_nmi_second 0x2c
#define rdram_diag_Failed 0x30
*/
#define rdram_diag_status_sasano 0x34
#define rdram_diag_status_expect 0x38
#define rdram_diag_status_readdt 0x3c