public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Reset from post BDS pahse to PEI phase
@ 2017-03-28 12:23 Amit kumar
  2017-03-28 15:08 ` Andrew Fish
  0 siblings, 1 reply; 2+ messages in thread
From: Amit kumar @ 2017-03-28 12:23 UTC (permalink / raw)
  To: edk2-devel@lists.01.org


Hi ,
I have been facing some problem with blockIO reads even after reconnect and update map. when i try to do dblk on some of my blocks it returns with EFI_INVALID_PARAMETER. 
Is there a way to reinitialize the EFI platform from post bds phase or post dxe phase without putting the board in power-off mode( like in the case of shell reset command or system restart). 

Thanks and Regards 
Amit 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Reset from post BDS pahse to PEI phase
  2017-03-28 12:23 Reset from post BDS pahse to PEI phase Amit kumar
@ 2017-03-28 15:08 ` Andrew Fish
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Fish @ 2017-03-28 15:08 UTC (permalink / raw)
  To: Amit kumar; +Cc: edk2-devel@lists.01.org


> On Mar 28, 2017, at 5:23 AM, Amit kumar <akamit91@hotmail.com> wrote:
> 
> 
> Hi ,
> I have been facing some problem with blockIO reads even after reconnect and update map. when i try to do dblk on some of my blocks it returns with EFI_INVALID_PARAMETER. 
> Is there a way to reinitialize the EFI platform from post bds phase or post dxe phase without putting the board in power-off mode( like in the case of shell reset command or system restart). 
> 

Amit,

If you look in the UEFI Spec you will see there is a Runtime Service called ResetSystem(). It supports different reset types, but it is up the platform to define what they are. For example a EfiWarmReset could end up being the same as EfiResetCold in a given implementation. I would assume the shell reset command maps directly into this call, so you can get background from reading the spec. on options to the shell reset command. 

I'd recommend looking in the UEFI Spec for the Block IO Protocol function definitions as the define a standardized set of return codes. 

For example ReadBlocks() EFI_INVALID_PARAMETER implies:
The read request contains LBAs that are not valid, or the buffer is not on proper alignment.

The information used by these checks comes from the Block IO protocol Media data (EFI_BLOCK_IO_MEDIA). EFI_BLOCK_IO_MEDIA.IoAlign would define buffer alignment requirements for the call, and  EFI_BLOCK_IO_MEDIA.LastBlock should define the valid LBA range. 

Maybe there is a strange alignment requirement and there is a bug in the Shell? Maybe the driver is not reporting a proper LastBlock?


Thanks,

Andrew Fish

> Thanks and Regards 
> Amit 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-28 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 12:23 Reset from post BDS pahse to PEI phase Amit kumar
2017-03-28 15:08 ` Andrew Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox