Bobby R. Bruce
d42eeb6b68
cpu: Explicitly define cache_line_size -> 64-bit unsigned int ( #329 )
...
While it's plausible to define the cache_line_size as a 32-bit unsigned
int, the use of cache_line_size is way out of its original scope.
cache_line_size has been used to produce an address mask, which masking
out the offset bits from an address. For example, [1], [2], [3], and
[4]. However, since the cache_line_size is an "unsigned int", the type
of the value is not guaranteed to be 64-bit long. Subsequently, the bit
twiddling hacks in [1], [2], [3], and [4] produce 32-bit mask, i.e.,
0x00000000FFFFFFC0.
This behavior at least caused a problem in LLSC in RISC-V [5], where the
load reservation (LR) relies on the mask to produce the cache block
address. Two distinct 64-bit addresses can be mapped to the same cache
block using the above mask.
This patch explicitly defines cache_line_size as a 64-bit unsigned int
so the cache block mask can be produced correctly for 64-bit addresses.
[1]
3bdcfd6f7a/src/cpu/simple/atomic.hh (L147)
[2]
3bdcfd6f7a/src/cpu/simple/timing.hh (L224)
[3]
3bdcfd6f7a/src/cpu/o3/lsq_unit.cc (L241)
[4]
3bdcfd6f7a/src/cpu/minor/lsq.cc (L1425)
[5]
3bdcfd6f7a/src/arch/riscv/isa.cc (L787)
2023-10-16 07:50:35 -07:00
..
2023-10-10 21:47:07 -07:00
2022-11-29 23:44:38 +00:00
2022-11-22 04:56:14 +00:00
2023-10-10 14:01:58 -07:00
2023-10-14 06:39:50 -07:00
2023-10-10 21:47:07 -07:00
2023-03-03 02:05:49 +00:00
2023-03-03 02:05:49 +00:00
2023-03-03 02:05:49 +00:00
2023-06-29 15:11:19 +00:00
2023-06-29 15:11:19 +00:00
2023-10-10 14:01:58 -07:00
2023-06-29 15:11:19 +00:00
2023-06-29 15:11:19 +00:00
2023-06-29 15:11:19 +00:00
2022-11-22 04:55:58 +00:00
2023-02-03 06:11:45 +00:00
2023-01-12 06:41:54 +00:00
2022-11-29 23:44:38 +00:00
2023-02-03 06:11:45 +00:00
2022-11-22 04:56:29 +00:00
2022-08-03 09:10:41 +00:00
2023-08-15 00:41:42 -07:00
2023-02-03 06:11:45 +00:00
2021-07-06 09:59:11 +00:00
2023-02-03 06:11:45 +00:00
2023-10-10 14:01:58 -07:00
2023-05-26 20:08:00 +00:00
2023-05-25 19:14:46 +00:00
2023-05-26 03:58:44 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2023-03-21 06:53:55 +00:00
2021-07-09 11:24:10 +00:00
2023-02-03 06:11:45 +00:00
2021-07-09 11:24:10 +00:00
2023-03-21 06:53:55 +00:00
2021-07-09 11:24:10 +00:00
2023-02-03 06:11:45 +00:00
2021-07-09 11:24:10 +00:00
2023-10-10 14:01:58 -07:00
2023-10-10 14:01:58 -07:00
2023-03-29 08:19:08 +00:00
2023-03-29 08:19:08 +00:00
2023-03-29 08:19:08 +00:00
2023-10-10 21:47:07 -07:00
2021-07-01 19:08:24 +00:00
2023-02-03 06:11:45 +00:00
2021-07-29 10:17:51 +00:00
2023-02-03 06:11:45 +00:00
2022-08-03 09:10:41 +00:00
2022-11-29 23:44:38 +00:00
2023-05-26 20:08:00 +00:00
2023-05-26 20:08:00 +00:00
2023-05-26 20:08:00 +00:00
2022-06-06 18:31:06 +00:00
2022-06-06 18:31:06 +00:00
2022-08-03 09:10:41 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2022-08-03 09:10:41 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2023-02-03 06:11:45 +00:00
2021-08-21 00:54:54 +00:00
2021-07-06 09:59:11 +00:00
2023-07-26 17:34:24 +02:00
2023-05-26 20:08:00 +00:00
2023-02-03 06:11:45 +00:00
2021-07-01 19:08:24 +00:00
2022-06-06 18:31:06 +00:00
2023-05-26 20:08:00 +00:00
2021-07-01 19:08:24 +00:00
2022-11-29 23:44:38 +00:00
2023-10-10 14:01:58 -07:00
2022-11-29 23:44:38 +00:00
2023-10-10 14:01:58 -07:00
2021-09-21 02:05:32 +00:00
2023-08-15 00:41:42 -07:00
2023-02-03 06:11:45 +00:00
2023-05-26 20:08:00 +00:00
2022-06-06 18:31:06 +00:00
2023-10-10 14:01:58 -07:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2022-11-01 05:51:20 +00:00
2023-08-19 22:50:53 +00:00
2021-10-22 21:43:02 +00:00
2021-10-22 21:43:02 +00:00
2022-03-30 05:18:52 +00:00
2022-03-30 05:18:52 +00:00
2023-09-20 14:00:45 -07:00
2023-09-20 14:00:45 -07:00
2023-02-03 06:11:45 +00:00
2023-02-03 06:11:45 +00:00
2023-02-03 06:11:45 +00:00
2023-02-03 06:11:45 +00:00
2023-08-15 00:38:29 -07:00
2023-08-15 00:40:29 -07:00
2022-11-29 23:44:38 +00:00
2023-02-03 06:11:45 +00:00
2023-10-04 19:11:01 +02:00
2023-06-29 15:11:19 +00:00
2021-07-07 21:37:15 +00:00
2021-10-22 21:43:02 +00:00
2021-10-22 21:43:02 +00:00
2023-02-03 06:11:45 +00:00
2021-07-01 19:08:24 +00:00
2022-11-29 23:44:38 +00:00
2023-04-24 23:30:01 +00:00
2023-04-11 07:34:32 +00:00
2022-08-03 09:10:41 +00:00
2023-02-03 06:11:45 +00:00
2022-11-22 04:56:29 +00:00
2022-08-03 09:10:41 +00:00
2022-10-10 17:24:03 +00:00
2023-09-20 14:16:46 -07:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2023-02-03 06:11:45 +00:00
2023-02-03 06:11:45 +00:00
2022-08-24 21:47:07 +00:00
2023-02-08 00:27:54 +00:00
2023-02-08 00:27:54 +00:00
2022-10-31 01:05:16 +00:00
2021-12-11 04:00:56 +00:00
2023-02-03 06:11:45 +00:00
2023-02-03 06:11:45 +00:00
2021-07-01 19:08:24 +00:00
2023-08-15 12:40:45 -07:00
2023-08-15 12:40:45 -07:00
2021-10-14 20:49:23 +00:00
2022-01-20 01:16:02 +00:00
2023-08-15 00:41:42 -07:00
2023-08-15 00:41:42 -07:00
2022-11-29 23:44:38 +00:00