Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sev guest cannot boot correctly #3

Closed
seedindream opened this issue Jan 12, 2018 · 4 comments
Closed

sev guest cannot boot correctly #3

seedindream opened this issue Jan 12, 2018 · 4 comments

Comments

@seedindream
Copy link

seedindream commented Jan 12, 2018

I followed the instructions and no error during the installation.
I can successfully launch guest vm using

sudo ./launch-qemu.sh -hda ubuntu-img.qcow2 -nosev -vnc 1

and I install the kernel image for the guest VM
linux-image-4.15.0-rc1-kvm_4.15.0-rc1-kvm-1_amd64.deb
But when I try to launch SEV enabled guest using

sudo ./launch-qemu.sh -hda -vnc 1

There is some error output:
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7F6E32C0
Loading driver at 0x0007FB85000 EntryPoint=0x0007FB8542D AmdSevDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F6E3598
ProtectUefiImageCommon - 0x7F6E32C0

  • 0x000000007FB85000 - 0x0000000000002A40
    !!!! X64 Exception Type - 0E(#PF - Page-Fault) CPU Apic ID - 00000000 !!!!
    ExceptionData - 0000000000000003 I:0 R:0 U:0 W:1 P:1 PK:0 S:0
    RIP - 000000007FB86AE6, CS - 0000000000000038, RFLAGS - 0000000000010006
    RAX - 000000007F6E2000, RCX - 0000800000200000, RDX - 00000000001FF003
    RBX - 0000800000000003, RSP - 000000007FE71BC0, RBP - 0000800000200000
    RSI - 000000007FC03000, RDI - 0000800000000000
    R8 - 000000007F6E1000, R9 - 0000000000001000, R10 - 00000000000003FD
    R11 - 00000000000003F8, R12 - 000080007F6E1003, R13 - 000000007FC03000
    R14 - 42146F0205AD3401, R15 - 42146F0205AD34BA
    DS - 0000000000000008, ES - 0000000000000008, FS - 0000000000000008
    GS - 0000000000000008, SS - 0000000000000008
    CR0 - 0000000080010033, CR2 - 000000007FC03000, CR3 - 000000007FC01000
    CR4 - 0000000000000668, CR8 - 0000000000000000
    DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
    DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
    GDTR - 000000007FECE8E0 0000000000000047, LDTR - 0000000000000000
    IDTR - 000000007FBFF008 00000000000001FF, TR - 0000000000000000
    FXSAVE_STATE - 000000007FE71820
    !!!! Find image based on IP(0x7FB86AE6) /home/user/AMDSEV/src/edk2/Build/Ovmf3264/DEBUG_GCC5/X64/OvmfPkg/AmdSevDxe/AmdSevDxe/DEBUG/AmdSevDxe.dll (ImageBase=000000007FB85000, EntryPoint=000000007FB8542D) !!!!

I have also checked the output when I use command

sudo ./launch-qemu.sh -hda ubuntu-img.qcow2 -nosev -vnc 1

There is also an unsupported error, but I can successfully launch the guest vm without sev.

Loading driver at 0x0007FB85000 EntryPoint=0x0007FB8542D AmdSevDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F6E3598
ProtectUefiImageCommon - 0x7F6E32C0

  • 0x000000007FB85000 - 0x0000000000002A40
    Error: Image at 0007FB85000 start failed: Unsupported

I have checked SYSCFG and when I use

sudo rdmsr 0xC0010010 -a

The return values are all f40000
Also the cpuid return
0x8000001f 0x00: eax=0x0000000f ebx=0x0000016f ecx=0x0000000f edx=0x00000001
The cpu model is AMD EPYC 7251 8-Core Processor.
Could someone help me to figure out where is wrong.
Thank you for your time and patience.

@sbrijesh
Copy link
Contributor

One of recent EDK2 commit broke the SEV support. I have root caused it and submitted a patch to fix the issue. Can you please apply the patch from here and let me know if you still have trouble.

https://lists.01.org/pipermail/edk2-devel/2018-January/020030.html

@seedindream
Copy link
Author

seedindream commented Jan 13, 2018

I apply the patch and the problem wasn't solved.
Also, I create another qcow2 file and try to launch another vm by using command

sudo ./launch-qemu.sh -hda vm2/ubuntu-img-2.qcow2 -nosev -cdrom ../../../ubuntu-16.04.3-desktop-amd64.iso -vnc 2
[Bds]=============Begin Load Options Dumping ...=============
Driver Options:
SysPrep Options:
Boot Options:
Boot0008: ubuntu 0x0001
Boot0000: UiApp 0x0109
Boot0001: UEFI Floppy 0x0001
Boot0002: UEFI Floppy 2 0x0001
Boot0004: UEFI QEMU DVD-ROM QM00003 0x0001
Boot0006: UEFI PXEv4 (MAC:525400123456) 0x0001
Boot0007: EFI Internal Shell 0x0001
Boot0003: UEFI QEMU DVD-ROM QM00001 0x0001
Boot0005: UEFI QEMU HARDDISK QM00002 0x0001
PlatformRecovery Options:
PlatformRecovery0000: Default PlatformRecovery 0x0001
[Bds]=============End Load Options Dumping=============
[Bds]BdsWait ...Zzzzzzzzzzzz...
[Bds]Exit the waiting!
[Bds]Stop Hotkey Service!
[Bds]UnregisterKeyNotify: 000C/0000 Success
[Bds]UnregisterKeyNotify: 0017/0000 Success
[Bds]UnregisterKeyNotify: 0000/000D Success
Memory Previous Current Next
Type Pages Pages Pages
====== ======== ======== ========
0A 00000004 00000022 0000002A
09 00000008 0000000B 0000000D
00 00000004 00000030 0000003C
06 00000024 000000C2 000000F2
05 00000030 00000041 00000051
03 00000180 0000035A 00000430
04 00000F00 00000D90 00000F00
Memory Type Information settings change.
[Bds]Booting ubuntu
BlockSize : 2048
LastBlock : BD41F
PartitionValidMbr: Bad MBR partition size EndingLBA(2DF31B) > LastLBA(BD41F)
FatOpenDevice: read of part_lba failed No Media
FatOpenDevice: read of part_lba failed No Media
SataControllerStart START
SataControllerStart error return status = Already started
BlockSize : 2048
LastBlock : BD41F
PartitionValidMbr: Bad MBR partition size EndingLBA(2DF31B) > LastLBA(BD41F)
BlockSize : 2048
LastBlock : 3
BlockSize : 2048
LastBlock : 0
FatOpenDevice: read of part_lba failed No Media
BlockSize : 512
LastBlock : 3BFFFFF
FatOpenDevice: read of part_lba failed No Media
FatOpenDevice: read of part_lba failed No Media
SataControllerStart START
SataControllerStart error return status = Already started
BlockSize : 2048
LastBlock : BD41F
PartitionValidMbr: Bad MBR partition size EndingLBA(2DF31B) > LastLBA(BD41F)
BlockSize : 2048
LastBlock : 3
BlockSize : 2048
LastBlock : 0
FatOpenDevice: read of part_lba failed No Media
BlockSize : 512
LastBlock : 3BFFFFF
FatOpenDevice: read of part_lba failed No Media
FatOpenDevice: read of part_lba failed No Media
BlockSize : 512
LastBlock : 3BFFFFF
BlockSize : 2048
LastBlock : BD41F
PartitionValidMbr: Bad MBR partition size EndingLBA(2DF31B) > LastLBA(BD41F)
BlockSize : 2048
LastBlock : 3
BlockSize : 2048
LastBlock : 0
FatOpenDevice: read of part_lba failed No Media
BlockSize : 2048
LastBlock : 3
[Bds] Expand HD(1,GPT,582D7D68-D8AD-45BB-AA33-223FCA9C24F0,0x800,0x100000)/\EFI\ubuntu\shimx64.efi ->
Memory Previous Current Next
Type Pages Pages Pages
====== ======== ======== ========
0A 00000004 00000022 0000002A
09 00000008 0000000B 0000000D
00 00000004 00000030 0000003C
06 00000024 000000C2 000000F2
05 00000030 00000041 00000051
03 00000180 0000035A 00000430
04 00000F00 00000D98 00000F00
Memory Type Information settings change.
[Bds]Booting UEFI Floppy
FatOpenDevice: read of part_lba failed No Media
FatOpenDevice: read of part_lba failed No Media
[Bds] Expand PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x0) ->
Memory Previous Current Next
Type Pages Pages Pages
====== ======== ======== ========
0A 00000004 00000022 0000002A
09 00000008 0000000B 0000000D
00 00000004 00000030 0000003C
06 00000024 000000C2 000000F2
05 00000030 00000041 00000051
03 00000180 0000035A 00000430
04 00000F00 00000D98 00000F00
Memory Type Information settings change.
[Bds]Booting UEFI Floppy 2
FatOpenDevice: read of part_lba failed No Media
FatOpenDevice: read of part_lba failed No Media
[Bds] Expand PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x1) ->
Memory Previous Current Next
Type Pages Pages Pages
====== ======== ======== ========
0A 00000004 00000022 0000002A
09 00000008 0000000B 0000000D
00 00000004 00000030 0000003C
06 00000024 000000C2 000000F2
05 00000030 00000041 00000051
03 00000180 0000035A 00000430
04 00000F00 00000D98 00000F00
Memory Type Information settings change.
[Bds]Booting UEFI QEMU DVD-ROM QM00003
FatOpenDevice: read of part_lba failed No Media
BlockSize : 2048
LastBlock : 0
FatOpenDevice: read of part_lba failed No Media
[Bds] Expand PciRoot(0x0)/Pci(0x1,0x1)/Ata(Secondary,Master,0x0) ->
Memory Previous Current Next
Type Pages Pages Pages
====== ======== ======== ========
0A 00000004 00000022 0000002A
09 00000008 0000000B 0000000D
00 00000004 00000030 0000003C
06 00000024 000000C2 000000F2
05 00000030 00000041 00000051
03 00000180 0000035A 00000430
04 00000F00 00000D98 00000F00
Memory Type Information settings change.
[Bds]Booting UEFI PXEv4 (MAC:525400123456)

Start PXE over IPv4InstallProtocolInterface: 245DCA21-FB7B-11D3-8F01-00A0C969723B 7EDA60E0
.MnpAddFreeTxBuf: Add TxBufWrap 7EFED018, TxBuf 7EFED041
MnpAddFreeTxBuf: Add TxBufWrap 7EFED698, TxBuf 7EFED6C1
MnpAddFreeTxBuf: Add TxBufWrap 7EFEC018, TxBuf 7EFEC041
MnpAddFreeTxBuf: Add TxBufWrap 7EFEC698, TxBuf 7EFEC6C1
MnpAddFreeTxBuf: Add TxBufWrap 7EFEB018, TxBuf 7EFEB041
MnpAddFreeTxBuf: Add TxBufWrap 7EFEB698, TxBuf 7EFEB6C1
MnpAddFreeTxBuf: Add TxBufWrap 7EFEA018, TxBuf 7EFEA041
MnpAddFreeTxBuf: Add TxBufWrap 7EFEA698, TxBuf 7EFEA6C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED93018, TxBuf 7ED93041
MnpAddFreeTxBuf: Add TxBufWrap 7ED93698, TxBuf 7ED936C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED92018, TxBuf 7ED92041
MnpAddFreeTxBuf: Add TxBufWrap 7ED92698, TxBuf 7ED926C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED91018, TxBuf 7ED91041
MnpAddFreeTxBuf: Add TxBufWrap 7ED91698, TxBuf 7ED916C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED90018, TxBuf 7ED90041
MnpAddFreeTxBuf: Add TxBufWrap 7ED90698, TxBuf 7ED906C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED8F018, TxBuf 7ED8F041
MnpAddFreeTxBuf: Add TxBufWrap 7ED8F698, TxBuf 7ED8F6C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED8E018, TxBuf 7ED8E041
MnpAddFreeTxBuf: Add TxBufWrap 7ED8E698, TxBuf 7ED8E6C1
MnpAddFreeTxBuf: Add TxBufWrap 7ED8D018, TxBuf 7ED8D041
MnpAddFreeTxBuf: Add TxBufWrap 7ED8D698, TxBuf 7ED8D6C1
MnpAddFreeTxBuf: Add TxBufWrap 7EC82018, TxBuf 7EC82041
MnpAddFreeTxBuf: Add TxBufWrap 7EC82698, TxBuf 7EC826C1
MnpAddFreeTxBuf: Add TxBufWrap 7EC81018, TxBuf 7EC81041
MnpAddFreeTxBuf: Add TxBufWrap 7EC81698, TxBuf 7EC816C1
MnpAddFreeTxBuf: Add TxBufWrap 7EC80018, TxBuf 7EC80041
MnpAddFreeTxBuf: Add TxBufWrap 7EC80698, TxBuf 7EC806C1
MnpAddFreeTxBuf: Add TxBufWrap 7EC7F018, TxBuf 7EC7F041
MnpAddFreeTxBuf: Add TxBufWrap 7EC7F698, TxBuf 7EC7F6C1
MnpAddFreeTxBuf: Add TxBufWrap 7EC7E018, TxBuf 7EC7E041
MnpAddFreeTxBuf: Add TxBufWrap 7EC7E698, TxBuf 7EC7E6C1
PXE-E18: Server response timeout.
[Bds] Expand PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1) ->
Memory Previous Current Next
Type Pages Pages Pages
====== ======== ======== ========
0A 00000004 00000022 0000002A
09 00000008 0000000B 0000000D
00 00000004 00000030 0000003C
06 00000024 000000C2 000000F2
05 00000030 00000041 00000051
03 00000180 0000035A 00000430
04 00000F00 00000DA2 00000F00
Memory Type Information settings change.
[Bds]Booting EFI Internal Shell
[Bds] Expand Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1) -> Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EFEBD40
Loading driver at 0x0007E769000 EntryPoint=0x0007E7AE66C Shell.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EDB7D18
ProtectUefiImageCommon - 0x7EFEBD40

  • 0x000000007E769000 - 0x00000000000E1540

UEFI Interactive Shell v2.287477C2-69C7-11D2-8E39-00A0C969723B 7EC7ABA0
EDK IIlProtocolInterface: 752F3136-4E16-4FDC-A22A-E5F46812F4CA 7EC7DF98
UEFI v2.70 (EDK II, 0x00010000)008-7F9B-4F30-87AC-60C9FEF5DA4E 7E844CE0
Mapping table
FS0: Alias(s):CD1a1:;BLK4:
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)/CDROM(0x1)
BLK0: Alias(s):
PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x0)
BLK1: Alias(s):
PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x1)
BLK5: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)
BLK2: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)
BLK3: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)/CDROM(0x0)
BLK6: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)
Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell> Io: Cache Page OutBound occurred!

This problem didn't happen when I launch first VM and the first VM can successful boot now without sev.
I wonder if there is something I can provide to help figure out the problem. Thanks!

@seedindream
Copy link
Author

Also some information about cannot boot successful with sev.
output right before "!!!! X64 Exception Type - 0E(#PF - Page-Fault) CPU Apic ID - 00000000 !!!!" in MEMFD.fd

/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Event/Timer.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c(GetPermissionAttributeForMemoryType (EfiBootServicesCode) & 0x0000000000004000ULL) == 0/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c(GetPermissionAttributeForMemoryType (EfiRuntimeServicesCode) & 0x0000000000004000ULL) == 0(GetPermissionAttributeForMemoryType (EfiLoaderCode) & 0x0000000000004000ULL) == 0GetPermissionAttributeForMemoryType (EfiBootServicesData) == GetPermissionAttributeForMemoryType (EfiConventionalMemory)VectorInfo != ((void *) 0)/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
%a Arch Protocol not present!!
CR has Bad Signature/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.cDriver %g was discovered but not loaded!!
SecurityCPUMetronomeBdsWatchdog TimerRuntimeVariableVariable WriteCapsuleMonotonic CounterResetReal Time Clock��D���AcpiTimerLibConstructorgEfiCurrentTpl < 16LoadImageEx: Parent handle not an image handle
gSecurity != ((void *) 0)Image type %s can't be loaded on %s UEFI system.
LOADING MODULE FIXED INFO: Loading module at fixed address 0x%11p. Status = %r
LOADING MODULE FIXED ERROR: Loading module at fixed address failed since specified memory is not available.
(UINTN)FixupData <= (UINTN)ImageContext->FixupData + ImageContext->FixupDataSize/home/user/AMDSEV/src/edk2/MdePkg/Library/BasePeCoffLib/BasePeCoff.cCoreLoadPeImage: There is no EBC interpreter for an EBC image.
InsertImageRecord - 0x%x
InsertImageRecord - 0x%016lx - 0x%016lx
ImageRecordCount - 0x%x
Image - %a
Hdr.Pe32->Signature invalid - 0x%x
!!!!!!!! InsertImageRecord - Section Alignment(0x%x) is not %dK !!!!!!!!
!!!!!!!! Image - %a !!!!!!!!
Section - '%c%c%c%c%c%c%c%c'
VirtualSize - 0x%08x
VirtualAddress - 0x%08x
SizeOfRawData - 0x%08x
PointerToRawData - 0x%08x
PointerToRelocations - 0x%08x
PointerToLinenumbers - 0x%08x
NumberOfRelocations - 0x%08x
NumberOfLinenumbers - 0x%08x
Characteristics - 0x%08x
ImageCode: 0x%016lx - 0x%016lx
!!!!!!!! InsertImageRecord - CodeSegmentCount is 0 !!!!!!!!
IsImageRecordCodeSectionValid - FAIL
((BOOLEAN)(1==1)) == IsNodeInList ((FirstEntry), (SecondEntry))/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/LinkedList.cInternalBaseLibIsListValid (FirstEntry)Loading driver at 0x%11p EntryPoint=0x%11p %a��ØVþÿvVþÿ�Vþÿ�VþÿhUþÿhUþÿhUþÿhUþÿhUþÿhUþÿ·VþÿDxeCoreASSERT [%a] %a(%d): %a
/home/user/AMDSEV/src/edk2/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c(Port & 3) == 0/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)DestinationBuffer)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)SourceBuffer)/home/user/AMDSEV/src/edk2/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.cAllocationSize <= (0xFFFFFFFFFFFFFFFFULL - (UINTN) Buffer + 1)(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)Buffer)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c(((UINTN)Buffer) & (sizeof (Value) - 1)) == 0(Length & (sizeof (Value) - 1)) == 0/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.cDestinationBuffer != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.cSourceBuffer != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.cLength <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)Buffer + 1)Idtr != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/X86ReadIdtr.c/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/Unaligned.cDevicePath != ((void *) 0)String != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/String.cLength < _gPcd_FixedAtBuild_PcdMaximumAsciiStringLengthFormat != ((void *) 0)((UINTN) String & 0x00000001) == 0/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/SafeString.cListHead != ((void *) 0)List->ForwardLink != ((void *) 0)List->BackLink != ((void *) 0)InternalBaseLibIsListValid (ListHead)!IsListEmpty (Entry)InternalBaseLibIsListValid (List)SecondEntry != ((void *) 0)((BOOLEAN)(1==1)) == IsNodeInList ((List), (Node))((BOOLEAN)(0==1)) == IsNodeInList ((ListHead), (Entry))Divisor != 0/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/DivU64x32Remainder.cCount < 64/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/LShiftU64.c/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/RShiftU64.cJumpBuffer != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/SetJump.c((UINTN)JumpBuffer & (8 - 1)) == 0/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseLib/CheckSum.c((UINTN) Buffer & 0x1) == 0(Length & 0x1) == 0Length <= (0xFFFFFFFFFFFFFFFFULL - ((UINTN) Buffer) + 1)�ÿ�MemoryProtectionAttribute NON_EXECUTABLE_PE_DATA is not set, because Runtime Driver Section Alignment is not %dK.
Status == ((RETURN_STATUS)(0x8000000000000000ULL | (5)))MemoryMap != ((void *) 0)MemoryAttributesTable != ((void *) 0)MemoryAttributesTable:
Version - 0x%08x
NumberOfEntries - 0x%08x
DescriptorSize - 0x%08x
Entry (0x%x)
Type - 0x%x
PhysicalStart - 0x%016lx
VirtualStart - 0x%016lx
NumberOfPages - 0x%016lx
Attribute - 0x%016lx
SetUefiImageMemoryAttributes - 0x%016lx - 0x%016lx (0x%016lx)
gCpu != ((void *) 0)ProtectUefiImageCommon - 0x%x

  • 0x%016lx - 0x%016lx
    !!!!!!!! ProtectUefiImageCommon - Section Alignment(0x%x) is incorrect !!!!!!!!
    !!!!!!!! ProtectUefiImageCommon - CodeSegmentCount is 0 !!!!!!!!
    CurrentBase <= ImageRecordCodeSection->CodeSegmentBaseCurrentBase <= ImageEnd!!!! Find image based on IP(0x%x) (No PDB) (ImageBase=%016lp, EntryPoint=%016p) !!!!
    !!!! Can't find image information. !!!!
    ReadSize != ((void *) 0)FileHandle != ((void *) 0)!!!! X64 Exception Type - %02x(%a) CPU Apic ID - %08x !!!!
    ExceptionData - %016lx I:%x R:%x U:%x W:%x P:%x PK:%x S:%xRIP - %016lx, CS - %016lx, RFLAGS - %016lx
    RAX - %016lx, RCX - %016lx, RDX - %016lx
    RBX - %016lx, RSP - %016lx, RBP - %016lx
    RSI - %016lx, RDI - %016lx
    R8 - %016lx, R9 - %016lx, R10 - %016lx
    R11 - %016lx, R12 - %016lx, R13 - %016lx
    R14 - %016lx, R15 - %016lx
    DS - %016lx, ES - %016lx, FS - %016lx
    GS - %016lx, SS - %016lx
    CR0 - %016lx, CR2 - %016lx, CR3 - %016lx
    CR4 - %016lx, CR8 - %016lx
    DR0 - %016lx, DR1 - %016lx, DR2 - %016lx
    DR3 - %016lx, DR6 - %016lx, DR7 - %016lx
    GDTR - %016lx %016lx, LDTR - %016lx
    IDTR - %016lx %016lx, TR - %016lx
    FXSAVE_STATE - %016lx
    #DE - Divide Error#DB - DebugNMI Interrupt#BP - Breakpoint#OF - Overflow#BR - BOUND Range Exceeded#UD - Invalid Opcode#NM - Device Not Available#DF - Double FaultCoprocessor Segment Overrun#TS - Invalid TSS#NP - Segment Not Present#SS - Stack Fault Fault#GP - General Protection#PF - Page-FaultReserved#MF - x87 FPU Floating-Point Error#AC - Alignment Check#MC - Machine-Check#XM - SIMD floating-point#VE - Virtualization�Reserved��}�/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c(((EFI_COMMON_SECTION_HEADER2 *) (UINTN) Section)->ExtendedSize) > 0x00FFFFFFIt is a FFS3 formatted section in a non-FFS3 formatted FV.
    Unaligned FvImage found at 0x%lx:0x%lx, the required alignment is 0x%x
    *FVProtocolHandle != ((void *) 0)BitMap != ((void *) 0)/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c�����
    ����������/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c&mPoolMemoryLock not lockedIndex < ((sizeof (mPoolSizeTable) / sizeof ((mPoolSizeTable)[0])))Offset == MaxOffsetAllocatePoolI: Type %x, Addr %p (len %lx) %,ld
    AllocatePool: failed to allocate %ld bytes
    &gMemoryLock not locked/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Mem/Page.cEntry(Start & 0xFFF) == 0End > StartAddRange: %lx-%lx to %d
    mMapDepth < 6Tail != ((void *) 0)Tail->Signature == ((('p') | ('t' << 8)) | ((('a') | ('l' << 8)) << 16))Head->Size == Tail->SizeFreePool: %p (len %lx) %,ld
    Free != ((void *) 0)�������������
    ����,H�t/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Hand/Handle.cCount == ProtocolInterface->OpenListCountLength != 0BottomEntry->Signature == 0TopEntry->Signature == 0Status == 0 && IoSpaceMap != ((void *) 0)GCD:Initial GCD I/O Space Map
    GCDIoType Range
    ========== =================================
    %a %016lx-%016lx%c
    Status == 0 && MemorySpaceMap != ((void *) 0)GCD:Initial GCD Memory Space Map
    GCDMemType Range Capabilities Attributes
    ========== ================================= ================ ================
    %a %016lx-%016lx %016lx %016lx%c
    Status = %r
    StartLink != ((void *) 0) && EndLink != ((void *) 0)TopEntry != ((void *) 0) && BottomEntry != ((void *) 0)InstallProtocolInterface: %g %p
    InstallProtocolInterface: input handle at 0x%x is invalid
    CoreFindProtocolInterface (Handle, Protocol, Interface) == ((void *) 0)InstallProtocolInterface: %g %p failed with %r
    TRUEFALSELoading driver %g
    DriverEntry->ImageHandle != ((void *) 0)Evaluate DXE DEPEX for FFS(%g)
    All UEFI Services Available = FALSE
    RESULT = FALSE
    TRUE
    RESULT = TRUE
    RESULT = FALSE (Attempt to fetch past end of depex)
    RESULT = FALSE (Unexpected BEFORE or AFTER opcode)
    /home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c SOR
    RESULT = FALSE (Unexpected SOR opcode)
    SOR = Requested
    PUSH GUID(%g) = FALSE
    PUSH GUID(%g) = TRUE
    RESULT = FALSE (Unexpected error)
    AND
    OR
    NOT
    TRUE
    FALSE
    END
    RESULT = %a
    RESULT = FALSE (Unknown opcode)
    SOR = Not Requested
    Schedule FFS(%g) - EFI_SUCCESS
    Schedule FFS(%g) - EFI_NOT_FOUND
    GCD:RemoveIoSpace(Base=%016lx,Length=%016lx)
    GCD:FreeIoSpace(Base=%016lx,Length=%016lx)
    GCD:AddIoSpace(Base=%016lx,Length=%016lx)
    GcdIoType = %a
    GCD:SetMemorySpaceAttributes(Base=%016lx,Length=%016lx)
    Attributes = %016lx
    GCD:RemoveMemorySpace(Base=%016lx,Length=%016lx)
    GCD:AllocateIoSpace(Base=%016lx,Length=%016lx)
    GCD:AllocateIoSpace(Base=,Length=%016lx)
    GcdAllocateType = %a
    GcdIoType = %a
    Alignment = %016lx
    ImageHandle = %p
    DeviceHandle = %p
    GCD:CoreSetMemorySpaceCapabilities(Base=%016lx,Length=%016lx)
    Capabilities = %016lx
    CpuHob != ((void *) 0)((Attributes & 0x00000080) == 0) || ((Attributes & 0x00100000) != 0)((Attributes & 0x00000100) == 0) || ((Attributes & 0x00200000) != 0)((Attributes & 0x00000200) == 0) || ((Attributes & 0x00400000) != 0)((Attributes & 0x00040000) == 0) || ((Attributes & 0x00080000) != 0)((Attributes & 0x00800000) == 0) || ((Attributes & 0x01000000) != 0)(Descriptor.GcdMemoryType == EfiGcdMemoryTypeSystemMemory) || (Descriptor.GcdMemoryType == EfiGcdMemoryTypeMoreReliable)Status == 0NewHobList != ((void *) 0)NonExistI/O Unknown AnySearchBottomUp MaxAddressSearchBottomUp AtAddress AnySearchTopDown MaxAddressSearchTopDown Unknown ®¸þÿþ½þÿ�ºþÿþ½þÿ§¸þÿ§¸þÿ�ºþÿ/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Hand/DriverSupport.cHandleFilePath != ((void *) 0)TempFilePath != ((void *) 0)&gProtocolDatabaseLock not locked/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Hand/Notify.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Library/Library.cLock->Lock == EfiLockAcquiredLock->Lock == EfiLockReleasedEntry->VirtualStart == 0(MergeGcdMapEntry.BaseAddress & 0xFFF) == 0((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1) & 0xFFF) == 0============================= Guarded Memory Bitmap ==============================
    3 2 1 0 %a
    FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210==================================================================================
    %016lx: %a
    ... : ...
    NumberOfPages(ChangingType == ((BOOLEAN)(0==1))) || (ChangingAttributes == ((BOOLEAN)(0==1)))ConvertPages: failed to find range %lx - %lx
    ConvertPages: range %lx - %lx covers multiple entries
    ConvertRange: %lx-%lx to type %d
    ConvertRange: %lx-%lx to attr %lx
    ConvertPages: Incompatible memory types, the pages to free have been freed
    the pages to allocate have been allocated
    Entry->Start < Entry->End/home/user/AMDSEV/src/edk2/MdePkg/Library/DxePcdLib/DxePcdLib.cmPcd != ((void *) 0)MemoryProtectionAttribute - 0x%016lx
    Total Image Count - 0x%x
    Dump ImageRecord:
    Image[%d]: 0x%016lx - 0x%016lx
    ImageCode SegmentCount - 0x%x
    SetPropertiesTableSectionAlignment - Clear
    TotalNewRecordCount != 0(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)Address)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.cApicBaseMsr.Bits.EN != 0/home/user/AMDSEV/src/edk2/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.cHobStart != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/DxeCoreHobLib/HobLib.cgHobList != ((void *) 0)Source != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.cDestinationSize != ((void *) 0)ScratchSize != ((void *) 0)TableBits <= 16nn <= ((1U << 5) - 1)EntryPoint != ((void *) 0)SpinLock != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.cLockValue == ((UINTN) 2) || LockValue == ((UINTN) 1)(Address & 3) == 0/home/user/AMDSEV/src/edk2/MdePkg/Library/BaseIoLibIntrinsic/IoLib.cProtocolGuid != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/UefiLib/UefiLib.cRegistration != ((void *) 0)FvDevicePathNode != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/UefiLib/UefiNotTiano.cNameGuid != ((void *) 0)ImageContext != ((void *) 0)/home/user/AMDSEV/src/edk2/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.cProtNotify->Signature == ((('p') | ('r' << 8)) | ((('t') | ('n' << 8)) << 16))/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Hand/Locate.cSize >= 0Size != BestMatchGetNext != ((void *) 0)SearchKey != ((void *) 0)DriverInfoData != ((void *) 0)MapMemory != 0NumberOfPages <= (1 << 6)BitNumber <= (1 << 6)/home/user/AMDSEV/src/edk2/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.cTableGuid != ((void *) 0)OutputBuffer != ((void *) 0)/home/user/AMDSEV/src/edk2/MdeModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.cInputSection != ((void *) 0)OutputBufferSize != ((void *) 0)ScratchBufferSize != ((void *) 0)SectionAttribute != ((void *) 0)SourceSize >= (5 + 8)Decompress != ((void *) 0)GuidedHeader->CommonHeader.Type == 0x02/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c%a() FV at 0x%x, FvAlignment required is 0x%x
    (Alignment & (Alignment - 1)) == 0RealPages > PagesFV at 0x%x has 0x%x used size, and erase byte is 0x%02x
    Pages != 0Fvb != ((void *) 0)FwVolHeader != ((void *) 0)FvImage on FvHandle %p and %p has the same FvNameGuid %g.
    KnownHandle != ((void *) 0) RESULT = TRUE (Apriori)
    f�CoreProcessFvImageFile� ���!((ExtendedData == ((void *) 0)) && (ExtendedDataSize != 0))/home/user/AMDSEV/src/edk2/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.cPromote the memory resource
    Index < mMaxTableEntriesExtendedData != ((void *) 0)CurrentChildNode != ((void *) 0)(((INTN)(RETURN_STATUS)(ErrorStatus)) < 0)
    (Buffer != ((void *) 0))/home/user/AMDSEV/src/edk2/MdePkg/Library/BasePrintLib/PrintLibInternal.c(Format != ((void *) 0))(BufferSize <= (_gPcd_FixedAtBuild_PcdMaximumAsciiStringLength))(AsciiStrnLenS (Format, (_gPcd_FixedAtBuild_PcdMaximumAsciiStringLength) + 1) <= (_gPcd_FixedAtBuild_PcdMaximumAsciiStringLength))%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x%02d/%02d/%04d %02d:%02d%08XAllocatePoolPages: failed to allocate %d pages
    SuccessWarning Unknown GlyphWarning Delete FailureWarning Write FailureWarning Buffer Too SmallWarning Stale DataLoad ErrorInvalid ParameterUnsupportedBad Buffer SizeNot ReadyDevice ErrorWrite ProtectedOut of ResourcesVolume CorruptVolume FullNo MediaMedia changedNot FoundAccess DeniedNo ResponseNo mappingTime outNot startedAlready startedAbortedICMP ErrorTFTP ErrorProtocol ErrorIncompatible VersionSecurity ViolationCRC ErrorEnd of MediaReserved (29)Reserved (30)End of FileInvalid LanguageCompromised Data��@0123456789ABCDEF@B�FHand->Signature == ((('i') | ('m' << 8)) | ((('g') | ('f' << 8)) << 16))/home/user/AMDSEV/src/edk2/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.cGetInfo from guided section Failed - %r
    AuthenticationStatus != ((void *) 0)Extract guided section Failed - %r
    RemoveImageRecord - 0x%x
    RemoveImageRecord - 0x%016lx - 0x%016lx
    !!!!!!!! ImageRecord not found !!!!!!!!
    CoreLoadedImageInfo: Not an ImageHandle %p
    ChildNode->Signature == ((('S') | ('X' << 8)) | ((('C') | ('S' << 8)) << 16))�IA32IA64X64ARMAARCH64GCD:FreeMemorySpace(Base=%016lx,Length=%016lx)
    GCD:AddMemorySpace(Base=%016lx,Length=%016lx)
    GcdMemoryType = %a
    Capabilities = %016lx
    Status = %r (BaseAddress = %016lx)GCD:AllocateMemorySpace(Base=%016lx,Length=%016lx)
    GCD:AllocateMemorySpace(Base=,Length=%016lx)
    NonExist Reserved SystemMemMMIO PersisMemMoreReliaUnknown FATAL ERROR - RaiseTpl with OldTpl(0x%x) > NewTpl(0x%x)
    /home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c((NewTpl) <= 31)FATAL ERROR - RestoreTpl with NewTpl(0x%x) > OldTpl(0x%x)
    gEventQueueLock.OwnerTpl == Priority/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Event/Event.cEvent->NotifyFunction != ((void *) 0)/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/FwVol/FwVol.cFound a FFS3 formatted file: %g in a non-FFS3 formatted FV.
    ((UINT32) (((EFI_FFS_FILE_HEADER2 *) (UINTN) CacheFfsHeader)->ExtendedSize)) > 0x00FFFFFFAllocInfoData != ((void *) 0)&gEventQueueLock not locked&mEfiTimerLock not lockedf.��������������`��DisableNullDetectionAtTheEndOfDxe(): start
    DisableNullDetectionAtTheEndOfDxe(): end
    Lock->Lock != EfiLockUninitializedMemoryProtectionCpuArchProtocolNotify:
    %a: applying strict permissions to active memory regions
    %a: applying strict permissions to inactive memory regions
    Untested GCD memory space region: - 0x%016lx - 0x%016lx (0x%016lx)
    ��InitializeDxeNxMemoryProtectionPolicyExit: Image is not exitable image
    Image type %s can't be started Error: Image at %11p start failed: %r
    Image->Tpl == gEfiCurrentTplStartImage: ExitDataSize %d, ExitData %p (%hs)DriverEntry != ((void *) 0) BEFORE FFS(%g) = TRUE
    END
    RESULT = TRUE
    FALSE
    END
    RESULT = FALSE
    AFTER FFS(%g) = Entry->Type != EfiACPIReclaimMemoryEntry->Type != EfiACPIMemoryNVSExitBootServices: A RUNTIME memory entry is not on a proper alignment.

@seedindream
Copy link
Author

I redo the whole process with the patch. It seems work now.
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants