Skip to content

Commit

Permalink
mem-encryption-tests: init at 0-master-2022-12-07
Browse files Browse the repository at this point in the history
  • Loading branch information
lynatic1337 committed Oct 25, 2024
1 parent 6792739 commit d464a1d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pkgs/os-specific/linux/mem-encryption-tests/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ lib, stdenv, fetchFromGitHub, linuxPackages, kernel ? linuxPackages.kernel }:

stdenv.mkDerivation {
pname = "mem-encryption-tests";
version = "0-master-2022-12-07";

src = fetchFromGitHub {
owner = "AMDESE";
repo = "mem-encryption-tests";
rev = "7abb072ffc50ceb0b4145ae84105ce6c91bd1ff4";
sha256 = "sha256:1i4x1ar05yjaw03997l530f87xfj1b2qhh2kiw42swisb8d80hmz";
};

nativeBuildInputs = kernel.moduleBuildDependencies;

makeFlags = kernel.makeFlags ++ [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"INSTALL_MOD_PATH=$(out)"
];

installPhase = ''
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra
cp tsme-test.ko $out/lib/modules/${kernel.modDirVersion}/extra
'';

meta = with lib; {
description = "Tests related to AMD Memory Encryption";
license = licenses.gpl2;
maintainers = with maintainers; [ lyn ];
platforms = platforms.linux;
longDescription = ''
This includes:
tsme-test - A loadable kernel module that can be used to determine the state of TSME.
'';
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/linux-kernels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ in {

msi-ec = callPackage ../os-specific/linux/msi-ec { };

mem-encryption-tests = callPackage ../os-specific/linux/mem-encryption-tests { };

} // lib.optionalAttrs config.allowAliases {
ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18;
hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30
Expand Down

0 comments on commit d464a1d

Please sign in to comment.