@@ -66,7 +66,7 @@ impl PmpByte {
66
66
}
67
67
68
68
/// Physical memory protection configuration
69
- /// Pmpcf0 struct contains pmp0cfg - pmp3cfg for 32-bit arch , or pmp0cfg - pmp7cfg for 64-bit arch
69
+ /// Pmpcfg0 struct contains pmp0cfg - pmp3cfg for RV32 , or pmp0cfg - pmp7cfg for RV64
70
70
/// get_byte() method retrieves a single pmp<x>cfg held in a PmpByte struct
71
71
pub mod pmpcfg0 {
72
72
use super :: { BitField , Permission , PmpByte , Range } ;
@@ -104,7 +104,7 @@ pub mod pmpcfg0 {
104
104
#[ cfg( riscv64) ]
105
105
assert ! ( index < 8 ) ;
106
106
107
- _write ( ( permission as usize ) << ( index * 8 ) ) ;
107
+ _set ( ( permission as usize ) << ( index * 8 ) ) ;
108
108
}
109
109
110
110
#[ inline]
@@ -115,7 +115,7 @@ pub mod pmpcfg0 {
115
115
#[ cfg( riscv64) ]
116
116
assert ! ( index < 8 ) ;
117
117
118
- _write ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
118
+ _set ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
119
119
}
120
120
121
121
#[ inline]
@@ -141,8 +141,8 @@ pub mod pmpcfg0 {
141
141
}
142
142
}
143
143
144
- /// Physical memory protection configuration, RV32 only
145
- /// Pmpcf1 struct contains pmp4cfg - pmp7cfg for 32-bit arch only
144
+ /// Physical memory protection configuration
145
+ /// Pmpcfg1 struct contains pmp4cfg - pmp7cfg for RV32 only
146
146
/// get_byte() method retrieves a single pmp<x>cfg held in a PmpByte struct
147
147
pub mod pmpcfg1 {
148
148
use super :: { BitField , Permission , PmpByte , Range } ;
@@ -174,7 +174,7 @@ pub mod pmpcfg1 {
174
174
#[ cfg( riscv64) ]
175
175
assert ! ( index < 8 ) ;
176
176
177
- _write ( ( permission as usize ) << ( index * 8 ) ) ;
177
+ _set ( ( permission as usize ) << ( index * 8 ) ) ;
178
178
}
179
179
180
180
#[ inline]
@@ -185,7 +185,7 @@ pub mod pmpcfg1 {
185
185
#[ cfg( riscv64) ]
186
186
assert ! ( index < 8 ) ;
187
187
188
- _write ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
188
+ _set ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
189
189
}
190
190
191
191
#[ inline]
@@ -212,7 +212,7 @@ pub mod pmpcfg1 {
212
212
}
213
213
214
214
/// Physical memory protection configuration
215
- /// Pmpcf0 struct contains pmp8cfg - pmp11cfg for 32-bit arch , or pmp8cfg - pmp15cfg for 64-bit arch
215
+ /// Pmpcfg0 struct contains pmp8cfg - pmp11cfg for RV32 , or pmp8cfg - pmp15cfg for RV64
216
216
/// get_byte() method retrieves a single pmp<x>cfg held in a PmpByte struct
217
217
pub mod pmpcfg2 {
218
218
use super :: { BitField , Permission , PmpByte , Range } ;
@@ -244,7 +244,7 @@ pub mod pmpcfg2 {
244
244
#[ cfg( riscv64) ]
245
245
assert ! ( index < 8 ) ;
246
246
247
- _write ( ( permission as usize ) << ( index * 8 ) ) ;
247
+ _set ( ( permission as usize ) << ( index * 8 ) ) ;
248
248
}
249
249
250
250
#[ inline]
@@ -255,7 +255,7 @@ pub mod pmpcfg2 {
255
255
#[ cfg( riscv64) ]
256
256
assert ! ( index < 8 ) ;
257
257
258
- _write ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
258
+ _set ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
259
259
}
260
260
261
261
#[ inline]
@@ -281,8 +281,8 @@ pub mod pmpcfg2 {
281
281
}
282
282
}
283
283
284
- /// Physical memory protection configuration, RV32 only
285
- /// Pmpcf0 struct contains pmp12cfg - pmp15cfg for 32-bit arch only
284
+ /// Physical memory protection configuration
285
+ /// Pmpcfg0 struct contains pmp12cfg - pmp15cfg for RV32 only
286
286
/// get_byte() method retrieves a single pmp<x>cfg held in a PmpByte struct
287
287
pub mod pmpcfg3 {
288
288
use super :: { BitField , Permission , PmpByte , Range } ;
@@ -313,7 +313,7 @@ pub mod pmpcfg3 {
313
313
#[ cfg( riscv64) ]
314
314
assert ! ( index < 8 ) ;
315
315
316
- _write ( ( permission as usize ) << ( index * 8 ) ) ;
316
+ _set ( ( permission as usize ) << ( index * 8 ) ) ;
317
317
}
318
318
319
319
#[ inline]
@@ -324,7 +324,7 @@ pub mod pmpcfg3 {
324
324
#[ cfg( riscv64) ]
325
325
assert ! ( index < 8 ) ;
326
326
327
- _write ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
327
+ _set ( ( range as usize ) << ( 3 + ( index * 8 ) ) ) ;
328
328
}
329
329
330
330
#[ inline]
0 commit comments