BvgaAcquireLock

VOID __stdcall BvgaAcquireLock(){
  unsigned __int8 CurrentIrql; 
  CurrentIrql = KeGetCurrentIrql();
  if( CurrentIrql <= 2u )
  {
    while( BootDriverLock )
      _mm_pause();
    CurrentIrql = KeGetCurrentIrql();
    __writecr8(2ui64);
  }
  KxAcquireSpinLock(&BootDriverLock);
  BvgaOldIrql = CurrentIrql;
}

Referenced by:

BvgaBitBlt
BvgaDisplayString
BvgaEnableBootDriver
BvgaNotifyDisplayOwnershipLost
BvgaSolidColorFill
BvgaUpdateProgressBar