Skip to content

Commit

Permalink
Refactoring of code because of merge with newest tiiuae Ghaf
Browse files Browse the repository at this point in the history
- changes concern activation and deactivation of virtualised elements
  in passthough of uarta, bpmp, gpio.
- code deactivates uarta and bpmp because bpmp kernel patches conflict
  with gpio patches. This could be fixed by remaking the bpmp patches.
  • Loading branch information
KimGSandstrom committed Apr 10, 2024
1 parent af3ecf2 commit 1097d35
Show file tree
Hide file tree
Showing 8 changed files with 775 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
config,
...
}: let
cfg = config.ghaf.hardware.nvidia.virtualization;
cfg = config.ghaf.hardware.nvidia.virtualization.host.bpmp;
in {
config = lib.mkIf cfg.enable {
boot.kernelPatches = [
/* configure kernel in modules/hardware/nvidia-jetson-orin/virtualization/default.nix for all virtualisation
* TODO: differentiate config
{
name = "Added Configurations to Support Vda";
patch = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
config,
...
}: let
cfg = config.ghaf.hardware.nvidia.virtualization;
cfg = config.ghaf.hardware.nvidia.virtualization.host.gpio;
in {
config = lib.mkIf cfg.enable {
boot.kernelPatches = [
/* configure kernel in modules/hardware/nvidia-jetson-orin/virtualization/default.nix for all virtualisation
* TODO: differentiate config
{
name = "Added Configurations to Support GPIO passthrough";
patch = null;
Expand All @@ -31,21 +32,25 @@ in {
TEGRA_GPIO_HOST_PROXY = lib.mkDefault lib.kernel.yes;
};
}
*/
*/
/* This patch is not needed because of the kernel parameters
{
name = "Vfio_platform Reset Required False";
patch = ./patches/0002-vfio_platform-reset-required-false.patch;
}
*/
# patching the kernel for gpio passthrough
{
name = "GPIO Support Virtualization";
patch = ./patches/0003-gpio-virt-kernel.patch;
}
# patching the custom GPIO kernel modules
{
name = "GPIO Virt Drivers";
patch = ./patches/0004-gpio-virt-drivers.patch;
}
/*
# the driver is implemeted as an overlay file not a patch file -- remove patch file
# the driver is implemeted as an overlay file not a patch file -- don't use patch file
{
name = "GPIO Overlay";
patch = ./patches/0005-gpio-overlay.patch; # source file patch
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2022-2023 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
(_final: prev: {
qemu = prev.qemu.overrideAttrs (_final: prev: {
patches =
prev.patches
++ [
./patches/0001-qemu-v8.1.3_bpmp-virt.patch
];
});
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2022-2023 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
(_final: prev: {
qemu = prev.qemu.overrideAttrs (_final: prev: {
patches =
prev.patches
++ [
./patches/0001-qemu-v8.1.3_gpio-virt.patch
];
});
})
Loading

0 comments on commit 1097d35

Please sign in to comment.