Re: [edk2] [PATCH] OvmfPkg/PlatformBootManagerLib: Postpone the shell registration

2016-05-12 Thread Laszlo Ersek
On 05/12/16 07:57, Ni, Ruiyu wrote:
> 
> 
> Reviewed-by: Ruiyu Ni 

Thanks guys, commit 14b2ebc30c8b.

Laszlo

>> -Original Message-
>> From: Laszlo Ersek [mailto:ler...@redhat.com]
>> Sent: Wednesday, May 11, 2016 6:28 PM
>> To: Gary Lin ; edk2-de...@ml01.01.org
>> Cc: Justen, Jordan L ; Ni, Ruiyu 
>> 
>> Subject: Re: [PATCH] OvmfPkg/PlatformBootManagerLib: Postpone the shell 
>> registration
>>
>> On 05/11/16 10:40, Gary Lin wrote:
>>> We currently register the shell before creating the boot options for
>>> the block devices and the network devices, so the boot manager boots
>>> into the internal shell if the user doesn't specify the boot order.
>>> However, Xen doesn't support fw_cfg, so there is no way to change the
>>> boot order with the external command, and the firmware will always
>>> boot into the internal shell if the user doesn't interfere the boot
>>> process.
>>>
>>> This patch postpones the shell registration after MdeModulePkg/BDS
>>> creates all the boot options for the block and network devices, so
>>> that firmware will try to boot the block/network devices first.
>>>
>>> Cc: Laszlo Ersek 
>>> Cc: Jordan Justen 
>>> Cc: Ruiyu Ni 
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Gary Lin 
>>> ---
>>>  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 13 +++--
>>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>>> index cf774a1..a16453d 100644
>>> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>>> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>>> @@ -184,12 +184,6 @@ PlatformRegisterOptionsAndKeys (
>>>   NULL, (UINT16) BootOption.OptionNumber, 0, , NULL
>>>   );
>>>ASSERT (Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED);
>>> -  //
>>> -  // Register UEFI Shell
>>> -  //
>>> -  PlatformRegisterFvBootOption (
>>> -PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE
>>> -);
>>>  }
>>>
>>>  EFI_STATUS
>>> @@ -1304,6 +1298,13 @@ Routine Description:
>>>
>>>EfiBootManagerRefreshAllBootOption ();
>>>
>>> +  //
>>> +  // Register UEFI Shell
>>> +  //
>>> +  PlatformRegisterFvBootOption (
>>> +PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE
>>> +);
>>> +
>>>SetBootOrderFromQemu (NULL);
>>>  }
>>>
>>>
>>
>> Looks good to me:
>>
>> Reviewed-by: Laszlo Ersek 
>>
>> I'd also like to get an R-b from Ray, before committing the patch.
>>
>> Thanks!
>> Laszlo
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] OvmfPkg/PlatformBootManagerLib: Postpone the shell registration

2016-05-11 Thread Ni, Ruiyu


Reviewed-by: Ruiyu Ni 



Regards,
Ray

>-Original Message-
>From: Laszlo Ersek [mailto:ler...@redhat.com]
>Sent: Wednesday, May 11, 2016 6:28 PM
>To: Gary Lin ; edk2-de...@ml01.01.org
>Cc: Justen, Jordan L ; Ni, Ruiyu 
>
>Subject: Re: [PATCH] OvmfPkg/PlatformBootManagerLib: Postpone the shell 
>registration
>
>On 05/11/16 10:40, Gary Lin wrote:
>> We currently register the shell before creating the boot options for
>> the block devices and the network devices, so the boot manager boots
>> into the internal shell if the user doesn't specify the boot order.
>> However, Xen doesn't support fw_cfg, so there is no way to change the
>> boot order with the external command, and the firmware will always
>> boot into the internal shell if the user doesn't interfere the boot
>> process.
>>
>> This patch postpones the shell registration after MdeModulePkg/BDS
>> creates all the boot options for the block and network devices, so
>> that firmware will try to boot the block/network devices first.
>>
>> Cc: Laszlo Ersek 
>> Cc: Jordan Justen 
>> Cc: Ruiyu Ni 
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Gary Lin 
>> ---
>>  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 13 +++--
>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> index cf774a1..a16453d 100644
>> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> @@ -184,12 +184,6 @@ PlatformRegisterOptionsAndKeys (
>>   NULL, (UINT16) BootOption.OptionNumber, 0, , NULL
>>   );
>>ASSERT (Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED);
>> -  //
>> -  // Register UEFI Shell
>> -  //
>> -  PlatformRegisterFvBootOption (
>> -PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE
>> -);
>>  }
>>
>>  EFI_STATUS
>> @@ -1304,6 +1298,13 @@ Routine Description:
>>
>>EfiBootManagerRefreshAllBootOption ();
>>
>> +  //
>> +  // Register UEFI Shell
>> +  //
>> +  PlatformRegisterFvBootOption (
>> +PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE
>> +);
>> +
>>SetBootOrderFromQemu (NULL);
>>  }
>>
>>
>
>Looks good to me:
>
>Reviewed-by: Laszlo Ersek 
>
>I'd also like to get an R-b from Ray, before committing the patch.
>
>Thanks!
>Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] OvmfPkg/PlatformBootManagerLib: Postpone the shell registration

2016-05-11 Thread Laszlo Ersek
On 05/11/16 10:40, Gary Lin wrote:
> We currently register the shell before creating the boot options for
> the block devices and the network devices, so the boot manager boots
> into the internal shell if the user doesn't specify the boot order.
> However, Xen doesn't support fw_cfg, so there is no way to change the
> boot order with the external command, and the firmware will always
> boot into the internal shell if the user doesn't interfere the boot
> process.
> 
> This patch postpones the shell registration after MdeModulePkg/BDS
> creates all the boot options for the block and network devices, so
> that firmware will try to boot the block/network devices first.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ruiyu Ni 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Gary Lin 
> ---
>  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 13 +++--
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c 
> b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> index cf774a1..a16453d 100644
> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> @@ -184,12 +184,6 @@ PlatformRegisterOptionsAndKeys (
>   NULL, (UINT16) BootOption.OptionNumber, 0, , NULL
>   );
>ASSERT (Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED);
> -  //
> -  // Register UEFI Shell
> -  //
> -  PlatformRegisterFvBootOption (
> -PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE
> -);
>  }
>  
>  EFI_STATUS
> @@ -1304,6 +1298,13 @@ Routine Description:
>  
>EfiBootManagerRefreshAllBootOption ();
>  
> +  //
> +  // Register UEFI Shell
> +  //
> +  PlatformRegisterFvBootOption (
> +PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE
> +);
> +
>SetBootOrderFromQemu (NULL);
>  }
>  
> 

Looks good to me:

Reviewed-by: Laszlo Ersek 

I'd also like to get an R-b from Ray, before committing the patch.

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel