OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 5:43 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: !!!! X64 Exception Type - 0D
PostPosted: Mon Sep 11, 2023 8:25 am 
Offline
Member
Member

Joined: Fri Sep 08, 2023 10:46 am
Posts: 41
i am trying to execute an old .efi file (an assembly file, compiled in fasm) on intel CRB

when i execute this file in slimboot(+ uefi payload), at lines where some of the uefi functions are called(EFI_BOOT_SERVICES.HandleProtocol), a general protection exception is thrown.

But same file executes perfectly in AMI BIOS.


!!!! X64 Exception Type - 0D(#GP - General Protection) CPU Apic ID - 00000000 ! !!!
ExceptionData - 0000000000000000
RIP - 00000000772877B8, CS - 0000000000000038, RFLAGS - 0000000000010246
RAX - 00000000769D2000, RCX - 00000000773DFCA0, RDX - 00000000769D1408
RBX - 8000000000000003, RSP - 00000000791B9FA8, RBP - 0000000077387E98
RSI - 0000000000000009, RDI - 00000000769D12F5
R8 - 00000000791B9EC2, R9 - 000000008101E000, R10 - 0000000000000001
R11 - 00000000791B9EC3, R12 - 00000000791BA2B8, R13 - 00000000791BA2C8
R14 - 00000000791BA438, R15 - 0000000000000000
DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030
GS - 0000000000000030, SS - 0000000000000030
CR0 - 0000000080010033, CR2 - 0000000000000000, CR3 - 0000000078C01000
CR4 - 0000000000000668, CR8 - 0000000000000000
DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 0000000078BD5B18 0000000000000047, LDTR - 0000000000000000
IDTR - 0000000078379018 0000000000000FFF, TR - 0000000000000000
FXSAVE_STATE - 00000000791B9C00


Thanks
Ravi


Top
 Profile  
 
 Post subject: Re: !!!! X64 Exception Type - 0D
PostPosted: Sun Oct 15, 2023 1:57 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
That's not really enough information to figure out what's wrong.

Since you wrote it in assembly, it's possible your code doesn't follow the ABI correctly somewhere, or you might have an absolute address without a relocation. It could also be an ordinary logic bug, such as assuming a particular call will always succeed.

If you share the code, we might be able to find the problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group