@@ -289,10 +289,7 @@ NOTE: Reserved bits must be 0 in valid capabilities.
289
289
290
290
ifdef::cheri_v9_annotations[]
291
291
NOTE: *CHERI v9 Note:* The encoding changes eliminate the concept of the
292
- in-memory format, and also increase precision for RV32. When EF=0, T and B
293
- are now shifted right rather than left within the address. Also, the bounds
294
- decoding for XLENMAX=32 uses a trick (see bit T8) to save one bit when encoding
295
- the exponent.
292
+ in-memory format, and also increase precision for RV32.
296
293
endif::[]
297
294
298
295
The components of a capability are encoded as shown in
@@ -323,6 +320,22 @@ simply a place-holder while the Sail implementation is available. In this
323
320
notation, / means "integer division", [] are the bit-select operators, and
324
321
arithmetic is signed.#
325
322
323
+ ifdef::cheri_v9_annotations[]
324
+ NOTE: *CHERI v9 Note:* The IE bit from CHERI v9 is renamed EF and its value is
325
+ inverted to ensure that the <<NULL>> capability is encoded as zero without the
326
+ need for CHERI v9's in-memory format. +
327
+ When EF=1, the exponent E=0, so the address bits a[MW - 1:0] are replaced
328
+ with T and B to form the top and base addresses respectively. +
329
+ When EF=0, the exponent `E=CAP_MAX_E - ( (XLENMAX == 32) ? { T8, TE, BE } : { TE, BE } )`,
330
+ so the address bits a[E + MW - 1:E] are replaced with T and B to form the top
331
+ and base addresses respectively. E is computed by subtracting from the maximum
332
+ possible exponent CAP_MAX_E which can be efficiently implemented in hardware
333
+ assuming that T and B are at bit CAP_MAX_E and performing a logical bitwise
334
+ shift right by E. In contrast, CHERI v9 implementations computed the top and
335
+ base addresses by assumming that T and B are at bit 0 and performing a logical
336
+ bitwise shift left by E.
337
+ endif::[]
338
+
326
339
```
327
340
EW = (XLENMAX == 32) ? 5 : 6
328
341
CAP_MAX_E = XLENMAX - MW + 2
0 commit comments