For AMD SEV determine C-bit position and guest mode in locore0.
authorbluhm <bluhm@openbsd.org>
Sun, 21 Jul 2024 19:41:31 +0000 (19:41 +0000)
committerbluhm <bluhm@openbsd.org>
Sun, 21 Jul 2024 19:41:31 +0000 (19:41 +0000)
commit72a0fbccc5614cd17790b645bf66f82f63c67207
treebebb11dd3935b35c0cd0bbd6d3656218e409a01f
parentd2974a1ee265780eb8e946e1dbe560fba3db4530
For AMD SEV determine C-bit position and guest mode in locore0.

Actually determine the C-bit position if we are running as a guest
with SEV enabled.  Configure pg_crypt, pg_frame and pg_lgframe
accordingly, using the physical address bit reduction provided by
cpuid.

from hshoexer@; OK mlarkin@
sys/arch/amd64/amd64/cpu.c
sys/arch/amd64/amd64/locore0.S
sys/arch/amd64/amd64/pmap.c
sys/arch/amd64/include/cpu.h
sys/arch/amd64/include/specialreg.h