If you are not doing a shell application, you could draw everything
yourself. Here's a simple (not production quality!) example for how to make
the whole screen white.

EFI_STATUS
EFIAPI
UefiMain (
  IN     EFI_HANDLE        ImageHandle,
  IN     EFI_SYSTEM_TABLE  *SystemTable
  )
{
  EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL *PixelBuffer;
  UINTN PixelBufferSize;
  UINT32 HRes;
  UINT32 VRes;

  gBS->LocateProtocol (&gEfiGraphicsOutputProtocolGuid, NULL, &Gop);
  HRes = Gop->Mode->Info->HorizontalResolution;
  VRes = Gop->Mode->Info->VerticalResolution;
  PixelBufferSize = HRes * VRes * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
  PixelBuffer = AllocatePool (PixelBufferSize);
  SetMem (PixelBuffer, PixelBufferSize, 255 /*white*/);
  Gop->Blt (Gop, PixelBuffer, EfiBltBufferToVideo, 0, 0, 0, 0, HRes, VRes, 0
);
  FreePool (PixelBuffer);

  return EFI_SUCCESS;
}

Thomas Rognon


On Thu, May 23, 2013 at 2:40 PM, Rafael Machado <
rafaelrodrigues.mach...@gmail.com> wrote:

> Hi
>
> Thanks for the answer Andrew.
> I'll talk to my manager about the possible solutions.
>
> By the way, does anyone know why don't we have white at the background
> colors list ?
> Is there any reason for that ?
>
> Thanks and Regards
> Rafael R. Machado
>
>
>
>
> 2013/5/23 Andrew Fish <af...@apple.com>
>
>>
>> On May 23, 2013, at 10:54 AM, Rafael Machado <
>> rafaelrodrigues.mach...@gmail.com> wrote:
>>
>> Hi everyone
>>
>> I have a question.
>> I need to develop an simple uefi application, and this application must
>> have a white background.
>>
>> As i saw at the uefi spec we can have just the following background
>> colors:
>>
>>
>> EFI_BACKGROUND_BLACK 0x00
>> EFI_BACKGROUND_BLUE 0x10
>> EFI_BACKGROUND_GREEN 0x20
>> EFI_BACKGROUND_CYAN 0x30
>> EFI_BACKGROUND_RED 0x40
>> EFI_BACKGROUND_MAGENTA 0x50
>> EFI_BACKGROUND_BROWN 0x60
>> EFI_BACKGROUND_LIGHTGRAY 0x70
>>
>>
>> Light Gray, the new white???????? Hope the marketing guy/gal  is color
>> blind?
>>
>> Does anyone here know a way to do that ?
>>
>> On a more serious note do you need to output to a graphics device, or
>> terminal:
>>
>> The edk2 code that does things console and color lives here:
>>
>> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/
>>
>> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Universal/Console/TerminalDxe/
>>
>> It is a lot of work, but you could make your own, non compatible,
>>  versions inside your application and call those in place of the system
>> console.
>>
>> Thanks,
>>
>> Andrew Fish
>>
>> Thanks and Regards
>>
>> Rafael R. Machado
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Try New Relic Now & We'll Send You this Cool Shirt
>> New Relic is the only SaaS-based application performance monitoring
>> service
>> that delivers powerful full stack analytics. Optimize and monitor your
>> browser, app, & servers with just a few lines of code. Try New Relic
>> and get this awesome Nerd Life shirt!
>> http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Try New Relic Now & We'll Send You this Cool Shirt
>> New Relic is the only SaaS-based application performance monitoring
>> service
>> that delivers powerful full stack analytics. Optimize and monitor your
>> browser, app, & servers with just a few lines of code. Try New Relic
>> and get this awesome Nerd Life shirt!
>> http://p.sf.net/sfu/newrelic_d2d_may
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to