
Extend MTE gdbstub tests to also run in system mode (share tests between user mode and system mode). The tests will only run if a version of GDB that supports MTE on baremetal is available in the test environment and if available compiler supports the 'memtag' flag (-march=armv8.5-a+memtag). For the tests running in system mode, a page that supports MTE ops. is necessary. Therefore, an MTE-enabled page is made available (mapped) in the third 2 MB chunk of the second 1 GB space in the flat mapping set in boot.S. A new binary, mte.S, is also introduced for the tests. It links against boot.S and is executed by QEMU in system mode. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> Message-Id: <20240906143316.657436-6-gustavo.romero@linaro.org> [AJB: fix stray _] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240910173900.4154726-11-alex.bennee@linaro.org>
34 lines
793 B
Plaintext
34 lines
793 B
Plaintext
ENTRY(__start)
|
|
|
|
MEMORY {
|
|
/* On virt machine RAM starts at 1 GiB. */
|
|
|
|
/* Align text and rodata to the 1st 2 MiB chunk. */
|
|
TXT (rx) : ORIGIN = 1 << 30, LENGTH = 2M
|
|
/* Align r/w data to the 2nd 2 MiB chunk. */
|
|
DAT (rw) : ORIGIN = (1 << 30) + 2M, LENGTH = 2M
|
|
/* Align the MTE-enabled page to the 3rd 2 MiB chunk. */
|
|
TAG (rw) : ORIGIN = (1 << 30) + 4M, LENGTH = 2M
|
|
}
|
|
|
|
SECTIONS {
|
|
.text : {
|
|
*(.text)
|
|
*(.rodata)
|
|
} >TXT
|
|
.data : {
|
|
*(.data)
|
|
*(.bss)
|
|
} >DAT
|
|
.tag : {
|
|
/*
|
|
* Symbol 'mte_page' is used in boot.S to setup the PTE and in the mte.S
|
|
* test as the address that the MTE instructions operate on.
|
|
*/
|
|
mte_page = .;
|
|
} >TAG
|
|
/DISCARD/ : {
|
|
*(.ARM.attributes)
|
|
}
|
|
}
|