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:
parent
ae7e8a4660
commit
5d3149b69d
4 changed files with 2693 additions and 16 deletions
|
@ -7,10 +7,8 @@ INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
|
||||||
SOURDIR = ./
|
SOURDIR = ./
|
||||||
PALCODE = ../palcode
|
PALCODE = ../palcode
|
||||||
INCLUDEH = ../h
|
INCLUDEH = ../h
|
||||||
AS=alpha-elf-as
|
CC=gcc
|
||||||
CC=alpha-elf-gcc
|
AS=gas
|
||||||
CXX=alpha-elf-$(CXX)
|
|
||||||
|
|
||||||
|
|
||||||
dbmentry.o: dbmentry.s
|
dbmentry.o: dbmentry.s
|
||||||
$(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s
|
$(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s
|
||||||
|
@ -22,12 +20,12 @@ printf.o: printf.c
|
||||||
$(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
|
$(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
|
||||||
|
|
||||||
paljtokern.s.o: paljtokern.s
|
paljtokern.s.o: paljtokern.s
|
||||||
$(CXX) -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
|
g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
|
||||||
$(AS) -m 21164 -o paljtokern.s.o
|
gas -m 21164 -o paljtokern.s.o
|
||||||
|
|
||||||
paljtoslave.s.o: paljtoslave.s
|
paljtoslave.s.o: paljtoslave.s
|
||||||
$(CXX) -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
|
g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
|
||||||
$(AS) -m 21164 -o paljtoslave.s.o
|
gas -m 21164 -o paljtoslave.s.o
|
||||||
|
|
||||||
paljtokern.c: paljtokern.s.o
|
paljtokern.c: paljtokern.s.o
|
||||||
echo 'unsigned int palJToKern[] = {' > paljtokern.c
|
echo 'unsigned int palJToKern[] = {' > paljtokern.c
|
||||||
|
|
|
@ -27,7 +27,6 @@ typedef unsigned int uint32;
|
||||||
#include "rpb.h"
|
#include "rpb.h"
|
||||||
#include "cserve.h"
|
#include "cserve.h"
|
||||||
|
|
||||||
|
|
||||||
#define CONS_INT_TX 0x01 /* interrupt enable / state bits */
|
#define CONS_INT_TX 0x01 /* interrupt enable / state bits */
|
||||||
#define CONS_INT_RX 0x02
|
#define CONS_INT_RX 0x02
|
||||||
|
|
||||||
|
@ -206,8 +205,8 @@ struct rpb xxm_rpb = {
|
||||||
#if 0
|
#if 0
|
||||||
0x12, /* 050: system type - masquarade as some random 21064 */
|
0x12, /* 050: system type - masquarade as some random 21064 */
|
||||||
#endif
|
#endif
|
||||||
12, /* masquerade a DEC_3000_500 (bugnion) */
|
34, /* masquerade a Tsunami RGD */
|
||||||
(2<<1), /* 058: system variation */
|
(1<<10), /* 058: system variation */
|
||||||
'c'|('o'<<8)|('o'<<16)|('l'<< 24), /* 060: system revision */
|
'c'|('o'<<8)|('o'<<16)|('l'<< 24), /* 060: system revision */
|
||||||
1024*4096, /* 068: scaled interval clock intr freq OVERRIDEN*/
|
1024*4096, /* 068: scaled interval clock intr freq OVERRIDEN*/
|
||||||
0, /* 070: cycle counter frequency */
|
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)
|
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 0
|
||||||
if (first[FIRST(a1)]==0) {
|
if (first[FIRST(a1)]==0) {
|
||||||
|
|
|
@ -11,9 +11,10 @@ CFLAGS=-I . -E -P -D SIMOS -D BUILD_PALCODE -nostdinc -nostdinc++ -x c++
|
||||||
GASFLAGS=-m21164
|
GASFLAGS=-m21164
|
||||||
LDFLAGS=-Ttext 0x4000
|
LDFLAGS=-Ttext 0x4000
|
||||||
|
|
||||||
SOURCES=osfpal.s platform_tlaser.s
|
SOURCES=osfpal.s platform_tlaser.s platform_m5.s
|
||||||
PREPROC := $(SOURCES:.s=.i)
|
PREPROC := $(SOURCES:.s=.i)
|
||||||
OBJS := $(SOURCES:.s=.o)
|
TLOBJS = osfpal.o platform_tlaser.o
|
||||||
|
TSOBJS = osfpal.o platform_m5.o
|
||||||
|
|
||||||
%.i: %.s
|
%.i: %.s
|
||||||
$(CC) $(CFLAGS) $< > $@
|
$(CC) $(CFLAGS) $< > $@
|
||||||
|
@ -21,9 +22,14 @@ OBJS := $(SOURCES:.s=.o)
|
||||||
%.o: %.i
|
%.o: %.i
|
||||||
$(GAS) $(GASFLAGS) -o $@ $<
|
$(GAS) $(GASFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
all: tlaser tsunami
|
||||||
|
|
||||||
all: $(PREPROC) $(OBJS)
|
tlaser: $(PREPROC) $(TLOBJS)
|
||||||
$(LD) $(LDFLAGS) -o osfpal $(OBJS)
|
$(LD) $(LDFLAGS) -o tl_osfpal $(TLOBJS)
|
||||||
|
|
||||||
|
tsunami: $(PREPROC) $(TSOBJS)
|
||||||
|
$(LD) $(LDFLAGS) -o ts_osfpal $(TSOBJS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.i osfpal
|
rm -f *.o *.i osfpal
|
||||||
|
|
||||||
|
|
2658
system/alpha/palcode/platform_m5.s
Normal file
2658
system/alpha/palcode/platform_m5.s
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue