Skip to content

Commit

Permalink
Update MTE linux test to check for MTE2 and MTE3 feature (#462)
Browse files Browse the repository at this point in the history
Change-Id: I73f6fe52e22724f2c46ae1ce2f9ef27a136e732e

Signed-off-by: Ajayswar S <ajayswar.s@arm.com>
  • Loading branch information
ajayswar-s authored May 20, 2024
1 parent 6fe46b1 commit e52a8d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions linux_app/mte/test_mte.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2023 Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2023-2024, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -29,6 +29,7 @@
#define TEST_DESC "Check for MTE support "

#define HWCAP2_MTE (1 << 18)
#define HWCAP2_MTE3 (1 << 22)
#define PROT_MTE 0x20
#define PR_SET_TAGGED_ADDR_CTRL 55
#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
Expand Down Expand Up @@ -66,8 +67,8 @@ uint32_t payload(void)
uint64_t timeout = 100000;

/* check if MTE is supported */
if (!(hwcap2 & HWCAP2_MTE)) {
perror("\n Memory tagging extension(MTE) not supported.");
if (!((hwcap2 & HWCAP2_MTE) || (hwcap2 & HWCAP2_MTE3))) {
perror("\n Memory tagging extension(MTE2 and MTE3) not supported.");
return EXIT_SKIPPED;
}

Expand Down

0 comments on commit e52a8d2

Please sign in to comment.