Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2003 21:50:13 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 25078 for review
Message-ID:  <200302130550.h1D5oD7j056951@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=25078

Change 25078 by jmallett@jmallett_dalek on 2003/02/12 21:49:44

	Stub out a few more things, use the correct KINFO_PROC size for the
	CTASSERT, rename some macros to be what FreeBSD wants (and what makes
	sense), define some things, and grab some low hanging fruit from NetBSD.
	The kernel will now try to link.

Affected files ...

.. //depot/projects/mips/sys/mips/include/atomic.h#9 edit
.. //depot/projects/mips/sys/mips/include/db_machdep.h#2 edit
.. //depot/projects/mips/sys/mips/include/param.h#5 edit
.. //depot/projects/mips/sys/mips/include/pcb.h#2 edit
.. //depot/projects/mips/sys/mips/include/pmap.h#3 edit
.. //depot/projects/mips/sys/mips/include/reg.h#3 edit
.. //depot/projects/mips/sys/mips/include/vmparam.h#4 edit
.. //depot/projects/mips/sys/mips/sgimips/param.h#5 edit
.. //depot/projects/mips/sys/sys/user.h#4 edit

Differences ...

==== //depot/projects/mips/sys/mips/include/atomic.h#9 (text+ko) ====

@@ -119,7 +119,7 @@
 	"1:\n\t"
 	"ll	%[temp], (%[p])\n\t"
 	"move	%[res], %[temp]\n\t"
-	"move	%[temp], 0\n\t"
+	"move	%[temp], $0\n\t"
 	"sc	%[temp], (%[p])\n\t"
 	"beqz	%[temp], 1b\n\t"
 	:
@@ -178,7 +178,7 @@
 	"1:\n\t"
 	"lld	%[temp], (%[p])\n\t"
 	"move	%[res], %[temp]\n\t"
-	"move	%[temp], 0\n\t"
+	"move	%[temp], $0\n\t"
 	"scd	%[temp], (%[p])\n\t"
 	"beqz	%[temp], 1b\n\t"
 	:

==== //depot/projects/mips/sys/mips/include/db_machdep.h#2 (text+ko) ====

@@ -28,8 +28,13 @@
 #ifndef _MACHINE_DB_MACHDEP_H_
 #define	_MACHINE_DB_MACHDEP_H_
 
+#include <machine/frame.h>
+
 /*
- * Nothing to see here.
+ * Machine-dependent definitions for the new kernel debugger.
  */
+typedef	vm_offset_t		db_addr_t;
+typedef	long			db_expr_t;
+typedef struct trapframe	db_regs_t;
 
 #endif /* !_MACHINE_DB_MACHDEP_H_ */

==== //depot/projects/mips/sys/mips/include/param.h#5 (text+ko) ====

@@ -7,6 +7,13 @@
 #include <platform/param.h>
 
 /*
+ * We don't support SMP yet, XXX
+ */
+#ifndef	MAXCPU
+#define	MAXCPU	1
+#endif
+
+/*
  * We use a 4K page on MIPS systems.  Override PAGE_* definitions
  * to compile-time constants.
  */
@@ -15,6 +22,12 @@
 #define	PAGE_MASK	(PAGE_SIZE - 1)
 
 /*
+ * Pages of u. area and kstack (with pcb) respectively.
+ */
+#define	UAREA_PAGES	1
+#define	KSTACK_PAGES	4
+
+/*
  * On mips, UPAGES is fixed by sys/arch/mips/mips/locore code
  * to be the number of per-process-wired kernel-stack pages/PTES.
  */
@@ -93,7 +106,7 @@
 /*
  * Mach derived conversion macros
  */
-#define mips_round_page(x)	((((unsigned)(x)) + NBPG - 1) & ~(NBPG-1))
-#define mips_trunc_page(x)	((unsigned)(x) & ~(NBPG-1))
-#define mips_btop(x)		((unsigned)(x) >> PGSHIFT)
-#define mips_ptob(x)		((unsigned)(x) << PGSHIFT)
+#define round_page(x)	((((unsigned)(x)) + NBPG - 1) & ~(NBPG-1))
+#define trunc_page(x)	((unsigned)(x) & ~(NBPG-1))
+#define btop(x)		((unsigned)(x) >> PGSHIFT)
+#define ptob(x)		((unsigned)(x) << PGSHIFT)

==== //depot/projects/mips/sys/mips/include/pcb.h#2 (text+ko) ====

@@ -28,8 +28,14 @@
 #ifndef _MACHINE_PCB_H_
 #define	_MACHINE_PCB_H_
 
+#include <machine/reg.h>
+
 /*
- * Nothing to see here.
+ * Process Control Block.
  */
+struct pcb {
+	struct fpreg	pcb_fpregs;	/* Saved floating point registers */
+	struct reg	pcb_regs;	/* Saved regs. XXX This is excessive. */
+};
 
 #endif /* !_MACHINE_PCB_H_ */

==== //depot/projects/mips/sys/mips/include/pmap.h#3 (text+ko) ====

@@ -37,4 +37,13 @@
 
 typedef	struct pmap *pmap_t;
 
+#ifdef	_KERNEL
+extern	pmap_t kernel_pmap;
+extern	vm_offset_t avail_start;
+extern	vm_offset_t avail_end;
+extern	vm_offset_t phys_avail[];
+extern	vm_offset_t virtual_avail;
+extern	vm_offset_t virtual_end;
+#endif
+
 #endif	/* !_MACHINE_PMAP_H_ */

==== //depot/projects/mips/sys/mips/include/reg.h#3 (text+ko) ====

@@ -39,4 +39,11 @@
 	double		 r_regs[33];
 };
 
+/*
+ * Registers for a debugger by way of procfs or ptrace.
+ */ 
+struct dbreg {
+	__register_t	 this_is_a_lie;
+};
+
 #endif /* !_MACHINE_REG_H_ */

==== //depot/projects/mips/sys/mips/include/vmparam.h#4 (text+ko) ====

@@ -82,6 +82,9 @@
 #ifndef	MAXSSIZ
 #define	MAXSSIZ		(32*1024*1024)		/* max stack size */
 #endif
+#ifndef SGROWSIZ
+#define	SGROWSIZ	(128*1024)		/* amount to grow stack */
+#endif
 
 /*
  * PTEs for mapping user space into the kernel for phyio operations.
@@ -100,6 +103,17 @@
 #endif
 
 /*
+ * The time for a process to be blocked before being very swappable.
+ * This is a number of seconds which the system takes as being a non-trivial
+ * amount of real time.  You probably shouldn't change this;
+ * it is used in subtle ways (fractions and multiples of it are, that is, like
+ * half of a ``long time'', almost a long time, etc.)
+ * It is related to human patience and other factors which don't really
+ * change over time.
+ */
+#define	MAXSLP 		20
+
+/*
  * Mach derived constants
  */
 
@@ -116,6 +130,7 @@
 #else
 #define VM_MAX_KERNEL_ADDRESS	((vm_offset_t)0xFFFFC000)
 #endif
+#define	KERNBASE		(VM_MIN_KERNEL_ADDRESS)
 
 /* virtual sizes (bytes) for various kernel submaps */
 #define	VM_KMEM_SIZE		(16*1024*1024)		/* XXX ??? */

==== //depot/projects/mips/sys/mips/sgimips/param.h#5 (text+ko) ====

@@ -46,6 +46,11 @@
 #define	MACHINE		"sgimips"
 #define	MID_MACHINE	MID_MIPS
 
+/*
+ * Yes we have no SMP.
+ */
+#define	MAXCPU		1
+
 #define BLKDEV_IOSIZE	2048
 #define	MAXPHYS		(64 * 1024)	/* Maximum raw I/O transfer size */
 

==== //depot/projects/mips/sys/sys/user.h#4 (text+ko) ====

@@ -84,7 +84,7 @@
 #define	KINFO_PROC_SIZE	656
 #endif
 #ifdef	__mips__
-#define	KINFO_PROC_SIZE	656		/* this is wrong, XXXMIPS */
+#define	KINFO_PROC_SIZE	888
 #endif
 #ifndef	KINFO_PROC_SIZE
 #error	"Unknown architecture"

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




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