* [edk2-devel] Execution of TempRamInitApi doesn't return.
@ 2024-12-24 14:42 memristor2 via groups.io
0 siblings, 0 replies; 3+ messages in thread
From: memristor2 via groups.io @ 2024-12-24 14:42 UTC (permalink / raw)
To: devel@edk2.groups.io
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]
Hello everyone,
I am trying to build an Intel platform's customized UEFI.
I have extracted the microcode and FSP binaries from the vendors UEFI image successfully. I also changed the PlatformPkg and FspFlashOffset FDF files. Execution goes on fine up until the last line of this subroutine:
FspHeaderFound:
; Get the fsp TempRamInit Api address
mov eax, dword [edi + FSP_HEADER_IMAGEBASE_OFFSET]
add eax, dword [edi + FSP_HEADER_TEMPRAMINIT_OFFSET]
; Setup the hardcode stack
mov esp, TempRamInitStack
; Call the fsp TempRamInit Api jmp eax
I have checked the address of TempRamInit Entry which matched the address inside the FSP header.
but somehow it doesn't return to the TempRamInitDone subroutine. I have no idea why this happens. I also changed the UPD parameters to match the signature of the target platform.
Any thoughts on this?
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120933): https://edk2.groups.io/g/devel/message/120933
Mute This Topic: https://groups.io/mt/110272463/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 3733 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] Execution of TempRamInitApi doesn't return.
[not found] <1814240A39815E77.28262@groups.io>
@ 2024-12-30 13:41 ` memristor2 via groups.io
[not found] ` <1815F82F169C7296.23821@groups.io>
1 sibling, 0 replies; 3+ messages in thread
From: memristor2 via groups.io @ 2024-12-30 13:41 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
Any thoughts on this?
even the smallest hints would be highly appreciated.
Sent with [Proton Mail](https://proton.me/mail/home) secure email.
On Tuesday, December 24th, 2024 at 6:12 PM, memristor2 via groups.io <memristor2=proton.me@groups.io> wrote:
> Hello everyone,
> I am trying to build an Intel platform's customized UEFI.
> I have extracted the microcode and FSP binaries from the vendors UEFI image successfully. I also changed the PlatformPkg and FspFlashOffset FDF files. Execution goes on fine up until the last line of this subroutine:
>
> FspHeaderFound:
> ; Get the fsp TempRamInit Api address
> mov eax, dword [edi + FSP_HEADER_IMAGEBASE_OFFSET]
> add eax, dword [edi + FSP_HEADER_TEMPRAMINIT_OFFSET]
> ; Setup the hardcode stack
> mov esp, TempRamInitStack
> ; Call the fsp TempRamInit Api jmp eax
>
> I have checked the address of TempRamInit Entry which matched the address inside the FSP header.
> but somehow it doesn't return to the TempRamInitDone subroutine. I have no idea why this happens. I also changed the UPD parameters to match the signature of the target platform.
> Any thoughts on this?
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120939): https://edk2.groups.io/g/devel/message/120939
Mute This Topic: https://groups.io/mt/110272463/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 4761 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] Execution of TempRamInitApi doesn't return.
[not found] ` <1815F82F169C7296.23821@groups.io>
@ 2024-12-30 15:19 ` memristor2 via groups.io
0 siblings, 0 replies; 3+ messages in thread
From: memristor2 via groups.io @ 2024-12-30 15:19 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 2510 bytes --]
So I figured this out and it was a microcode issue. I extracted another set of microcode mcbs for the target platform and added them to the FV, execution returned from TempInitRamApi. I was stuck on this since I didn't have any access to the FSP-T source code and there was no other debugging approaches in this phase. I suspected the issue would be caused by one of the following:
- Fsp-T parameter's pointer being passed to the TempRamInitApi
- the temporary RAM base wasn't correct
- there would be a problem in the microcode I was using,
since there wouldn't be any reason for the execution to not return if no.1 and 2 were the issues my suspicions made me focus on No. 3 since a buggy microcode would highly likely crash the processor. I must mention the first set of microcode mcbs used were meant for this platform but somehow they didn't work right. Turns out I guessed it right.
On Monday, December 30th, 2024 at 5:11 PM, memristor2 via groups.io <memristor2=proton.me@groups.io> wrote:
> Any thoughts on this?
> even the smallest hints would be highly appreciated.
>
> Sent with [Proton Mail](https://proton.me/mail/home) secure email.
>
> On Tuesday, December 24th, 2024 at 6:12 PM, memristor2 via groups.io <memristor2=proton.me@groups.io> wrote:
>
>> Hello everyone,
>> I am trying to build an Intel platform's customized UEFI.
>> I have extracted the microcode and FSP binaries from the vendors UEFI image successfully. I also changed the PlatformPkg and FspFlashOffset FDF files. Execution goes on fine up until the last line of this subroutine:
>>
>> FspHeaderFound:
>> ; Get the fsp TempRamInit Api address
>> mov eax, dword [edi + FSP_HEADER_IMAGEBASE_OFFSET]
>> add eax, dword [edi + FSP_HEADER_TEMPRAMINIT_OFFSET]
>> ; Setup the hardcode stack
>> mov esp, TempRamInitStack
>> ; Call the fsp TempRamInit Api jmp eax
>>
>> I have checked the address of TempRamInit Entry which matched the address inside the FSP header.
>> but somehow it doesn't return to the TempRamInitDone subroutine. I have no idea why this happens. I also changed the UPD parameters to match the signature of the target platform.
>> Any thoughts on this?
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120941): https://edk2.groups.io/g/devel/message/120941
Mute This Topic: https://groups.io/mt/110272463/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 6901 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-30 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1814240A39815E77.28262@groups.io>
2024-12-30 13:41 ` [edk2-devel] Execution of TempRamInitApi doesn't return memristor2 via groups.io
[not found] ` <1815F82F169C7296.23821@groups.io>
2024-12-30 15:19 ` memristor2 via groups.io
2024-12-24 14:42 memristor2 via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox