Skip to content

Commit

Permalink
add LAM basic test cases.
Browse files Browse the repository at this point in the history
Signed-off-by: Xuelian Guo <[email protected]>
  • Loading branch information
gxl8483336 authored and ysun committed Sep 24, 2024
1 parent 9b9c541 commit 803d102
Show file tree
Hide file tree
Showing 5 changed files with 1,381 additions and 0 deletions.
12 changes: 12 additions & 0 deletions BM/lam/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) 2024 Intel Corporation.

CC = gcc
CFLAGS = -D_GNU_SOURCE -lpthread -m64 -O2
TARGET = lam

$(TARGET): lam.c
$(CC) $(CFLAGS) -o $@ $<

clean:
rm -f $(TARGET)
28 changes: 28 additions & 0 deletions BM/lam/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# LAM

## Description
Linear Address Masking (LAM) is a new feature in the latest Intel platform Sierra Forest.
LAM modifies the checking that is applied to 64-bit linear addresses, allowing software
to use of the untranslated address bits for metadata.
This test suite provides basic functional check to ensure LAM works properly.

## Usage
```
make
# To run a specific case
./lam -t <testcase_id>
(for example, cpuid) ./lam -t 0x80
```
Test results (PASS or FAIL) will be printed out.

## Testcase ID
| Case ID | Case Name |
| ------ | ---------------------------- |
| 0x1 | malloc |
| 0x2 | max_bits |
| 0x4 | mmap |
| 0x8 | syscall |
| 0x10 | io_uring |
| 0x20 | inherit |
| 0x40 | pasid |
| 0x80 | cpuid |
Loading

0 comments on commit 803d102

Please sign in to comment.