changeset 013cbe16f1d6 in /z/repo/m5 details: http://repo.m5sim.org/m5?cmd=changeset;node=013cbe16f1d6 description: cleanup makefile and fix platform bug introduced in last commit
palcode/Makefile: Cleanup make file, no more ugly preprocessing steps palcode/platform_m5.S: fix a mistake with m5 platform cleanup from before diffstat: system/alpha/palcode/Makefile | 32 +- system/alpha/palcode/osfpal.S | 5242 +++++++++++++++++++ system/alpha/palcode/osfpal.s | 5242 ------------------- system/alpha/palcode/osfpal_cache_copy.S | 5257 ++++++++++++++++++++ system/alpha/palcode/osfpal_cache_copy.s | 5257 -------------------- system/alpha/palcode/osfpal_cache_copy_unaligned.S | 5253 +++++++++++++++++++ system/alpha/palcode/osfpal_cache_copy_unaligned.s | 5253 ------------------- system/alpha/palcode/platform_m5.S | 2726 ++++++++++ system/alpha/palcode/platform_m5.s | 2726 ---------- system/alpha/palcode/platform_tlaser.S | 2821 ++++++++++ system/alpha/palcode/platform_tlaser.s | 2821 ---------- 11 files changed, 21313 insertions(+), 21317 deletions(-) diffs (truncated from 42696 to 300 lines): diff -r 2e7177da9ea5 -r 013cbe16f1d6 system/alpha/palcode/Makefile --- a/system/alpha/palcode/Makefile Tue Nov 23 02:01:30 2004 -0500 +++ b/system/alpha/palcode/Makefile Tue Nov 23 03:20:27 2004 -0500 @@ -1,40 +1,36 @@ #Makefile for palcode #Works on alpha-linux and builds elf executable -#19 December 2003 - Ali Saidi - GAS = alpha-elf-as CC = alpha-elf-g++ LD = alpha-elf-ld -#CFLAGS=-I ../h -E -P -D SIMOS -nostdinc -nostdinc++ -x c++ -CFLAGS=-I . -I ../h -E -P -D SIMOS -D BUILD_PALCODE -nostdinc -nostdinc++ -x c++ -GASFLAGS=-m21164 +CFLAGS=-I . -I ../h -D SIMOS -D BUILD_PALCODE -nostdinc -nostdinc++ -Wa,-m21164 LDFLAGS=-Ttext 0x4000 -SOURCES=osfpal.s osfpal_cache_copy.s osfpal_cache_copy_unaligned.s platform_tlaser.s \ - platform_m5.s -PREPROC := $(SOURCES:.s=.i) -TLOBJS = osfpal.o osfpal_cache_copy.o osfpal_cache_copy_unaligned.o platform_tlaser.o -TSOBJS = osfpal.o osfpal_cache_copy.o osfpal_cache_copy_unaligned.o platform_m5.o +TLOBJS = osfpal.o platform_tlaser.o +TLOBJS_COPY = osfpal_cache_copy.o osfpal_cache_copy_unaligned.o +TSOBJS = osfpal.o platform_m5.o +TSOBJS_COPY = osfpal_cache_copy.o osfpal_cache_copy_unaligned.o -%.i: %.s - $(CC) $(CFLAGS) $< > $@ - -%.o: %.i - $(GAS) $(GASFLAGS) -o $@ $< +%.o: %.S + $(CC) $(CFLAGS) -o $@ -c $< all: tlaser tsunami -tlaser: $(PREPROC) $(TLOBJS) +tlaser: $(TLOBJS) $(LD) $(LDFLAGS) -o tl_osfpal osfpal.o platform_tlaser.o + +tlaser_copy: $(TLOBJS_COPY) $(TLOBJS) $(LD) $(LDFLAGS) -o tl_osfpal_cache osfpal_cache_copy.o platform_tlaser.o $(LD) $(LDFLAGS) -o tl_osfpal_unalign osfpal_cache_copy_unaligned.o platform_tlaser.o -tsunami: $(PREPROC) $(TSOBJS) +tsunami: $(TSOBJS) $(LD) $(LDFLAGS) -o ts_osfpal osfpal.o platform_m5.o + +tsunami_copy: $(TSOBJS) $(TSOBJS_COPY) $(LD) $(LDFLAGS) -o ts_osfpal_cache osfpal_cache_copy.o platform_m5.o $(LD) $(LDFLAGS) -o ts_osfpal_unalign osfpal_cache_copy_unaligned.o platform_m5.o clean: - rm -f *.o *.i tl_osfpal tl_osfpal_cache tl_osfpal_unalign ts_osfpal \ + rm -f *.o tl_osfpal tl_osfpal_cache tl_osfpal_unalign ts_osfpal \ ts_osfpal_cache ts_osfpal_unalign diff -r 2e7177da9ea5 -r 013cbe16f1d6 system/alpha/palcode/osfpal.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/system/alpha/palcode/osfpal.S Tue Nov 23 03:20:27 2004 -0500 @@ -0,0 +1,5242 @@ +// modified to use the Hudson style "impure.h" instead of ev5_impure.sdl +// since we don't have a mechanism to expand the data structures.... pb Nov/95 + +// build_fixed_image: not sure what means +// real_mm to be replaced during rewrite +// remove_save_state remove_restore_state can be remooved to save space ?? + + +#include "ev5_defs.h" +#include "ev5_impure.h" +#include "ev5_alpha_defs.h" +#include "ev5_paldef.h" +#include "ev5_osfalpha_defs.h" +#include "fromHudsonMacros.h" +#include "fromHudsonOsf.h" +#include "dc21164FromGasSources.h" + +#ifdef SIMOS +#define DEBUGSTORE(c) nop +#else +#define DEBUGSTORE(c) \ + lda r13, c(zero) ; \ + bsr r25, debugstore +#endif + +#define DEBUG_EXC_ADDR()\ + bsr r25, put_exc_addr; \ + DEBUGSTORE(13) ; \ + DEBUGSTORE(10) + +#define egore 0 +#define acore 0 +#define beh_model 0 +#define ev5_p2 1 +#define ev5_p1 0 +#define ldvpte_bug_fix 1 +#define osf_chm_fix 0 + +// Do we want to do this?? pb +#define spe_fix 0 +// Do we want to do this?? pb +#define build_fixed_image 0 + +#define ev5_pass2 +#define enable_p4_fixups 0 +#define osf_svmin 1 +#define enable_physical_console 0 +#define fill_err_hack 0 +#define icflush_on_tbix 0 +#define max_cpuid 1 +#define perfmon_debug 0 +#define rawhide_system 0 +#define rax_mode 0 + + +// This is the fix for the user-mode super page references causing the machine to crash. +#if (spe_fix == 1) && (build_fixed_image==1) +#define hw_rei_spe br r31, hw_rei_update_spe +#else +#define hw_rei_spe hw_rei +#endif + + +// redefine a few of the distribution-code names to match the Hudson gas names. +// opcodes +#define ldqp ldq_p +#define stqp stq_p +#define ldlp ldl_p +#define stlp stl_p + +#define r0 $0 +#define r1 $1 +#define r2 $2 +#define r3 $3 +#define r4 $4 +#define r5 $5 +#define r6 $6 +#define r7 $7 +#define r8 $8 +#define r9 $9 +#define r10 $10 +#define r11 $11 +#define r12 $12 +#define r13 $13 +#define r14 $14 +#define r15 $15 +#define r16 $16 +#define r17 $17 +#define r18 $18 +#define r19 $19 +#define r20 $20 +#define r21 $21 +#define r22 $22 +#define r23 $23 +#define r24 $24 +#define r25 $25 +#define r26 $26 +#define r27 $27 +#define r28 $28 +#define r29 $29 +#define r30 $30 +#define r31 $31 + +// .title "EV5 OSF PAL" +// .ident "V1.18" +// +//**************************************************************************** +//* * +//* Copyright (c) 1992, 1993, 1994, 1995 * +//* by DIGITAL Equipment Corporation, Maynard, Mass. * +//* * +//* This software is furnished under a license and may be used and copied * +//* only in accordance with the terms of such license and with the * +//* inclusion of the above copyright notice. This software or any other * +//* copies thereof may not be provided or otherwise made available to any * +//* other person. No title to and ownership of the software is hereby * +//* transferred. * +//* * +//* The information in this software is subject to change without notice * +//* and should not be construed as a commitment by DIGITAL Equipment * +//* Corporation. * +//* * +//* DIGITAL assumes no responsibility for the use or reliability of its * +//* software on equipment which is not supplied by DIGITAL. * +//* * +//**************************************************************************** + +// .sbttl "Edit History" +//+ +// Who Rev When What +// ------------ --- ----------- -------------------------------- +// DB 0.0 03-Nov-1992 Start +// DB 0.1 28-Dec-1992 add swpctx +// DB 0.2 05-Jan-1993 Bug: PVC found mtpr dtb_CM -> virt ref bug +// DB 0.3 11-Jan-1993 rearrange trap entry points +// DB 0.4 01-Feb-1993 add tbi +// DB 0.5 04-Feb-1993 real MM, kludge reset flow, kludge swppal +// DB 0.6 09-Feb-1993 Bug: several stack pushers used r16 for pc (should be r14) +// DB 0.7 10-Feb-1993 Bug: pushed wrong PC (+8) on CALL_PAL OPCDEC +// Bug: typo on register number for store in wrunique +// Bug: rti to kern uses r16 as scratch +// Bug: callsys saving wrong value in pt_usp +// DB 0.8 16-Feb-1993 PVC: fix possible pt write->read bug in wrkgp, wrusp +// DB 0.9 18-Feb-1993 Bug: invalid_dpte_handler shifted pte twice +// Bug: rti stl_c could corrupt the stack +// Bug: unaligned returning wrong value in r17 (or should be and) +// DB 0.10 19-Feb-1993 Add draina, rd/wrmces, cflush, cserve, interrupt +// DB 0.11 23-Feb-1993 Turn caches on in reset flow +// DB 0.12 10-Mar-1993 Bug: wrong value for icsr for FEN in kern mode flow +// DB 0.13 15-Mar-1993 Bug: wrong value pushed for PC in invalid_dpte_handler if stack push tbmisses +// DB 0.14 23-Mar-1993 Add impure pointer paltemp, reshuffle some other paltemps to match VMS +// DB 0.15 15-Apr-1993 Combine paltemps for WHAMI and MCES +// DB 0.16 12-May-1993 Update reset +// New restriction: no mfpr exc_addr in cycle 1 of call_pal flows +// Bug: in wrmces, not clearing DPC, DSC +// Update swppal +// Add pal bugchecks, pal_save_state, pal_restore_state +// DB 0.17 24-May-1993 Add dfault_in_pal flow; fixup stack builder to have common state for pc/ps. +// New restriction: No hw_rei_stall in 0,1,2 after mtpr itb_asn +// DB 0.18 26-May-1993 PVC fixes +// JM 0.19 01-jul-1993 Bug: OSFPAL_CALPAL_OPCDEC, TRAP_OPCDEC -- move mt exc_addr after stores +// JM 0.20 07-jul-1993 Update cns_ and mchk_ names for impure.mar conversion to .sdl +// Bug: exc_addr was being loaded before stores that could dtb_miss in the following +// routines: TRAP_FEN,FEN_TO_OPCDEC,CALL_PAL_CALLSYS,RTI_TO_KERN +// JM 0.21 26-jul-1993 Bug: move exc_addr load after ALL stores in the following routines: +// TRAP_IACCVIO::,TRAP_OPCDEC::,TRAP_ARITH::,TRAP_FEN:: +// dfault_trap_cont:,fen_to_opcdec:,invalid_dpte_handler: +// osfpal_calpal_opcdec:,CALL_PAL_callsys::,TRAP_UNALIGN:: +// Bugs from PVC: trap_unalign - mt pt0 ->mf pt0 within 2 cycles +// JM 0.22 28-jul-1993 Add WRIPIR instruction +// JM 0.23 05-aug-1993 Bump version number for release +// JM 0.24 11-aug-1993 Bug: call_pal_swpipl - palshadow write -> hw_rei violation +// JM 0.25 09-sep-1993 Disable certain "hidden" pvc checks in call_pals; +// New restriction: No hw_rei_stall in 0,1,2,3,4 after mtpr itb_asn - affects HALT(raxmode), +// and SWPCTX +// JM 0.26 07-oct-1993 Re-implement pal_version +// JM 0.27 12-oct-1993 One more time: change pal_version format to conform to SRM +// JM 0.28 14-oct-1993 Change ic_flush routine to pal_ic_flush +// JM 0.29 19-oct-1993 BUG(?): dfault_in_pal: use exc_addr to check for dtbmiss,itbmiss check instead +// of mm_stat<opcode>. mm_stat contains original opcode, not hw_ld. +// JM 0.30 28-oct-1993 BUG: PVC violation - mf exc_addr in first cycles of call_pal in rti,retsys +// JM 0.31 15-nov-1993 BUG: WRFEN trashing r0 +// JM 0.32 21-nov-1993 BUG: dtb_ldq,itb_ldq (used in dfault_in_pal) not defined when real_mm=0 +// JM 0.33 24-nov-1993 save/restore_state - +// BUG: use ivptbr to restore mvptbr +// BUG: adjust hw_ld/st base/offsets to accomodate 10-bit offset limit +// CHANGE: Load 2 pages into dtb to accomodate compressed logout area/multiprocessors +// JM 0.34 20-dec-1993 BUG: set r11<mode> to kernel for ksnv halt case +// BUG: generate ksnv halt when tb miss on kernel stack accesses +// save exc_addr in r14 for invalid_dpte stack builder +// JM 0.35 30-dec-1993 BUG: PVC violation in trap_arith - mt exc_sum in shadow of store with mf exc_mask in +// the same shadow +// JM 0.36 6-jan-1994 BUG: fen_to_opcdec - savePC should be PC+4, need to save old PS, update new PS +// New palcode restiction: mt icsr<fpe,hwe> --> 3 bubbles to hw_rei --affects wrfen +// JM 0.37 25-jan-1994 BUG: PVC violations in restore_state - mt dc_mode/maf_mode ->mbox instructions +// Hide impure area manipulations in macros +// BUG: PVC violation in save and restore state-- move mt icsr out of shadow of ld/st +// Add some pvc_violate statements +// JM 0.38 1-feb-1994 Changes to save_state: save pt1; don't save r31,f31; update comments to reflect reality; +// Changes to restore_state: restore pt1, icsr; don't restore r31,f31; update comments +// Add code to ensure fen bit set in icsr before ldt +// conditionally compile rax_more_reset out. +// move ldqp,stqp macro definitions to ev5_pal_macros.mar and add .mcall's for them here +// move rax reset stuff to ev5_osf_system_pal.m64 +// JM 0.39 7-feb-1994 Move impure pointer to pal scratch space. Use former pt_impure for bc_ctl shadow +// and performance monitoring bits +// Change to save_state routine to save more iprs. +// JM 0.40 19-feb-1994 Change algorithm in save/restore_state routines; add f31,r31 back in +// JM 0.41 21-feb-1994 Add flags to compile out save/restore state (not needed in some systems) +// remove_save_state,remove_restore_state;fix new pvc violation in save_state +// JM 0.42 22-feb-1994 BUG: save_state overwriting r3 +// JM 0.43 24-feb-1994 BUG: save_state saving wrong icsr +// JM 0.44 28-feb-1994 Remove ic_flush from wr_tbix instructions +// JM 0.45 15-mar-1994 BUG: call_pal_tbi trashes a0 prior to range check (instruction order problem) +// New pal restriction in pal_restore_state: icsr<fpe>->floating instr = 3 bubbles +// Add exc_sum and exc_mask to pal_save_state (not restore) +// JM 0.46 22-apr-1994 Move impure pointer back into paltemp; Move bc_ctl shadow and pmctr_ctl into impure +// area. +// Add performance counter support to swpctx and wrperfmon +// JM 0.47 9-may-1994 Bump version # (for ev5_osf_system_pal.m64 sys_perfmon fix) +// JM 0.48 13-jun-1994 BUG: trap_interrupt --> put new ev5 ipl at 30 for all osfipl6 interrupts +// JM 0.49 8-jul-1994 BUG: In the unlikely (impossible?) event that the branch to pal_pal_bug_check is +// taken in the interrupt flow, stack is pushed twice. +// SWPPAL - update to support ECO 59 to allow 0 as a valid address +// Add itb flush to save/restore state routines +// Change hw_rei to hw_rei_stall in ic_flush routine. Shouldn't be necessary, but +// conforms to itbia restriction. +// Added enable_physical_console flag (for enter/exit console routines only) +// JM 0.50 29-jul-1994 Add code to dfault & invalid_dpte_handler to ignore exceptions on a +// load to r31/f31. changed dfault_fetch_err to dfault_fetch_ldr31_err and +// nmiss_fetch_err to nmiss_fetch_ldr31_err. +// JM 1.00 1-aug-1994 Add pass2 support (swpctx) +// JM 1.01 2-aug-1994 swppal now passes bc_ctl/bc_config in r1/r2 +// JM 1.02 15-sep-1994 BUG: swpctx missing shift of pme bit to correct position in icsr (pass2) +// Moved perfmon code here from system file. +// BUG: pal_perfmon - enable function not saving correct enables when pme not set (pass1) +// JM 1.03 3-oct-1994 Added (pass2 only) code to wrperfmon enable function to look at pme bit. +// JM 1.04 14-oct-1994 BUG: trap_interrupt - ISR read (and saved) before INTID -- INTID can change _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev