Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 2003 00:12:34 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        alpha@FreeBSD.org
Subject:   Removing support for SimOS
Message-ID:  <20030223081234.GA37539@athlon.pn.xcllnt.net>

next in thread | raw e-mail | index | archive | help

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Gang,

Attached the patches to remove support for running under the SimOS
simulator. These patches are accompanied by the removal of the
following files:
	sys/pci/simos.c
	sys/pci/simos.h

Please review,

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="alpha.diff"

Index: alpha/alpha/dec_kn8ae.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/dec_kn8ae.c,v
retrieving revision 1.11
diff -u -r1.11 dec_kn8ae.c
--- alpha/alpha/dec_kn8ae.c	8 Dec 2000 22:11:08 -0000	1.11
+++ alpha/alpha/dec_kn8ae.c	23 Feb 2003 07:49:07 -0000
@@ -31,8 +31,6 @@
  * SUCH DAMAGE.
  */
 
-#include "opt_simos.h"
-
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/termios.h>
Index: alpha/alpha/machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/machdep.c,v
retrieving revision 1.195
diff -u -r1.195 machdep.c
--- alpha/alpha/machdep.c	20 Feb 2003 20:54:42 -0000	1.195
+++ alpha/alpha/machdep.c	23 Feb 2003 07:45:02 -0000
@@ -90,7 +90,6 @@
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
-#include "opt_simos.h"
 #include "opt_msgbuf.h"
 #include "opt_maxmem.h"
 
@@ -477,27 +476,13 @@
 	nobootinfo:
 		bootinfo.ssym = (u_long)&_end;
 		bootinfo.esym = (u_long)&_end;
-#ifdef SIMOS
-		{
-			char* p = (char*)bootinfo.ssym + 8;
-			if (p[EI_MAG0] == ELFMAG0
-			    && p[EI_MAG1] == ELFMAG1
-			    && p[EI_MAG2] == ELFMAG2
-			    && p[EI_MAG3] == ELFMAG3) {
-				bootinfo.ssym = (u_long) p;
-				bootinfo.esym = (u_long)p + *(u_long*)(p - 8);
-			}
-		}
-#endif
 		bootinfo.hwrpb_phys = ((struct rpb *)HWRPB_ADDR)->rpb_phys;
 		bootinfo.hwrpb_size = ((struct rpb *)HWRPB_ADDR)->rpb_size;
 		init_prom_interface((struct rpb *)HWRPB_ADDR);
 		prom_getenv(PROM_E_BOOTED_OSFLAGS, bootinfo.boot_flags,
 			    sizeof bootinfo.boot_flags);
-#ifndef SIMOS
 		prom_getenv(PROM_E_BOOTED_FILE, bootinfo.booted_kernel,
 			    sizeof bootinfo.booted_kernel);
-#endif
 		prom_getenv(PROM_E_BOOTED_DEV, bootinfo.booted_dev,
 			    sizeof bootinfo.booted_dev);
 	}
@@ -634,12 +619,6 @@
 
 	kernstartpfn = atop(ALPHA_K0SEG_TO_PHYS(kernstart));
 	kernendpfn = atop(ALPHA_K0SEG_TO_PHYS(kernend));
-#ifdef SIMOS
-	/* 
-	 * SimOS console puts the bootstrap stack after kernel
-	 */
-	kernendpfn += 4;
-#endif
 
 	/*
 	 * Find out how much memory is available, by looking at
@@ -1092,7 +1071,6 @@
 void
 DELAY(int n)
 {
-#ifndef	SIMOS
 	unsigned long pcc0, pcc1, curcycle, cycles;
         int usec;
 
@@ -1129,7 +1107,6 @@
 		}
 		pcc0 = pcc1;
         }
-#endif
 }
 
 /*
Index: alpha/alpha/prom.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/prom.c,v
retrieving revision 1.25
diff -u -r1.25 prom.c
--- alpha/alpha/prom.c	20 Feb 2003 20:54:42 -0000	1.25
+++ alpha/alpha/prom.c	23 Feb 2003 07:45:47 -0000
@@ -27,8 +27,6 @@
  * $FreeBSD: src/sys/alpha/alpha/prom.c,v 1.25 2003/02/20 20:54:42 phk Exp $
  */
 
-#include "opt_simos.h"
-
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
 /* __KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.22 1998/02/27 04:03:00 thorpej Exp $"); */
@@ -99,18 +97,12 @@
 void
 init_bootstrap_console()
 {
-#ifndef SIMOS
 	char buf[4];
-#endif
 
 	init_prom_interface(hwrpb);
 
-#ifdef SIMOS
-	alpha_console = 0;
-#else
 	prom_getenv(PROM_E_TTY_DEV, buf, 4);
 	alpha_console = buf[0] - '0';
-#endif
 	promcnattach(alpha_console);
 }
 
@@ -194,20 +186,6 @@
 	s = intr_disable();
 
 	if (!prom_mapped) {
-#ifdef SIMOS
-		/*
-		 * SimOS console uses floating point.
-		 */
-		if (curthread != PCPU_GET(fpcurthread)) {
-			alpha_pal_wrfen(1);
-			if (PCPU_GET(fpcurthread)) {
-				savefpstate(&PCPU_GET(fpcurthread)->td_pcb->pcb_fp);
-				PCPU_GET(fpcurthread)->td_pcb->pcb_hw.apcb_flags &= ~ALPHA_PCB_FLAGS_FEN;
-			}
-			PCPU_SET(fpcurthread, curthread);
-			restorefpstate(&PCPU_GET(fpcurthread)->td_pcb->pcb_fp);
-		}
-#endif
 		if (!pmap_uses_prom_console())
 			panic("enter_prom");
 		lev1map = rom_lev1map();	/* XXX */
Index: alpha/alpha/trap.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/trap.c,v
retrieving revision 1.105
diff -u -r1.105 trap.c
--- alpha/alpha/trap.c	17 Feb 2003 02:19:57 -0000	1.105
+++ alpha/alpha/trap.c	23 Feb 2003 07:43:59 -0000
@@ -31,7 +31,6 @@
 /* #include "opt_fix_unaligned_vax_fp.h" */
 #include "opt_ddb.h"
 #include "opt_ktrace.h"
-#include "opt_simos.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -380,11 +379,7 @@
 			 * might have set a breakpoint.
 			 */
 			if (a0 == ALPHA_IF_CODE_BUGCHK ||
-			    a0 == ALPHA_IF_CODE_BPT
-#ifdef SIMOS
-			    || a0 == ALPHA_IF_CODE_GENTRAP
-#endif
-			    ) {
+			    a0 == ALPHA_IF_CODE_BPT) {
 				if (kdb_trap(a0, a1, a2, entry, framep))
 					goto out;
 			}
Index: alpha/conf/NOTES
===================================================================
RCS file: /home/ncvs/src/sys/alpha/conf/NOTES,v
retrieving revision 1.147
diff -u -r1.147 NOTES
--- alpha/conf/NOTES	23 Jul 2002 06:36:23 -0000	1.147
+++ alpha/conf/NOTES	23 Feb 2003 07:51:55 -0000
@@ -66,7 +66,3 @@
 
 #####################################################################
 # SIMULATOR OPTIONS
-
-# Include support for running under the SIMOS simulator.
-device		simos
-options 	SIMOS
Index: alpha/include/db_machdep.h
===================================================================
RCS file: /home/ncvs/src/sys/alpha/include/db_machdep.h,v
retrieving revision 1.6
diff -u -r1.6 db_machdep.h
--- alpha/include/db_machdep.h	20 Mar 2002 18:58:45 -0000	1.6
+++ alpha/include/db_machdep.h	23 Feb 2003 07:48:25 -0000
@@ -36,7 +36,6 @@
  */
 
 #include "opt_ddb.h"
-#include "opt_simos.h"
 
 #include <sys/param.h>
 #include <vm/vm.h>
@@ -55,11 +54,7 @@
 
 #define	PC_REGS(regs)	((db_addr_t)(regs)->tf_regs[FRAME_PC])
 
-#ifdef SIMOS
-#define	BKPT_INST	0x000000aa	/* gentrap instruction */
-#else
 #define	BKPT_INST	0x00000080	/* breakpoint instruction */
-#endif
 #define	BKPT_SIZE	(4)		/* size of breakpoint inst */
 #define	BKPT_SET(inst)	(BKPT_INST)
 
@@ -67,13 +62,8 @@
 	(ddb_regs.tf_regs[FRAME_PC] -= BKPT_SIZE);
 
 #define	SOFTWARE_SSTEP	1		/* no hardware support */
-#ifdef SIMOS
-#define	IS_BREAKPOINT_TRAP(type, code)	((type) == ALPHA_KENTRY_IF && \
-					 (code) == ALPHA_IF_CODE_GENTRAP)
-#else
 #define	IS_BREAKPOINT_TRAP(type, code)	((type) == ALPHA_KENTRY_IF && \
 					 (code) == ALPHA_IF_CODE_BPT)
-#endif
 #define	IS_WATCHPOINT_TRAP(type, code)	0
 
 /*
Index: alpha/tlsb/dwlpx.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/tlsb/dwlpx.c,v
retrieving revision 1.23
diff -u -r1.23 dwlpx.c
--- alpha/tlsb/dwlpx.c	8 Nov 2002 20:52:21 -0000	1.23
+++ alpha/tlsb/dwlpx.c	23 Feb 2003 07:46:40 -0000
@@ -58,8 +58,6 @@
  * SUCH DAMAGE.
  */
 
-#include "opt_simos.h"
-
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -123,11 +121,7 @@
 static driver_intr_t dwlpx_intr;
 
 static u_int32_t imaskcache[DWLPX_NIONODE][DWLPX_NHOSE][NHPC];
-#ifdef SIMOS
-extern void simos_intr(int);
-#else
 static void dwlpx_eintr(unsigned long);
-#endif
 
 /*
  * Direct-mapped window: 2G at 2G
@@ -745,16 +739,6 @@
 /*
  */
 
-#ifdef SIMOS
-static void
-dwlpx_intr(void *arg)
-{
-
-	simos_intr(0);
-}
-
-#else /* !SIMOS */
-
 static void
 dwlpx_intr(void *arg)
 {
@@ -842,7 +826,6 @@
 		REGVAL(PCIA_ERR(i) + sc->sysbase) = hpcs[i].err;
 	}
 }
-#endif /* SIMOS */
 
 static device_method_t dwlpx_methods[] = {
 	/* Device interface */
Index: alpha/tlsb/tlsb.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/tlsb/tlsb.c,v
retrieving revision 1.13
diff -u -r1.13 tlsb.c
--- alpha/tlsb/tlsb.c	10 May 2001 07:08:03 -0000	1.13
+++ alpha/tlsb/tlsb.c	23 Feb 2003 07:47:07 -0000
@@ -36,8 +36,6 @@
  * found on AlphaServer 8200 and 8400 systems.
  */
 
-#include "opt_simos.h"
-
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -130,19 +128,9 @@
 		/*
 		 * Check for invalid address.
 		 */
-#ifdef SIMOS
-		if (node != 0 && node != 8) {
-			continue;
-		} else if (node == 0) {
-			tldev = TLDEV_DTYPE_SCPU4;
-		} else {
-			tldev = TLDEV_DTYPE_KFTIA;
-		}
-#else
 		if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))
 			continue;
 		tldev = TLSB_GET_NODEREG(node, TLDEV);
-#endif
 		if (tldev == 0) {
 			/* Nothing at this node. */
 			continue;
Index: conf/files
===================================================================
RCS file: /home/ncvs/src/sys/conf/files,v
retrieving revision 1.760
diff -u -r1.760 files
--- conf/files	20 Feb 2003 20:02:32 -0000	1.760
+++ conf/files	23 Feb 2003 08:01:11 -0000
@@ -1501,7 +1501,6 @@
 pci/intpm.c		optional intpm
 pci/meteor.c		count meteor pci nowerror
 pci/ncr.c		optional ncr
-pci/simos.c		optional simos nowerror
 pci/viapm.c		optional viapm
 pci/xrpu.c		optional xrpu
 posix4/ksched.c	optional _kposix_priority_scheduling
Index: conf/options
===================================================================
RCS file: /home/ncvs/src/sys/conf/options,v
retrieving revision 1.373
diff -u -r1.373 options
--- conf/options	5 Feb 2003 21:02:56 -0000	1.373
+++ conf/options	23 Feb 2003 07:49:47 -0000
@@ -528,9 +528,6 @@
 BREAK_TO_DEBUGGER	opt_comconsole.h
 ALT_BREAK_TO_DEBUGGER	opt_comconsole.h
 
-# Include tweaks for running under the SimOS machine simulator.
-SIMOS			opt_simos.h
-
 # options for bus/device framework
 BUS_DEBUG		opt_bus.h
 
Index: modules/osf1/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/modules/osf1/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- modules/osf1/Makefile	18 Aug 2002 05:45:10 -0000	1.10
+++ modules/osf1/Makefile	23 Feb 2003 08:01:38 -0000
@@ -7,8 +7,8 @@
 KMOD=	osf1
 SRCS=	osf1_ioctl.c osf1_misc.c osf1_signal.c osf1_sysent.c \
 	osf1_mount.c imgact_osf1.c osf1_sysvec.c opt_compat.h \
-	opt_simos.h opt_ddb.h opt_mac.h opt_nfs.h device_if.h \
-	bus_if.h vnode_if.h
+	opt_ddb.h opt_mac.h opt_nfs.h device_if.h bus_if.h \
+	vnode_if.h
 
 #CFLAGS+=  -g
 

--C7zPtVaVf+AK4Oqc--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030223081234.GA37539>