On 05/25/16 19:00, Jordan Justen wrote:
> On 2016-05-25 05:36:43, Laszlo Ersek wrote:
>> OVMF's Platform BDS used to have a nice progress bar (with
>> IntelFrameworkModulePkg BDS). We can restore it by copying the
>> PlatformBootManagerWaitCallback() function verbatim from
>>
>>   Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c
>>
>> It can be tested by passing the following option to QEMU (5 seconds):
>>
>>   -boot menu=on,splash-time=5000
>>
>> Cc: Jordan Justen <[email protected]>
>> Cc: Ruiyu Ni <[email protected]>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Laszlo Ersek <[email protected]>
>> ---
>>  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c 
>> b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> index 9eb9e390373d..dd8757f58ec3 100644
>> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
>> @@ -1425,5 +1425,22 @@ PlatformBootManagerWaitCallback (
>>    UINT16          TimeoutRemain
>>    )
>>  {
>> +  EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black;
>> +  EFI_GRAPHICS_OUTPUT_BLT_PIXEL White;
>> +  UINT16                        Timeout;
>> +
>> +  Timeout = PcdGet16 (PcdPlatformBootTimeOut);
>> +
>> +  Black.Blue = Black.Green = Black.Red = Black.Reserved = 0;
>> +  White.Blue = White.Green = White.Red = White.Reserved = 0xFF;
> 
> I know this came from Nt32, but how about making these global vars?
> 
> static EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black = { 0, 0, 0, 0 };
> static EFI_GRAPHICS_OUTPUT_BLT_PIXEL White = { 0xff, 0xff, 0xff, 0 };

I'm okay with giving them static storage duration.

With that changed,
- do you want me to keep them in function scope (with the same names),
- or should I move them to file scope (and then, as Andrew suggests,
  rename them to, say, mPixelBlack and mPixelWhite)?

Thanks
Laszlo

> Series Reviewed-by: Jordan Justen <[email protected]>
> 
>> +
>> +  BootLogoUpdateProgress (
>> +    White,
>> +    Black,
>> +    L"Start boot option",
>> +    White,
>> +    (Timeout - TimeoutRemain) * 100 / Timeout,
>> +    0
>> +    );
>>  }
>>  
>> -- 
>> 1.8.3.1
>>
>>

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to