[General] add cpu options to specify informations about cache sizes, etc.

This commit is contained in:
Antoine Viallon 2023-10-31 14:49:36 +01:00
parent 317ea5cff0
commit cba4091589
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -56,6 +56,33 @@ in
type = types.str;
};
caches = {
l1d = mkOption {
default = null;
example = 64;
description = "CPU L1 (data) cache size in kB";
type = with types; nullOr ints.positive;
};
l1i = mkOption {
default = null;
example = 64;
description = "CPU L1 (instruction) cache size in kB";
type = with types; nullOr ints.positive;
};
lastLevel = mkOption {
default = null;
example = 1024;
description = "Last-level (typ. L3) CPU cache size in kB";
type = with types; nullOr ints.positive;
};
cacheLine = mkOption {
default = null;
example = 64;
description = lib.mdDoc "Cache-line size in bytes (can be retrieved using `/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size`)";
type = with types; nullOr ints.positive;
};
};
x86 = {
level = mkOption {
default = 1;