On 8/8/24 15:15, Gustavo Romero wrote:
diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S
index 501685d0ec..79a2ada74a 100644
--- a/tests/tcg/aarch64/system/boot.S
+++ b/tests/tcg/aarch64/system/boot.S
@@ -135,6 +135,17 @@ __start:
orr x1, x1, x3
str x1, [x2] /* 2nd 2mb (.data & .bss)*/
+ /* Third block: .mte_page */
+ adrp x1, .mte_page
+ add x1, x1, :lo12:.mte_page
+ bic x1, x1, #(1 << 21) - 1
A bit silly to add in the low 12 bits and then mask them out again immediately.
I see that's common silliness with the other two ptes.
diff --git a/tests/tcg/aarch64/system/kernel.ld
b/tests/tcg/aarch64/system/kernel.ld
index 7b3a76dcbf..7c00c1c378 100644
--- a/tests/tcg/aarch64/system/kernel.ld
+++ b/tests/tcg/aarch64/system/kernel.ld
@@ -18,6 +18,11 @@ SECTIONS
.bss : {
*(.bss)
}
+ /* align MTE section to next (third) 2mb */
+ . = ALIGN(1 << 22);
+ .mte : {
+ *(.mte_page)
+ }
This is likely to add 2mb of useless stuff to the image.
Maybe better to just define a symbol:
mte_page = ALIGN(1 << 22);
and reference that instead.
Otherwise this looks good.
r~