Skip to content

Commit 6704f0d

Browse files
committed
fix(port_arm): CCSIDR::LineSize is log₂(word count), not log₂(byte count)
1 parent 22fde3e commit 6704f0d

File tree

1 file changed

+1
-1
lines changed
  • src/constance_port_arm/src/startup

1 file changed

+1
-1
lines changed

src/constance_port_arm/src/startup/imp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ extern "C" fn reset_handler1<System: EntryPoint + StartupOptions>() {
102102
unsafe { llvm_asm!("isb") };
103103

104104
let cssidr = arm::CCSIDR.extract();
105-
let log2_line_size = cssidr.read(arm::CCSIDR::LineSize) + 2;
105+
let log2_line_size = cssidr.read(arm::CCSIDR::LineSize) + 4;
106106
let max_way_index = cssidr.read(arm::CCSIDR::Associativity);
107107
let max_set_index = cssidr.read(arm::CCSIDR::NumSets);
108108

0 commit comments

Comments
 (0)