| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: cpu.h,v 1.112 2020/07/06 10:50:32 rin Exp $ */ | | 1 | /* $NetBSD: cpu.h,v 1.113 2020/07/06 13:20:55 rin Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (C) 1999 Wolfgang Solfrank. | | 4 | * Copyright (C) 1999 Wolfgang Solfrank. |
5 | * Copyright (C) 1999 TooLs GmbH. | | 5 | * Copyright (C) 1999 TooLs GmbH. |
6 | * Copyright (C) 1995-1997 Wolfgang Solfrank. | | 6 | * Copyright (C) 1995-1997 Wolfgang Solfrank. |
7 | * Copyright (C) 1995-1997 TooLs GmbH. | | 7 | * Copyright (C) 1995-1997 TooLs GmbH. |
8 | * All rights reserved. | | 8 | * All rights reserved. |
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. |
| @@ -88,30 +88,31 @@ struct cpu_info { | | | @@ -88,30 +88,31 @@ struct cpu_info { |
88 | } ci_un1; | | 88 | } ci_un1; |
89 | volatile uint32_t ci_pending_ipis; | | 89 | volatile uint32_t ci_pending_ipis; |
90 | int ci_mtx_oldspl; | | 90 | int ci_mtx_oldspl; |
91 | int ci_mtx_count; | | 91 | int ci_mtx_count; |
92 | #if defined(PPC_IBM4XX) || defined(MODULAR) || defined(_MODULE) | | 92 | #if defined(PPC_IBM4XX) || defined(MODULAR) || defined(_MODULE) |
93 | char *ci_intstk; | | 93 | char *ci_intstk; |
94 | #endif | | 94 | #endif |
95 | #define CI_SAVETEMP (0*CPUSAVE_LEN) | | 95 | #define CI_SAVETEMP (0*CPUSAVE_LEN) |
96 | #define CI_SAVEDDB (1*CPUSAVE_LEN) | | 96 | #define CI_SAVEDDB (1*CPUSAVE_LEN) |
97 | #define CI_SAVEIPKDB (2*CPUSAVE_LEN) /* obsolete */ | | 97 | #define CI_SAVEIPKDB (2*CPUSAVE_LEN) /* obsolete */ |
98 | #define CI_SAVEMMU (3*CPUSAVE_LEN) | | 98 | #define CI_SAVEMMU (3*CPUSAVE_LEN) |
99 | #define CI_SAVEMAX (4*CPUSAVE_LEN) | | 99 | #define CI_SAVEMAX (4*CPUSAVE_LEN) |
100 | #define CPUSAVE_LEN 8 | | 100 | #define CPUSAVE_LEN 8 |
101 | #if !defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE) | | 101 | #if defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE) |
102 | #define CPUSAVE_SIZE (CI_SAVEMAX*CPUSAVE_LEN) | | | |
103 | #else | | | |
104 | #define CPUSAVE_SIZE 128 | | 102 | #define CPUSAVE_SIZE 128 |
| | | 103 | #else |
| | | 104 | #define CPUSAVE_SIZE (CI_SAVEMAX*CPUSAVE_LEN) |
| | | 105 | // XXX CTASSERT(CPUSAVE_SIZE >= 128); |
105 | #endif | | 106 | #endif |
106 | #define CPUSAVE_R28 0 /* where r28 gets saved */ | | 107 | #define CPUSAVE_R28 0 /* where r28 gets saved */ |
107 | #define CPUSAVE_R29 1 /* where r29 gets saved */ | | 108 | #define CPUSAVE_R29 1 /* where r29 gets saved */ |
108 | #define CPUSAVE_R30 2 /* where r30 gets saved */ | | 109 | #define CPUSAVE_R30 2 /* where r30 gets saved */ |
109 | #define CPUSAVE_R31 3 /* where r31 gets saved */ | | 110 | #define CPUSAVE_R31 3 /* where r31 gets saved */ |
110 | #define CPUSAVE_DEAR 4 /* where IBM4XX SPR_DEAR gets saved */ | | 111 | #define CPUSAVE_DEAR 4 /* where IBM4XX SPR_DEAR gets saved */ |
111 | #define CPUSAVE_DAR 4 /* where OEA SPR_DAR gets saved */ | | 112 | #define CPUSAVE_DAR 4 /* where OEA SPR_DAR gets saved */ |
112 | #define CPUSAVE_ESR 5 /* where IBM4XX SPR_ESR gets saved */ | | 113 | #define CPUSAVE_ESR 5 /* where IBM4XX SPR_ESR gets saved */ |
113 | #define CPUSAVE_DSISR 5 /* where OEA SPR_DSISR gets saved */ | | 114 | #define CPUSAVE_DSISR 5 /* where OEA SPR_DSISR gets saved */ |
114 | #define CPUSAVE_SRR0 6 /* where SRR0 gets saved */ | | 115 | #define CPUSAVE_SRR0 6 /* where SRR0 gets saved */ |
115 | #define CPUSAVE_SRR1 7 /* where SRR1 gets saved */ | | 116 | #define CPUSAVE_SRR1 7 /* where SRR1 gets saved */ |
116 | register_t ci_savearea[CPUSAVE_SIZE]; | | 117 | register_t ci_savearea[CPUSAVE_SIZE]; |
117 | #if defined(PPC_BOOKE) || defined(MODULAR) || defined(_MODULE) | | 118 | #if defined(PPC_BOOKE) || defined(MODULAR) || defined(_MODULE) |