summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2001-09-20 00:47:17 +0000
committermp <mp@FreeBSD.org>2001-09-20 00:47:17 +0000
commita2e5cb9c1ece11bd25f867c25e6f34022389125f (patch)
treec07dd541ea7e2e8cf948e0f0147a7d96d38bf958 /sys/powerpc/include
parent7418b6f0974dece312233d4ca5fd06777377bf9c (diff)
downloadFreeBSD-src-a2e5cb9c1ece11bd25f867c25e6f34022389125f.zip
FreeBSD-src-a2e5cb9c1ece11bd25f867c25e6f34022389125f.tar.gz
Update PowerPC MD code to compile and do initial bootstrap based on
recent changes (KSE and VM requiring physmem to be setup). Reviewed by: benno, jhb, julian
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/cpu.h2
-rw-r--r--sys/powerpc/include/frame.h3
-rw-r--r--sys/powerpc/include/param.h7
-rw-r--r--sys/powerpc/include/pmap.h3
-rw-r--r--sys/powerpc/include/reg.h2
5 files changed, 10 insertions, 7 deletions
diff --git a/sys/powerpc/include/cpu.h b/sys/powerpc/include/cpu.h
index 37ca02b..a7c70c1 100644
--- a/sys/powerpc/include/cpu.h
+++ b/sys/powerpc/include/cpu.h
@@ -92,7 +92,7 @@ get_cyclecount(void)
return (time);
}
-#define cpu_getstack(p) ((p)->p_frame->fixreg[1])
+#define cpu_getstack(td) ((td)->td_frame->fixreg[1])
void savectx __P((struct pcb *));
diff --git a/sys/powerpc/include/frame.h b/sys/powerpc/include/frame.h
index 927c574..3865de4 100644
--- a/sys/powerpc/include/frame.h
+++ b/sys/powerpc/include/frame.h
@@ -63,8 +63,7 @@ struct trapframe {
* This is to ensure alignment of the stackpointer
*/
#define FRAMELEN roundup(sizeof(struct trapframe) + 8, 16)
-#define trapframe(p) ((struct trapframe *)((char *)(p)->p_addr \
- + USPACE - FRAMELEN + 8))
+#define trapframe(td) ((td)->td_frame)
struct switchframe {
register_t sp;
diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h
index 3ebcd94..3ac5646 100644
--- a/sys/powerpc/include/param.h
+++ b/sys/powerpc/include/param.h
@@ -112,8 +112,11 @@
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
-#define UPAGES 2 /* pages of u-area */
-#define USPACE (UPAGES * PAGE_SIZE) /* total size of u-area */
+#ifndef KSTACK_UPAGES
+#define KSTACK_PAGES 2 /* includes pcb */
+#endif
+#define USPACE (KSTACK_PAGES * PAGE_SIZE) /* total size of pcb */
+#define UAREA_PAGES 1 /* holds struct user WITHOUT PCB */
/*
* Constants related to network buffer management.
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h
index 83adf0d..26c0d6a 100644
--- a/sys/powerpc/include/pmap.h
+++ b/sys/powerpc/include/pmap.h
@@ -95,7 +95,8 @@ extern vm_offset_t phys_avail[];
extern vm_offset_t virtual_avail;
extern vm_offset_t virtual_end;
-void pmap_bootstrap __P((u_int kernelstart, u_int kernelend));
+void pmap_bootstrap __P((void));
+void pmap_setavailmem __P((u_int kernelstart, u_int kernelend));
vm_offset_t pmap_steal_memory __P((vm_size_t));
boolean_t ptemodify __P((struct vm_page *, u_int, u_int));
int ptebits __P((struct vm_page *, int));
diff --git a/sys/powerpc/include/reg.h b/sys/powerpc/include/reg.h
index dfe9d96..a05e566 100644
--- a/sys/powerpc/include/reg.h
+++ b/sys/powerpc/include/reg.h
@@ -22,6 +22,6 @@ struct dbreg {
unsigned long junk;
};
-void setregs(struct proc *, u_long, u_long, u_long);
+void setregs(struct thread *, u_long, u_long, u_long);
#endif /* _POWERPC_REG_H_ */
OpenPOWER on IntegriCloud