summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1999-11-25 18:28:07 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1999-11-25 18:28:07 +0000
commitec94c6a6bb4e6b74b71064aa08a610332292e764 (patch)
tree9656c9d701925bb9c045623f4ff09d02533c64be /sys/arch
parent86a41fb41ca29e4c9e99ea8f1aaf730568e031fc (diff)
new pcb and frame layouts
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/include/frame.h49
-rw-r--r--sys/arch/hppa/include/pcb.h41
2 files changed, 68 insertions, 22 deletions
diff --git a/sys/arch/hppa/include/frame.h b/sys/arch/hppa/include/frame.h
index dc79184b32f..6d8e1c30287 100644
--- a/sys/arch/hppa/include/frame.h
+++ b/sys/arch/hppa/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.10 1999/11/16 16:46:15 mickey Exp $ */
+/* $OpenBSD: frame.h,v 1.11 1999/11/25 18:28:06 mickey Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -64,8 +64,37 @@
#define KERNMODE(pc) (((register_t)pc) & ~HPPA_PC_PRIV_MASK)
#ifndef _LOCORE
+/*
+ * the trapframe is divided into two parts:
+ * one is saved while we are in the physical mode (beginning of the trap),
+ * and should be kept as small as possible, since all the interrupts will
+ * be lost during this phase, also it must be 64-bytes aligned, per
+ * pa-risc stack conventions, and it's dependancies in the code (;
+ * the other part is filled out when we are already in the virtual mode,
+ * are able to catch interrupts (they are kept pending) and perform
+ * other trap activities (like tlb misses).
+ */
struct trapframe {
+ /* the `physical' part of the trapframe */
+ u_int tf_t1; /* r22 */
+ u_int tf_t2; /* r21 */
+ u_int tf_sp; /* r30 */
+ u_int tf_t3; /* r20 */
+ u_int tf_iisq_head; /* cr17 */
+ u_int tf_iisq_tail;
+ u_int tf_iioq_head; /* cr18 */
+ u_int tf_iioq_tail;
+ u_int tf_eiem; /* cr15 */
+ u_int tf_ipsw; /* cr22 */
+ u_int tf_sr3;
+ u_int tf_pidr1; /* cr8 */
+ u_int tf_isr; /* cr20 */
+ u_int tf_ior; /* cr21 */
+ u_int tf_iir; /* cr19 */
u_int tf_flags;
+
+ /* here starts the `virtual' part */
+ u_int tf_sar; /* cr11 */
u_int tf_r1;
u_int tf_rp; /* r2 */
u_int tf_r3; /* frame pointer when -g */
@@ -85,9 +114,6 @@ struct trapframe {
u_int tf_r17;
u_int tf_r18;
u_int tf_t4; /* r19 */
- u_int tf_t3; /* r20 */
- u_int tf_t2; /* r21 */
- u_int tf_t1; /* r22 */
u_int tf_arg3; /* r23 */
u_int tf_arg2; /* r24 */
u_int tf_arg1; /* r25 */
@@ -95,37 +121,24 @@ struct trapframe {
u_int tf_dp; /* r27 */
u_int tf_ret0; /* r28 */
u_int tf_ret1; /* r29 */
- u_int tf_sp; /* r30 */
u_int tf_r31;
u_int tf_sr0;
u_int tf_sr1;
u_int tf_sr2;
- u_int tf_sr3;
u_int tf_sr4;
u_int tf_sr5;
u_int tf_sr6;
u_int tf_sr7;
- u_int tf_pidr1; /* cr8 */
u_int tf_pidr2; /* cr9 */
u_int tf_pidr3; /* cr12 */
u_int tf_pidr4; /* cr13 */
u_int tf_rctr; /* cr0 */
- u_int tf_eiem; /* cr15 */
u_int tf_ccr; /* cr10 */
- u_int tf_sar; /* cr11 */
- u_int tf_iisq_head; /* cr17 */
- u_int tf_iisq_tail;
- u_int tf_iioq_head; /* cr18 */
- u_int tf_iioq_tail;
- u_int tf_iir; /* cr19 */
- u_int tf_isr; /* cr20 */
- u_int tf_ior; /* cr21 */
- u_int tf_ipsw; /* cr22 */
u_int tf_eirr; /* cr23 - DDB */
u_int tf_hptm; /* cr24 - DDB */
u_int tf_vtop; /* cr25 - DDB */
u_int tf_cr28; /* - DDB */
- u_int tf_cr30; /* KSP */
+ u_int tf_cr30; /* uaddr */
u_int tf_pad[3]; /* pad to 256 bytes */
};
diff --git a/sys/arch/hppa/include/pcb.h b/sys/arch/hppa/include/pcb.h
index e50eff429bd..5885ab6e3fb 100644
--- a/sys/arch/hppa/include/pcb.h
+++ b/sys/arch/hppa/include/pcb.h
@@ -1,4 +1,36 @@
-/* $OpenBSD: pcb.h,v 1.4 1999/06/22 18:01:12 mickey Exp $ */
+/* $OpenBSD: pcb.h,v 1.5 1999/11/25 18:28:06 mickey Exp $ */
+
+/*
+ * Copyright (c) 1999 Michael Shalayeff
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Michael Shalayeff.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#ifndef _MACHINE_PCB_H_
#define _MACHINE_PCB_H_
@@ -6,10 +38,11 @@
#include <machine/reg.h>
struct pcb {
- struct trapframe pcb_tf;
- u_int64_t pcb_fpregs[HPPA_NFPREGS]; /* not included above */
- int (*pcb_onfault) __P((void)); /* SW copy fault handler */
+ u_int64_t pcb_fpregs[HPPA_NFPREGS]; /* not in the trapframe */
+ paddr_t pcb_upaddrs[UPAGES]; /* cached PAs for the U-area */
+ u_int pcb_onfault; /* SW copy fault handler */
pa_space_t pcb_space; /* copy pmap_space, for asm's sake */
+ vaddr_t pcb_uva; /* KVA for U-area */
};
struct md_coredump {