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
This commit is contained in:
Ali Saidi 2004-02-02 17:40:11 -05:00
parent ae7e8a4660
commit 5d3149b69d
4 changed files with 2693 additions and 16 deletions

View file

@ -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

View file

@ -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) {

View file

@ -11,9 +11,10 @@ CFLAGS=-I . -E -P -D SIMOS -D BUILD_PALCODE -nostdinc -nostdinc++ -x c++
GASFLAGS=-m21164
LDFLAGS=-Ttext 0x4000
SOURCES=osfpal.s platform_tlaser.s
SOURCES=osfpal.s platform_tlaser.s platform_m5.s
PREPROC := $(SOURCES:.s=.i)
OBJS := $(SOURCES:.s=.o)
TLOBJS = osfpal.o platform_tlaser.o
TSOBJS = osfpal.o platform_m5.o
%.i: %.s
$(CC) $(CFLAGS) $< > $@
@ -21,9 +22,14 @@ OBJS := $(SOURCES:.s=.o)
%.o: %.i
$(GAS) $(GASFLAGS) -o $@ $<
all: tlaser tsunami
tlaser: $(PREPROC) $(TLOBJS)
$(LD) $(LDFLAGS) -o tl_osfpal $(TLOBJS)
all: $(PREPROC) $(OBJS)
$(LD) $(LDFLAGS) -o osfpal $(OBJS)
tsunami: $(PREPROC) $(TSOBJS)
$(LD) $(LDFLAGS) -o ts_osfpal $(TSOBJS)
clean:
rm -f *.o *.i osfpal

File diff suppressed because it is too large Load diff