You are not logged in.

#1 2019-06-21 14:56:35

Asdew
Member
Registered: 2018-04-12
Posts: 7

[SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

I'm trying to use memory encryption with AMD SME (Secure Memory Encryption) on my Ryzen 5 2400G. I've added the mem_encrypt=on kernel parameter to the end of the "linux" line in GRUB2. This does not allow me to boot, but freezes at "Loading initial ramdisk". There is no disk activity. The motherboard is ASRock B450M Pro4.

According to /proc/cpuinfo AMD SME is supported by the processor and reading 0xC0010010 MSR shows bit 23 (SME supported bit) on.
Just to make sure, I've looked for options in the BIOS/UEFI Setup for an SME option, but I've only found TSME (Transparent SME) in there set as auto. I've tried it with both enabled and disabled.
I've tried the kernel versions 5.1.11 and 5.1.12, with 5.1.12 being my custom built kernel optimized for my processor. Both kernels have CONFIG_AMD_MEM_ENCRYPT and CONFIG_CRYPTO_DEV_SP_PSP set as yes.
I've tried 3 BIOS/UEFI Setup versions: P1.20, P2.00 and now P3.30.

Last edited by Asdew (2019-06-26 14:53:41)

Offline

#2 2019-06-21 18:32:15

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

If you blacklist using the kernel command line the amdgpu module does that have any effect?

Offline

#3 2019-06-21 18:43:56

Asdew
Member
Registered: 2018-04-12
Posts: 7

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

loqs wrote:

If you blacklist using the kernel command line the amdgpu module does that have any effect?

Blacklisting amdgpu had no effect on it.

Offline

#4 2019-06-21 18:50:17

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

Can you boot linux-hardened successfully?  That has

CONFIG_AMD_MEM_ENCRYPT=y
CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y
...
CONFIG_CRYPTO_DEV_SP_PSP=y

Offline

#5 2019-06-21 19:00:21

Asdew
Member
Registered: 2018-04-12
Posts: 7

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

loqs wrote:

Can you boot linux-hardened successfully?  That has

CONFIG_AMD_MEM_ENCRYPT=y
CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y
...
CONFIG_CRYPTO_DEV_SP_PSP=y

The linux-hardened kernel sadly has the same problem.

Offline

#6 2019-06-21 20:19:10

Asdew
Member
Registered: 2018-04-12
Posts: 7

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

I've just learnt that AMDGPU does not work with AMD SME, so I'm going to stop trying to get it working to use it, but I am still open to suggestions on how to fix this issue and I will try them just so if anyone else happens to have the same issue and solution.

May I just ask why AMDGPU doesn't work with AMD SME and is it something that could be patched?

Offline

#7 2019-06-21 21:00:59

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

I wonder why the boot with amdgpu blacklisted failed (was the amdgpu module builtin?)  https://bugs.archlinux.org/task/59463
Do you know of a patch for the issue?  Without any diagnostics or upstream support it would not appear to be easy to resolve.

Offline

#8 2019-06-21 21:41:38

Asdew
Member
Registered: 2018-04-12
Posts: 7

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

loqs wrote:

I wonder why the boot with amdgpu blacklisted failed (was the amdgpu module builtin?)  https://bugs.archlinux.org/task/59463
Do you know of a patch for the issue?  Without any diagnostics or upstream support it would not appear to be easy to resolve.

I just had to make sure that I hadn't done a typo in the blacklist kernel parameter, and yeah, I hadn't. AMDGPU is built as a module and not into the kernel. Also as far as I know, AMDGPU is loaded after saying systemd version and saying that the root filesystem is clean (I've got the boot quiet, so don't know the exact place, but it's right before getting into TTY)

Offline

#9 2019-06-26 14:53:26

Asdew
Member
Registered: 2018-04-12
Posts: 7

Re: [SOLVED] Freeze in loading initial ramdisk with mem_encrypt=on

Okay I've now heard that while the processor theoretically supports SME, the firmware does not have SME. Marking as solved.

Offline

Board footer

Powered by FluxBB