2012年3月5日 星期一

Blt function in GOP driver

Blt function is one of the three functions defined in UEFI GOP driver spec. And it is the only function that actually perform the draw operations. It has 4 operation modes.

  1. EfiBltVideoFill: Fill the rectangle of (DestinationX,DestinationY) to (DestinationX+Width,DestinationY+Height) wih BltBuffer pixel (0,0), only 1 pixel in BltBuffer is used.
  2. EfiBltVideoToBltBuffer: Read data from Video Buffer to BltBuffer (delta is used here)
  3. EfiBltBufferToVideo: Write data from BltBuffer to Video Buffer
  4. EfiBltVideoToVideo: Copy data from a rectangle in the VideoBuffer to another position in the VideoBuffer (BltBuffer and delta not used) 
One thing need to pay attention: Before doing memory operation, should raise TPL to avoid interrupted by timer event)