Deleted Added
sdiff udiff text old ( 7990:9ad86367e30d ) new ( 7999:9d6c5bc4e1f9 )
full compact
1
2
3/* ******************************************
4 * SimOS SRM Console
5 *
6 * Derived from Lance Berc's SRM console
7 * for the SRC XXMïż½Machine
8 * ******************************************/
9
10
11typedef unsigned long long uint64_t;
12typedef unsigned long long uint64;
13typedef unsigned int uint32_t;
14typedef unsigned int uint32;
15
16#define CONSOLE
17#include "alpha_access.h"
18
19#if 0
20#include "new_aouthdr.h"
21#include "srcmax.h"
22#endif
23
24/* from ../h */
25#include "lib.h"
26#include "rpb.h"
27#include "cserve.h"
28
29#define CONS_INT_TX 0x01 /* interrupt enable / state bits */
30#define CONS_INT_RX 0x02
31
32#define KSEG 0xfffffc0000000000
33#define K1BASE 0xfffffc8000000000
34#define KSEG_TO_PHYS(x)(((ul)x) & ~KSEG)
35
36#define ALPHA_ACCESS_BASE 0xfffffc8000a00000
37
38
39#define PHYS_TO_K1(_x) (K1BASE|(_x))
40
41#define AOUT_LOAD_ADDR (KSEG|0xf000)
42
43#define ROUNDUP8(x) ((ul)(((ul)x)+7) & ~7)
44#define ROUNDUP128(x) ((ul)(((ul)x)+127) & ~127)

--- 66 unchanged lines hidden (view full) ---

111{
112#if 0
113 CDR->intr_status =(DevRegister)(DEV_CNSLE_RX_INTR |DEV_CNSLE_TX_INTR);
114#endif
115}
116
117char GetChar()
118{
119 struct AlphaAccess *k1Conf = (struct AlphaAccess *)(ALPHA_ACCESS_BASE);
120 return k1Conf->inputChar;
121}
122
123void PutChar(char c)
124{
125#if 0
126 CDR->data = c;
127#endif
128#if 0
129 *(int*) PHYS_TO_K1(SLOT_D_COM1<<5) = c;
130#endif
131 struct AlphaAccess *k1Conf = (struct AlphaAccess *)(ALPHA_ACCESS_BASE);
132 k1Conf->outputChar = c;
133
134}
135
136
137int
138passArgs(int argc)
139{ return 0; }
140
141int
142main(int argc, char **argv)
143{
144 int x,i;
145 struct AlphaAccess *k1Conf = (struct AlphaAccess *)(ALPHA_ACCESS_BASE);
146 ui *k1ptr,*ksegptr;
147
148
149 InitConsole();
150 printf("SimOS console \n");
151 /*
152 * get configuration from backdoor
153 */

--- 667 unchanged lines hidden (view full) ---

821 /*
822 * MP bootstrap
823 */
824
825 {
826 int i;
827 for (i=1;i<simosConf.numCPUs;i++) {
828 volatile struct AlphaAccess *k1Conf = (volatile struct AlphaAccess *)
829 (ALPHA_ACCESS_BASE);
830 SpinLock(&theLock);
831 printf("Bootstraping CPU %d with sp=0x%x \n",
832 i,bootStrapImpure[i]);
833 SpinUnlock(&theLock);
834 k1Conf->bootStrapImpure = bootStrapImpure[i];
835 k1Conf->bootStrapCPU = i;
836 }
837 }

--- 125 unchanged lines hidden (view full) ---

963} deviceState[32];
964
965#define BOOTDEVICE_NAME "SCSI 1 0 0 1 100 0"
966
967void
968DeviceOperation(long op, long channel, long count, long address, long block)
969{
970 struct AlphaAccess *k1Conf = (struct AlphaAccess *)
971 (ALPHA_ACCESS_BASE);
972
973 long pAddr;
974
975#if 0
976 printf("Console::DeviceRead count=0x%x address=0x%x block=0x%x\n",
977 count,address,block);
978#endif
979

--- 295 unchanged lines hidden ---