Skip to content

Commit 2ebecad

Browse files
authored
hypervisor: align check_fault to 4-byte boundary (#658)
1 parent e9ccf54 commit 2ebecad

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

isa/hypervisor-svadu/2-stage_translation_implicit_store_error_hs.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ hstatus_init:
9595

9696
j fail # Should not reach here
9797

98+
# stvec.BASE must be 4-byte aligned. Enabling the C extension would
99+
# allow the label to land on a 2-byte boundary, so we align it explicitly.
100+
.align 2
98101
check_fault:
99102
# Check scause
100103
csrr t0, scause

isa/hypervisor/2-stage_translation_implicit_load_error_hs.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ hstatus_init:
8686

8787
j fail # Should not reach here
8888

89+
# stvec.BASE must be 4-byte aligned. Enabling the C extension would
90+
# allow the label to land on a 2-byte boundary, so we align it explicitly.
91+
.align 2
8992
check_fault:
9093
# Check scause
9194
csrr t0, scause

0 commit comments

Comments
 (0)