console.c (7983:fffe5c0f6707) | console.c (7985:3e932649220c) |
---|---|
1 2 3/* ****************************************** 4 * SimOS SRM Console 5 * 6 * Derived from Lance Berc's SRM console 7 * for the SRC XXM�Machine 8 * ******************************************/ --- 13 unchanged lines hidden (view full) --- 22#include "srcmax.h" 23#endif 24 25/* from ../h */ 26#include "lib.h" 27#include "rpb.h" 28#include "cserve.h" 29 | 1 2 3/* ****************************************** 4 * SimOS SRM Console 5 * 6 * Derived from Lance Berc's SRM console 7 * for the SRC XXM�Machine 8 * ******************************************/ --- 13 unchanged lines hidden (view full) --- 22#include "srcmax.h" 23#endif 24 25/* from ../h */ 26#include "lib.h" 27#include "rpb.h" 28#include "cserve.h" 29 |
30 | |
31#define CONS_INT_TX 0x01 /* interrupt enable / state bits */ 32#define CONS_INT_RX 0x02 33 34#define KSEG 0xfffffc0000000000 35#define K1BASE 0xfffffc8000000000 36#define KSEG_TO_PHYS(x)(((ul)x) & ~KSEG) 37 38#define CDR ((volatile DevConsoleRegisters *) \ --- 162 unchanged lines hidden (view full) --- 201 that we're an Avanti, which is similar enough. 202 */ 203 31, /* 050: system type - XXM is now in the Alpha SRM */ 204 (1 << 10) | (2<<1),/* 058: system variation - XXM w/EV5 & embeded console */ 205#endif 206#if 0 207 0x12, /* 050: system type - masquarade as some random 21064 */ 208#endif | 30#define CONS_INT_TX 0x01 /* interrupt enable / state bits */ 31#define CONS_INT_RX 0x02 32 33#define KSEG 0xfffffc0000000000 34#define K1BASE 0xfffffc8000000000 35#define KSEG_TO_PHYS(x)(((ul)x) & ~KSEG) 36 37#define CDR ((volatile DevConsoleRegisters *) \ --- 162 unchanged lines hidden (view full) --- 200 that we're an Avanti, which is similar enough. 201 */ 202 31, /* 050: system type - XXM is now in the Alpha SRM */ 203 (1 << 10) | (2<<1),/* 058: system variation - XXM w/EV5 & embeded console */ 204#endif 205#if 0 206 0x12, /* 050: system type - masquarade as some random 21064 */ 207#endif |
209 12, /* masquerade a DEC_3000_500 (bugnion) */ 210 (2<<1), /* 058: system variation */ | 208 34, /* masquerade a Tsunami RGD */ 209 (1<<10), /* 058: system variation */ |
211 'c'|('o'<<8)|('o'<<16)|('l'<< 24), /* 060: system revision */ 212 1024*4096, /* 068: scaled interval clock intr freq OVERRIDEN*/ 213 0, /* 070: cycle counter frequency */ 214 0x200000000, /* 078: virtual page table base */ 215 0, /* 080: reserved */ 216 0, /* 088: offset to translation buffer hint */ 217 1, /* 090: number of processor slots OVERRIDDEN*/ 218 sizeof(struct rpb_percpu), /* 098: per-cpu slot size. OVERRIDDEN */ --- 960 unchanged lines hidden (view full) --- 1179 panic("cher (%x,%x,%x,%x)\n", a0, a1, a2, a3); 1180 } 1181 1182 return 0; 1183} 1184 1185long CallBackFixup(int a0, int a1, int a2) 1186{ | 210 'c'|('o'<<8)|('o'<<16)|('l'<< 24), /* 060: system revision */ 211 1024*4096, /* 068: scaled interval clock intr freq OVERRIDEN*/ 212 0, /* 070: cycle counter frequency */ 213 0x200000000, /* 078: virtual page table base */ 214 0, /* 080: reserved */ 215 0, /* 088: offset to translation buffer hint */ 216 1, /* 090: number of processor slots OVERRIDDEN*/ 217 sizeof(struct rpb_percpu), /* 098: per-cpu slot size. OVERRIDDEN */ --- 960 unchanged lines hidden (view full) --- 1178 panic("cher (%x,%x,%x,%x)\n", a0, a1, a2, a3); 1179 } 1180 1181 return 0; 1182} 1183 1184long CallBackFixup(int a0, int a1, int a2) 1185{ |
1187 printf("CallbackFixup %x %x \n",a0,a1); | 1186 long temp; 1187 /* Linux uses r8 for the current pointer (pointer to data structure 1188 contating info about currently running process). It is set when the 1189 kernel starts and is expected to remain there... Problem is that the 1190 unlike the kernel, the console does not prevent the assembler from 1191 using r8. So here is a work around. So far this has only been a problem 1192 in CallBackFixup() but any other call back functions could cause a problem 1193 at some point */ |
1188 | 1194 |
1195 /* save off the current pointer to a temp variable */ 1196 asm("bis $8, $31, %0" : "=r" (temp)); 1197 1198 /* call original code */ 1199 printf("CallbackFixup %x %x, t7=%x\n",a0,a1,temp); 1200 1201 /* restore the current pointer */ 1202 asm("bis %0, $31, $8" : : "r" (temp) : "$8"); 1203 |
|
1189#if 0 1190 if (first[FIRST(a1)]==0) { 1191 first[FIRST(a1)] = KPTE(PFN(reservedFixup)); 1192 } else { 1193 panic("CallBakcfixup\n"); 1194 } 1195 second[SECOND(a1)] = KPTE(PFN(third_rpb)); /* Region 0 */ 1196 printf("Fixup: FISRT(a1)=0x%x SECOND(a1)=0x%x THIRD(a1)=0x%x\n", --- 65 unchanged lines hidden --- | 1204#if 0 1205 if (first[FIRST(a1)]==0) { 1206 first[FIRST(a1)] = KPTE(PFN(reservedFixup)); 1207 } else { 1208 panic("CallBakcfixup\n"); 1209 } 1210 second[SECOND(a1)] = KPTE(PFN(third_rpb)); /* Region 0 */ 1211 printf("Fixup: FISRT(a1)=0x%x SECOND(a1)=0x%x THIRD(a1)=0x%x\n", --- 65 unchanged lines hidden --- |