public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Andrew Fish <afish@apple.com>
To: Amit kumar <akamit91@hotmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Reset from post BDS pahse to PEI phase
Date: Tue, 28 Mar 2017 08:08:54 -0700	[thread overview]
Message-ID: <09C2E1D5-6C2B-40BB-BE64-4F3C8FF89E71@apple.com> (raw)
In-Reply-To: <DM5PR11MB181824152D2BEED19BEEE256DC320@DM5PR11MB1818.namprd11.prod.outlook.com>


> 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



      reply	other threads:[~2017-03-28 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 12:23 Reset from post BDS pahse to PEI phase Amit kumar
2017-03-28 15:08 ` Andrew Fish [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09C2E1D5-6C2B-40BB-BE64-4F3C8FF89E71@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox