Wed Nov 4 07:51:09 2020 UTC ()
Fix some of the previous - I must have compile tested the wrong tree


(skrll)
diff -r1.3 -r1.4 src/sys/arch/riscv/include/frame.h
diff -r1.8 -r1.9 src/sys/arch/riscv/riscv/genassym.cf

cvs diff -r1.3 -r1.4 src/sys/arch/riscv/include/frame.h (expand / switch to unified diff)

--- src/sys/arch/riscv/include/frame.h 2020/11/04 06:56:56 1.3
+++ src/sys/arch/riscv/include/frame.h 2020/11/04 07:51:08 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: frame.h,v 1.3 2020/11/04 06:56:56 skrll Exp $ */ 1/* $NetBSD: frame.h,v 1.4 2020/11/04 07:51:08 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _RISCV_FRAME_H_ 32#ifndef _RISCV_FRAME_H_
33#define _RISCV_FRAME_H_ 33#define _RISCV_FRAME_H_
34 34
35#include <riscv/reg.h> 35#include <riscv/reg.h>
36 36
37struct trapframe { 37struct trapframe {
38 struct reg tf_regs __aligned(8); 38 struct reg tf_regs __aligned(8);
39 register_t tf_stval; // supervisor trap value 39 register_t tf_tval; // supervisor trap value
40 register_t tf_sepc; // supervisor exception program counter 40 register_t tf_pc; // supervisor exception program counter
41 register_t tf_scause; // supervisor cause register 41 register_t tf_cause; // supervisor cause register
42 register_t tf_sr; // supervisor status register 42 register_t tf_sr; // supervisor status register
43#define tf_reg tf_regs.r_reg 43#define tf_reg tf_regs.r_reg
44#define tf_a0 tf_reg[_X_A0] 44#define tf_a0 tf_reg[_X_A0]
45#define tf_t0 tf_reg[_X_T0] 45#define tf_t0 tf_reg[_X_T0]
46#define tf_v0 tf_reg[_X_V0] 46#define tf_v0 tf_reg[_X_V0]
47#define tf_v1 tf_reg[_X_V1] 47#define tf_v1 tf_reg[_X_V1]
48#define tf_ra tf_reg[_X_RA] 48#define tf_ra tf_reg[_X_RA]
49#define tf_sp tf_reg[_X_SP] 49#define tf_sp tf_reg[_X_SP]
50}; 50};
51 51
52#endif /* _RISCV_FRAME_H_ */ 52#endif /* _RISCV_FRAME_H_ */

cvs diff -r1.8 -r1.9 src/sys/arch/riscv/riscv/genassym.cf (expand / switch to unified diff)

--- src/sys/arch/riscv/riscv/genassym.cf 2020/11/04 06:56:56 1.8
+++ src/sys/arch/riscv/riscv/genassym.cf 2020/11/04 07:51:08 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: genassym.cf,v 1.8 2020/11/04 06:56:56 skrll Exp $ 1# $NetBSD: genassym.cf,v 1.9 2020/11/04 07:51:08 skrll Exp $
2#- 2#-
3# Copyright (c) 2014 The NetBSD Foundation, Inc. 3# Copyright (c) 2014 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Matt Thomas of 3am Software Foundry. 7# by Matt Thomas of 3am Software Foundry.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -97,28 +97,28 @@ define TF_A3 offsetof(struct trapframe, @@ -97,28 +97,28 @@ define TF_A3 offsetof(struct trapframe,
97define TF_A4 offsetof(struct trapframe, tf_reg[_X_A4]) 97define TF_A4 offsetof(struct trapframe, tf_reg[_X_A4])
98define TF_A5 offsetof(struct trapframe, tf_reg[_X_A5]) 98define TF_A5 offsetof(struct trapframe, tf_reg[_X_A5])
99define TF_A6 offsetof(struct trapframe, tf_reg[_X_A6]) 99define TF_A6 offsetof(struct trapframe, tf_reg[_X_A6])
100define TF_A7 offsetof(struct trapframe, tf_reg[_X_A7]) 100define TF_A7 offsetof(struct trapframe, tf_reg[_X_A7])
101define TF_T0 offsetof(struct trapframe, tf_reg[_X_T0]) 101define TF_T0 offsetof(struct trapframe, tf_reg[_X_T0])
102define TF_T1 offsetof(struct trapframe, tf_reg[_X_T1]) 102define TF_T1 offsetof(struct trapframe, tf_reg[_X_T1])
103define TF_T2 offsetof(struct trapframe, tf_reg[_X_T2]) 103define TF_T2 offsetof(struct trapframe, tf_reg[_X_T2])
104define TF_T3 offsetof(struct trapframe, tf_reg[_X_T3]) 104define TF_T3 offsetof(struct trapframe, tf_reg[_X_T3])
105define TF_T4 offsetof(struct trapframe, tf_reg[_X_T4]) 105define TF_T4 offsetof(struct trapframe, tf_reg[_X_T4])
106define TF_T5 offsetof(struct trapframe, tf_reg[_X_T5]) 106define TF_T5 offsetof(struct trapframe, tf_reg[_X_T5])
107define TF_T6 offsetof(struct trapframe, tf_reg[_X_T6]) 107define TF_T6 offsetof(struct trapframe, tf_reg[_X_T6])
108define TF_GP offsetof(struct trapframe, tf_reg[_X_GP]) 108define TF_GP offsetof(struct trapframe, tf_reg[_X_GP])
109define TF_PC offsetof(struct trapframe, tf_pc) 109define TF_PC offsetof(struct trapframe, tf_pc)
110define TF_SCAUSE offsetof(struct trapframe, tf_scause) 110define TF_CAUSE offsetof(struct trapframe, tf_cause)
111define TF_STVAL offsetof(struct trapframe, tf_stval) 111define TF_TVA L offsetof(struct trapframe, tf_tval)
112define TF_SR offsetof(struct trapframe, tf_sr) 112define TF_SR offsetof(struct trapframe, tf_sr)
113 113
114define L_CPU offsetof(struct lwp, l_cpu) 114define L_CPU offsetof(struct lwp, l_cpu)
115define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending) 115define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending)
116define L_MD_ONFAULT offsetof(struct lwp, l_md.md_onfault) 116define L_MD_ONFAULT offsetof(struct lwp, l_md.md_onfault)
117define L_MD_USP offsetof(struct lwp, l_md.md_usp) 117define L_MD_USP offsetof(struct lwp, l_md.md_usp)
118define L_MD_UTF offsetof(struct lwp, l_md.md_utf) 118define L_MD_UTF offsetof(struct lwp, l_md.md_utf)
119define L_MD_KTF offsetof(struct lwp, l_md.md_ktf) 119define L_MD_KTF offsetof(struct lwp, l_md.md_ktf)
120define L_PCB offsetof(struct lwp, l_addr) 120define L_PCB offsetof(struct lwp, l_addr)
121define L_PROC offsetof(struct lwp, l_proc) 121define L_PROC offsetof(struct lwp, l_proc)
122 122
123define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall) 123define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall)
124 124