Hello @AARCH64_EL3 , thanks for these pointers, I was able to enable IOMMU & DMAR following these steps:
1. Download modGRUBShell.efi from github(.)com/datasone/grub-mod-setup_var/releases (or compile from source) and place it in a bootable usb, assuming your device is /dev/sda:
sudo wipefs -a /dev/sda
sudo parted /dev/sda mktable msdos
sudo parted /dev/sda mkpart primary fat32 0% 100%
sudo mkfs.fat -F 32 /dev/sda1
sudo parted /dev/sda set 1 boot on
sudo mount /dev/sda1 /mnt
sudo mkdir -p /mnt/EFI/BOOT
sudo cp ./modGRUBShell.efi /mnt/EFI/BOOT/bootx64.efi
2. Boot from usb, and when at grub prompt, issue the following 2 commands:
setup_var_cv AmdSetup 0xCA 0x1 0x1
setup_var_cv AmdSetup 0xCD 0x1 0x1
Note: It’s necessary to use setup_var_cv instead of setup_var since the variables are in a different varstore (0x5000 = AmdSetup) than the default
Now reboot, and both features will be enabled