diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2004-02-02 17:40:11 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2004-02-02 17:40:11 -0500 |
commit | 5d3149b69d42b28fef51d9137528937ba2c49141 (patch) | |
tree | 3e4d0e3e410aeae665b8f9318cf7d0119ccd438f /system/alpha/console | |
parent | ae7e8a46608572fcfc00241084cc215aa5bb9150 (diff) | |
download | gem5-5d3149b69d42b28fef51d9137528937ba2c49141.tar.xz |
Added platfrom_m5 - Our hacked up tsunami palcode and modified palcode
makefile to that end. Additionally made a change in console to
preserve t7 on call back because linux uses it for the "current"
pointer.
console/Makefile:
Changed makefile back to using gcc and gas rather then trying to
cross-compile for now
console/console.c:
Put code in to save t7 on CallBackFixup() call and changed the
system type to Tsunami
palcode/Makefile:
updated palcode makefile to have targets for tlaser and tsunami
Diffstat (limited to 'system/alpha/console')
-rw-r--r-- | system/alpha/console/Makefile | 14 | ||||
-rw-r--r-- | system/alpha/console/console.c | 23 |
2 files changed, 25 insertions, 12 deletions
diff --git a/system/alpha/console/Makefile b/system/alpha/console/Makefile index 48a6288a3..5905fa9d2 100644 --- a/system/alpha/console/Makefile +++ b/system/alpha/console/Makefile @@ -7,10 +7,8 @@ INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev SOURDIR = ./ PALCODE = ../palcode INCLUDEH = ../h -AS=alpha-elf-as -CC=alpha-elf-gcc -CXX=alpha-elf-$(CXX) - +CC=gcc +AS=gas dbmentry.o: dbmentry.s $(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s @@ -22,12 +20,12 @@ printf.o: printf.c $(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c paljtokern.s.o: paljtokern.s - $(CXX) -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \ - $(AS) -m 21164 -o paljtokern.s.o + g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \ + gas -m 21164 -o paljtokern.s.o paljtoslave.s.o: paljtoslave.s - $(CXX) -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \ - $(AS) -m 21164 -o paljtoslave.s.o + g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \ + gas -m 21164 -o paljtoslave.s.o paljtokern.c: paljtokern.s.o echo 'unsigned int palJToKern[] = {' > paljtokern.c diff --git a/system/alpha/console/console.c b/system/alpha/console/console.c index 0697be63a..844cb4ddc 100644 --- a/system/alpha/console/console.c +++ b/system/alpha/console/console.c @@ -27,7 +27,6 @@ typedef unsigned int uint32; #include "rpb.h" #include "cserve.h" - #define CONS_INT_TX 0x01 /* interrupt enable / state bits */ #define CONS_INT_RX 0x02 @@ -206,8 +205,8 @@ struct rpb xxm_rpb = { #if 0 0x12, /* 050: system type - masquarade as some random 21064 */ #endif - 12, /* masquerade a DEC_3000_500 (bugnion) */ - (2<<1), /* 058: system variation */ + 34, /* masquerade a Tsunami RGD */ + (1<<10), /* 058: system variation */ 'c'|('o'<<8)|('o'<<16)|('l'<< 24), /* 060: system revision */ 1024*4096, /* 068: scaled interval clock intr freq OVERRIDEN*/ 0, /* 070: cycle counter frequency */ @@ -1184,7 +1183,23 @@ CallBackDispatcher(long a0, long a1, long a2, long a3, long a4) long CallBackFixup(int a0, int a1, int a2) { - printf("CallbackFixup %x %x \n",a0,a1); + long temp; + /* Linux uses r8 for the current pointer (pointer to data structure + contating info about currently running process). It is set when the + kernel starts and is expected to remain there... Problem is that the + unlike the kernel, the console does not prevent the assembler from + using r8. So here is a work around. So far this has only been a problem + in CallBackFixup() but any other call back functions could cause a problem + at some point */ + + /* save off the current pointer to a temp variable */ + asm("bis $8, $31, %0" : "=r" (temp)); + + /* call original code */ + printf("CallbackFixup %x %x, t7=%x\n",a0,a1,temp); + + /* restore the current pointer */ + asm("bis %0, $31, $8" : : "r" (temp) : "$8"); #if 0 if (first[FIRST(a1)]==0) { |