From cf3234a093244f09a976b469ebfa2964f9ebe951 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Wed, 8 Dec 2021 17:49:09 -0800 Subject: [MTE] Add interface to communicate MTE status to bootloader. We can use this interface to instruct the bootloader to either permanently or only for the next reboot enable MTE for userspace or kernel. Bug: 206895651 Change-Id: I7330e43b7c4f94fc5913a7bc0f667b6eab06e111 --- bootloader_message/bootloader_message.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bootloader_message/bootloader_message.cpp') diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp index b70d54e5c..1ea56cd4e 100644 --- a/bootloader_message/bootloader_message.cpp +++ b/bootloader_message/bootloader_message.cpp @@ -304,6 +304,16 @@ bool WriteMiscVirtualAbMessage(const misc_virtual_ab_message& message, std::stri offsetof(misc_system_space_layout, virtual_ab_message), err); } +bool ReadMiscMemtagMessage(misc_memtag_message* message, std::string* err) { + return ReadMiscPartitionSystemSpace(message, sizeof(*message), + offsetof(misc_system_space_layout, memtag_message), err); +} + +bool WriteMiscMemtagMessage(const misc_memtag_message& message, std::string* err) { + return WriteMiscPartitionSystemSpace(&message, sizeof(message), + offsetof(misc_system_space_layout, memtag_message), err); +} + extern "C" bool write_reboot_bootloader(void) { std::string err; return write_reboot_bootloader(&err); -- cgit v1.2.3