mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-01 22:41:28 +01:00
detect unknown linux versions,
stylish change: remove space between func and brace Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
d3da5e1a21
commit
01f33f7552
@ -212,7 +212,7 @@ InitializeReset (
|
||||
&gEfiResetArchProtocolGuid, NULL,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ BiosKbSetAppleKeyMapDb (
|
||||
&BiosKeyboardDevice->KeyMapDbIndex
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosKeyboardDevice->KeyMapDb = AppleKeyMapDb;
|
||||
}
|
||||
return Status;
|
||||
@ -74,7 +74,7 @@ BiosKbAppleKeyMapDbInstallNotify (
|
||||
mAppleKeyMapDbRegistration,
|
||||
(VOID **)&mAppleKeyMapDb
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosKbSetAppleKeyMapDb ((BIOS_KEYBOARD_DEV *)Context, mAppleKeyMapDb);
|
||||
gBS->CloseEvent (Event);
|
||||
}
|
||||
@ -98,7 +98,7 @@ BiosKbLocateAppleKeyMapDb (
|
||||
NULL,
|
||||
(VOID **)&mAppleKeyMapDb
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosKbSetAppleKeyMapDb (BiosKeyboardDevice, mAppleKeyMapDb);
|
||||
}
|
||||
else {
|
||||
|
@ -166,14 +166,14 @@ BiosKeyboardDriverBindingSupported (
|
||||
(VOID **) &LegacyBios
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}*/
|
||||
//
|
||||
// See if the Legacy 8259 Protocol is available
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &Legacy8259);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG(" Legacy 8259 Protocol NOT available\n");
|
||||
return Status;
|
||||
}
|
||||
@ -190,7 +190,7 @@ DBG(" Legacy 8259 Protocol NOT available\n");
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//DBG("OpenProtocol gEfiIsaIoProtocolGuid failed, status=%x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
@ -271,7 +271,7 @@ BiosKeyboardDriverBindingStart (
|
||||
(VOID **) &LegacyBios
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}*/
|
||||
//
|
||||
@ -279,7 +279,7 @@ BiosKeyboardDriverBindingStart (
|
||||
//
|
||||
if (mLegacy8259 == NULL) {
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &mLegacy8259);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ BiosKeyboardDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ BiosKeyboardDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
@ -381,7 +381,7 @@ BiosKeyboardDriverBindingStart (
|
||||
&(BiosKeyboardPrivate->SimpleTextIn),
|
||||
&((BiosKeyboardPrivate->SimpleTextIn).WaitForKey)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
(BiosKeyboardPrivate->SimpleTextIn).WaitForKey = NULL;
|
||||
goto Done;
|
||||
}
|
||||
@ -392,7 +392,7 @@ BiosKeyboardDriverBindingStart (
|
||||
&(BiosKeyboardPrivate->SimpleTextInputEx),
|
||||
&(BiosKeyboardPrivate->SimpleTextInputEx.WaitForKeyEx)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
BiosKeyboardPrivate->SimpleTextInputEx.WaitForKeyEx = NULL;
|
||||
goto Done;
|
||||
}
|
||||
@ -407,7 +407,7 @@ BiosKeyboardDriverBindingStart (
|
||||
BiosKeyboardPrivate,
|
||||
&BiosKeyboardPrivate->TimerEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR;
|
||||
goto Done;
|
||||
@ -418,7 +418,7 @@ BiosKeyboardDriverBindingStart (
|
||||
TimerPeriodic,
|
||||
KEYBOARD_TIMER_INTERVAL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR;
|
||||
goto Done;
|
||||
@ -441,7 +441,7 @@ BiosKeyboardDriverBindingStart (
|
||||
&BiosKeyboardPrivate->SimpleTextInputEx,
|
||||
extVerif
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "[KBD]Reset Failed. Status - %r\n", Status));
|
||||
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED;
|
||||
goto Done;
|
||||
@ -559,7 +559,7 @@ Done:
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
|
||||
if (BiosKeyboardPrivate != NULL) {
|
||||
if ((BiosKeyboardPrivate->SimpleTextIn).WaitForKey != NULL) {
|
||||
@ -575,7 +575,7 @@ Done:
|
||||
gBS->CloseEvent (BiosKeyboardPrivate->TimerEvent);
|
||||
}
|
||||
|
||||
FreePool (BiosKeyboardPrivate);
|
||||
FreePool(BiosKeyboardPrivate);
|
||||
}
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
@ -634,7 +634,7 @@ BiosKeyboardDriverBindingStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -646,7 +646,7 @@ BiosKeyboardDriverBindingStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -662,7 +662,7 @@ BiosKeyboardDriverBindingStop (
|
||||
&BiosKeyboardPrivate->SimpleTextInputEx,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -691,7 +691,7 @@ BiosKeyboardDriverBindingStop (
|
||||
gBS->CloseEvent (BiosKeyboardPrivate->SimpleTextInputEx.WaitForKeyEx);
|
||||
BiosKeyboardFreeNotifyList (&BiosKeyboardPrivate->NotifyList);
|
||||
|
||||
FreePool (BiosKeyboardPrivate);
|
||||
FreePool(BiosKeyboardPrivate);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -1079,7 +1079,7 @@ KeyboardReadKeyStrokeWorker (
|
||||
// If there's no key, just return
|
||||
//
|
||||
Status = CheckQueue (&BiosKeyboardPrivate->Queue);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
@ -1153,7 +1153,7 @@ BiosKeyboardReset (
|
||||
This,
|
||||
&Key
|
||||
);
|
||||
} while (!EFI_ERROR (Status));
|
||||
} while (!EFI_ERROR(Status));
|
||||
//
|
||||
// 3
|
||||
// check for KBC itself firstly for setted-up already or not by reading SYSF (bit2) of status register via 64H
|
||||
@ -1173,7 +1173,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDREG_VIA64_CMDBYTE_R
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1183,7 +1183,7 @@ BiosKeyboardReset (
|
||||
&CommandByte
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1204,7 +1204,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDREG_VIA64_AUX_DISABLE
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDREG_VIA64_KB_DISABLE
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1236,7 +1236,7 @@ BiosKeyboardReset (
|
||||
BiosKeyboardPrivate,
|
||||
KBC_CMDREG_VIA64_KBC_SLFTEST
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1246,7 +1246,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDECHO_KBCSLFTEST_OK,
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1262,7 +1262,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDREG_VIA64_CMDBYTE_W
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1313,7 +1313,7 @@ BiosKeyboardReset (
|
||||
KBC_INPBUF_VIA60_KBRESET
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1324,7 +1324,7 @@ BiosKeyboardReset (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1338,7 +1338,7 @@ BiosKeyboardReset (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1350,7 +1350,7 @@ BiosKeyboardReset (
|
||||
BiosKeyboardPrivate,
|
||||
KBC_INPBUF_VIA60_KBSCODE
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1361,7 +1361,7 @@ BiosKeyboardReset (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1370,7 +1370,7 @@ BiosKeyboardReset (
|
||||
BiosKeyboardPrivate,
|
||||
KBC_INPBUF_VIA60_SCODESET2
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ BiosKeyboardReset (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1393,7 +1393,7 @@ BiosKeyboardReset (
|
||||
BiosKeyboardPrivate,
|
||||
KBC_INPBUF_VIA60_KBEN
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1404,7 +1404,7 @@ BiosKeyboardReset (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1423,7 +1423,7 @@ BiosKeyboardReset (
|
||||
BiosKeyboardPrivate,
|
||||
KBC_CMDREG_VIA64_KB_CKECK
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1434,7 +1434,7 @@ BiosKeyboardReset (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1449,7 +1449,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDREG_VIA64_KB_ENABLE
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1464,7 +1464,7 @@ BiosKeyboardReset (
|
||||
KBC_CMDREG_VIA64_AUX_ENABLE
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
|
||||
}
|
||||
@ -1506,7 +1506,7 @@ BiosKeyboardReadKeyStroke (
|
||||
BiosKeyboardPrivate = BIOS_KEYBOARD_DEV_FROM_THIS (This);
|
||||
|
||||
Status = KeyboardReadKeyStrokeWorker (BiosKeyboardPrivate, &KeyData);
|
||||
if (EFI_ERROR (Status)) { //EFI_NOT_READY mean the queue is empty
|
||||
if (EFI_ERROR(Status)) { //EFI_NOT_READY mean the queue is empty
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1556,7 +1556,7 @@ BiosKeyboardWaitForKey (
|
||||
//
|
||||
BiosKeyboardTimerHandler (NULL, BIOS_KEYBOARD_DEV_FROM_THIS (Context));
|
||||
|
||||
if (!EFI_ERROR (BiosKeyboardCheckForKey (Context))) {
|
||||
if (!EFI_ERROR(BiosKeyboardCheckForKey (Context))) {
|
||||
gBS->SignalEvent (Event);
|
||||
}
|
||||
}
|
||||
@ -1802,7 +1802,7 @@ CheckKeyboardConnect (
|
||||
BiosKeyboardPrivate,
|
||||
KBC_INPBUF_VIA60_KBEN
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Keyboard enable failed!\n"));
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
@ -1817,7 +1817,7 @@ CheckKeyboardConnect (
|
||||
KEYBOARD_WAITFORVALUE_TIMEOUT
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "[KBD]CheckKeyboardConnect - Timeout!\n"));
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
@ -2384,7 +2384,7 @@ BiosKeyboardFreeNotifyList (
|
||||
BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
||||
);
|
||||
RemoveEntryList (ListHead->ForwardLink);
|
||||
gBS->FreePool (NotifyNode);
|
||||
gBS->FreePool(NotifyNode);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@ -2484,7 +2484,7 @@ DBG("BiosKeyboardResetEx -> Enter\n");
|
||||
&BiosKeyboardPrivate->SimpleTextIn,
|
||||
ExtendedVerification
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("BiosKeyboardResetEx -> Leave EFI_DEVICE_ERROR\n");
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
@ -2581,7 +2581,7 @@ BiosKeyboardSetState (
|
||||
(VOID **) &LegacyBios
|
||||
);
|
||||
|
||||
ASSERT_EFI_ERROR (Status); */
|
||||
ASSERT_EFI_ERROR(Status); */
|
||||
//
|
||||
// Enter critical section
|
||||
//
|
||||
@ -2599,17 +2599,17 @@ BiosKeyboardSetState (
|
||||
}
|
||||
|
||||
Status = KeyboardWrite (BiosKeyboardPrivate, 0xed);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
Status = KeyboardWaitForValue (BiosKeyboardPrivate, 0xfa, KEYBOARD_WAITFORVALUE_TIMEOUT);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
Status = KeyboardWrite (BiosKeyboardPrivate, Command);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
@ -2824,7 +2824,7 @@ InitializeBiosKeyboard(
|
||||
&gBiosKeyboardComponentName,
|
||||
&gBiosKeyboardComponentName2
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ BiosKeyboardComponentNameGetControllerName (
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiIsaIoProtocolGuid,
|
||||
@ -227,7 +227,7 @@ BiosKeyboardComponentNameGetControllerName (
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,8 @@ InitializeBiosIntCaller (
|
||||
EFI_SIZE_TO_PAGES(LegacyRegionSize),
|
||||
&LegacyRegionBase
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,8 +99,8 @@ InitializeInterruptRedirection (
|
||||
EFI_SIZE_TO_PAGES(LegacyRegionLength),
|
||||
&LegacyRegionBase
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -113,8 +113,8 @@ InitializeInterruptRedirection (
|
||||
// Get VectorBase, it should be 0x68
|
||||
//
|
||||
Status = Legacy8259->GetVector (Legacy8259, Efi8259Irq0, &ProtectedModeBaseVector);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ LegacyBiosInt86 (
|
||||
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
Stack16 = (UINT16 *)((UINT8 *) BiosDev->ThunkContext->RealModeBuffer + BiosDev->ThunkContext->RealModeBufferSize - sizeof (UINT16));
|
||||
|
||||
@ -205,7 +205,7 @@ LegacyBiosInt86 (
|
||||
// Restore protected mode interrupt state
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// End critical section
|
||||
|
@ -207,7 +207,7 @@ BiosVideoDriverBindingSupported (
|
||||
// See if the Legacy 8259 Protocol is available
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &LegacyBios);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ BiosVideoDriverBindingSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ BiosVideoDriverBindingStart (
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &ParentDevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -286,7 +286,7 @@ BiosVideoDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ BiosVideoDriverBindingStart (
|
||||
//
|
||||
if (mLegacy8259 == NULL) {
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &mLegacy8259);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ BiosVideoDriverBindingStart (
|
||||
);
|
||||
|
||||
Done:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (PciIo != NULL) {
|
||||
//
|
||||
// Release PCI I/O Protocols on the controller handle.
|
||||
@ -378,7 +378,7 @@ BiosVideoDriverBindingStop (
|
||||
for (Index = 0; Index < NumberOfChildren; Index++) {
|
||||
Status = BiosVideoChildHandleUninstall (This, Controller, ChildHandleBuffer[Index]);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
}
|
||||
}
|
||||
@ -428,7 +428,7 @@ BiosVideoChildHandleInstall (
|
||||
sizeof (BIOS_VIDEO_DEV),
|
||||
(VOID**) &BiosVideoPrivate
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ BiosVideoChildHandleInstall (
|
||||
// Check for VESA BIOS Extensions for modes that are compatible with Graphics Output
|
||||
//
|
||||
Status = BiosVideoCheckForVbe (BiosVideoPrivate);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// The VESA BIOS Extensions are not compatible with Graphics Output, so check for support
|
||||
// for the standard 640x480 16 color VGA mode
|
||||
@ -496,7 +496,7 @@ BiosVideoChildHandleInstall (
|
||||
Status = BiosVideoCheckForVga (BiosVideoPrivate);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Neither VBE nor the standard 640x480 16 color VGA mode are supported, so do
|
||||
// not produce the Graphics Output protocol. Instead, produce the VGA MiniPort Protocol.
|
||||
@ -542,7 +542,7 @@ BiosVideoChildHandleInstall (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Open the Parent Handle for the child
|
||||
//
|
||||
@ -554,7 +554,7 @@ BiosVideoChildHandleInstall (
|
||||
BiosVideoPrivate->Handle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@ -571,7 +571,7 @@ BiosVideoChildHandleInstall (
|
||||
}
|
||||
|
||||
Done:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Free private data structure
|
||||
//
|
||||
@ -615,7 +615,7 @@ BiosVideoChildHandleUninstall (
|
||||
Handle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosVideoPrivate = BIOS_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (GraphicsOutput);
|
||||
}
|
||||
|
||||
@ -627,7 +627,7 @@ BiosVideoChildHandleUninstall (
|
||||
Handle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosVideoPrivate = BIOS_VIDEO_DEV_FROM_VGA_MINI_PORT_THIS (VgaMiniPort);
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ BiosVideoChildHandleUninstall (
|
||||
NULL
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
@ -730,25 +730,25 @@ BiosVideoDeviceReleaseResource (
|
||||
// Free VGA Frame Buffer
|
||||
//
|
||||
if (BiosVideoPrivate->VgaFrameBuffer != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->VgaFrameBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->VgaFrameBuffer);
|
||||
}
|
||||
//
|
||||
// Free VBE Frame Buffer
|
||||
//
|
||||
if (BiosVideoPrivate->VbeFrameBuffer != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->VbeFrameBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->VbeFrameBuffer);
|
||||
}
|
||||
//
|
||||
// Free line buffer
|
||||
//
|
||||
if (BiosVideoPrivate->LineBuffer != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->LineBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->LineBuffer);
|
||||
}
|
||||
//
|
||||
// Free mode data
|
||||
//
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
//
|
||||
// Free memory allocated below 1MB
|
||||
@ -765,28 +765,28 @@ BiosVideoDeviceReleaseResource (
|
||||
//
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
}
|
||||
//
|
||||
// Free EDID discovered protocol occupied resource
|
||||
//
|
||||
if (BiosVideoPrivate->EdidDiscovered.Edid != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->EdidDiscovered.Edid);
|
||||
gBS->FreePool(BiosVideoPrivate->EdidDiscovered.Edid);
|
||||
}
|
||||
//
|
||||
// Free EDID active protocol occupied resource
|
||||
//
|
||||
if (BiosVideoPrivate->EdidActive.Edid != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->EdidActive.Edid);
|
||||
gBS->FreePool(BiosVideoPrivate->EdidActive.Edid);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->DevicePath!= NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->DevicePath);
|
||||
gBS->FreePool(BiosVideoPrivate->DevicePath);
|
||||
}
|
||||
|
||||
gBS->FreePool (BiosVideoPrivate);
|
||||
gBS->FreePool(BiosVideoPrivate);
|
||||
|
||||
return ;
|
||||
}
|
||||
@ -1055,7 +1055,7 @@ BiosVideoIsVga (
|
||||
sizeof (Pci) / sizeof (UINT32),
|
||||
&Pci
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return VgaCompatible;
|
||||
}
|
||||
|
||||
@ -1127,7 +1127,7 @@ BiosVideoCheckForVbe (
|
||||
BiosVideoPrivate->NumberOfPagesBelow1MB,
|
||||
&BiosVideoPrivate->PagesBelow1MB
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1242,7 +1242,7 @@ BiosVideoCheckForVbe (
|
||||
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE,
|
||||
(VOID**) &BiosVideoPrivate->EdidDiscovered.Edid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
CopyMem (
|
||||
@ -1257,7 +1257,7 @@ BiosVideoCheckForVbe (
|
||||
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE,
|
||||
(VOID**)&BiosVideoPrivate->EdidActive.Edid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
CopyMem (
|
||||
@ -1416,7 +1416,7 @@ BiosVideoCheckForVbe (
|
||||
ModeNumber * sizeof (BIOS_VIDEO_MODE_DATA),
|
||||
(VOID **) &ModeBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1429,7 +1429,7 @@ BiosVideoCheckForVbe (
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
|
||||
CurrentModeData = &ModeBuffer[ModeNumber - 1];
|
||||
@ -1494,7 +1494,7 @@ BiosVideoCheckForVbe (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE),
|
||||
(VOID **) &BiosVideoPrivate->GraphicsOutput.Mode
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
GraphicsOutputMode = BiosVideoPrivate->GraphicsOutput.Mode;
|
||||
@ -1503,7 +1503,7 @@ BiosVideoCheckForVbe (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID **) &GraphicsOutputMode->Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1517,13 +1517,13 @@ BiosVideoCheckForVbe (
|
||||
// Find the best mode to initialize
|
||||
//
|
||||
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, (UINT32) PreferMode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
for (PreferMode = 0; PreferMode < ModeNumber; PreferMode ++) {
|
||||
Status = BiosVideoGraphicsOutputSetMode (
|
||||
&BiosVideoPrivate->GraphicsOutput,
|
||||
(UINT32) PreferMode
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1539,15 +1539,15 @@ Done:
|
||||
//
|
||||
// If there was an error, then free the mode structure
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1585,7 +1585,7 @@ BiosVideoCheckForVga (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE),
|
||||
(VOID **) &BiosVideoPrivate->GraphicsOutput.Mode
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
Status = gBS->AllocatePool (
|
||||
@ -1593,7 +1593,7 @@ BiosVideoCheckForVga (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID **) &BiosVideoPrivate->GraphicsOutput.Mode->Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1607,7 +1607,7 @@ BiosVideoCheckForVga (
|
||||
sizeof (BIOS_VIDEO_MODE_DATA),
|
||||
(VOID **) &ModeBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1632,15 +1632,15 @@ Done:
|
||||
//
|
||||
// If there was an error, then free the mode structure
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
@ -1692,7 +1692,7 @@ BiosVideoGraphicsOutputQueryMode (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID**) Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1748,15 +1748,15 @@ BiosVideoGraphicsOutputSetMode (
|
||||
ModeData = &BiosVideoPrivate->ModeData[ModeNumber];
|
||||
|
||||
if (BiosVideoPrivate->LineBuffer) {
|
||||
gBS->FreePool (BiosVideoPrivate->LineBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->LineBuffer);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->VgaFrameBuffer) {
|
||||
gBS->FreePool (BiosVideoPrivate->VgaFrameBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->VgaFrameBuffer);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->VbeFrameBuffer) {
|
||||
gBS->FreePool (BiosVideoPrivate->VbeFrameBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->VbeFrameBuffer);
|
||||
}
|
||||
|
||||
BiosVideoPrivate->LineBuffer = NULL;
|
||||
@ -1765,7 +1765,7 @@ BiosVideoGraphicsOutputSetMode (
|
||||
ModeData->BytesPerScanLine,
|
||||
(VOID**) &BiosVideoPrivate->LineBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -1783,7 +1783,7 @@ BiosVideoGraphicsOutputSetMode (
|
||||
4 * 480 * 80,
|
||||
(VOID**) &BiosVideoPrivate->VgaFrameBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -1802,7 +1802,7 @@ BiosVideoGraphicsOutputSetMode (
|
||||
ModeData->BytesPerScanLine * ModeData->VerticalResolution,
|
||||
(VOID**) &BiosVideoPrivate->VbeFrameBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -1833,7 +1833,7 @@ BiosVideoGraphicsOutputSetMode (
|
||||
(ModeData->BytesPerScanLine * ModeData->VerticalResolution) >> 2,
|
||||
BiosVideoPrivate->VbeFrameBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -1907,7 +1907,7 @@ CopyVideoBuffer (
|
||||
TotalBytes,
|
||||
VbeBuffer
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1925,7 +1925,7 @@ CopyVideoBuffer (
|
||||
UnalignedBytes,
|
||||
VbeBuffer
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
FrameBufferAddr += UnalignedBytes;
|
||||
VbeBuffer += UnalignedBytes;
|
||||
}
|
||||
@ -1948,7 +1948,7 @@ CopyVideoBuffer (
|
||||
CopyBlockNum,
|
||||
VbeBuffer
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
if (RemainingBytes != 0) {
|
||||
@ -1962,7 +1962,7 @@ CopyVideoBuffer (
|
||||
RemainingBytes,
|
||||
VbeBuffer
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ BiosVideoDriverBindingSupported (
|
||||
// See if the Legacy 8259 Protocol is available
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &LegacyBios);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG("no Legacy8259 %r\n", Status);
|
||||
return Status;
|
||||
}
|
||||
@ -243,7 +243,7 @@ BiosVideoDriverBindingSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG("no PciIoProtocol %r\n", Status);
|
||||
return Status;
|
||||
}
|
||||
@ -296,7 +296,7 @@ BiosVideoDriverBindingStart (
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &ParentDevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ BiosVideoDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ BiosVideoDriverBindingStart (
|
||||
//
|
||||
if (mLegacy8259 == NULL) {
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &mLegacy8259);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ BiosVideoDriverBindingStart (
|
||||
);
|
||||
|
||||
Done:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (PciIo != NULL) {
|
||||
//
|
||||
// Release PCI I/O Protocols on the controller handle.
|
||||
@ -413,7 +413,7 @@ BiosVideoDriverBindingStop (
|
||||
for (Index = 0; Index < NumberOfChildren; Index++) {
|
||||
Status = BiosVideoChildHandleUninstall (This, Controller, ChildHandleBuffer[Index]);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
}
|
||||
}
|
||||
@ -464,7 +464,7 @@ BiosVideoChildHandleInstall (
|
||||
sizeof (BIOS_VIDEO_DEV),
|
||||
(VOID**) &BiosVideoPrivate
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ BiosVideoChildHandleInstall (
|
||||
// Check for VESA BIOS Extensions for modes that are compatible with Graphics Output
|
||||
//
|
||||
Status = BiosVideoCheckForVbe (BiosVideoPrivate);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// The VESA BIOS Extensions are not compatible with Graphics Output, so check for support
|
||||
// for the standard 640x480 16 color VGA mode
|
||||
@ -553,7 +553,7 @@ BiosVideoChildHandleInstall (
|
||||
Status = BiosVideoCheckForVga (BiosVideoPrivate);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Neither VBE nor the standard 640x480 16 color VGA mode are supported, so do
|
||||
// not produce the Graphics Output protocol. Instead, produce the VGA MiniPort Protocol.
|
||||
@ -599,7 +599,7 @@ BiosVideoChildHandleInstall (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Open the Parent Handle for the child
|
||||
//
|
||||
@ -611,7 +611,7 @@ BiosVideoChildHandleInstall (
|
||||
BiosVideoPrivate->Handle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
//
|
||||
@ -633,7 +633,7 @@ BiosVideoChildHandleInstall (
|
||||
}
|
||||
|
||||
Done:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Free private data structure
|
||||
//
|
||||
@ -680,7 +680,7 @@ BiosVideoChildHandleUninstall (
|
||||
Handle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosVideoPrivate = BIOS_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (GraphicsOutput);
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ BiosVideoChildHandleUninstall (
|
||||
Handle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
BiosVideoPrivate = BIOS_VIDEO_DEV_FROM_VGA_MINI_PORT_THIS (VgaMiniPort);
|
||||
}
|
||||
|
||||
@ -734,7 +734,7 @@ BiosVideoChildHandleUninstall (
|
||||
NULL
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
@ -795,25 +795,25 @@ BiosVideoDeviceReleaseResource (
|
||||
// Free VGA Frame Buffer
|
||||
//
|
||||
if (BiosVideoPrivate->VgaFrameBuffer != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->VgaFrameBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->VgaFrameBuffer);
|
||||
}
|
||||
//
|
||||
// Free VBE Frame Buffer
|
||||
//
|
||||
if (BiosVideoPrivate->VbeFrameBuffer != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->VbeFrameBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->VbeFrameBuffer);
|
||||
}
|
||||
//
|
||||
// Free line buffer
|
||||
//
|
||||
if (BiosVideoPrivate->LineBuffer != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->LineBuffer);
|
||||
gBS->FreePool(BiosVideoPrivate->LineBuffer);
|
||||
}
|
||||
//
|
||||
// Free mode data
|
||||
//
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
//
|
||||
// Free memory allocated below 1MB
|
||||
@ -830,28 +830,28 @@ BiosVideoDeviceReleaseResource (
|
||||
//
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
}
|
||||
//
|
||||
// Free EDID discovered protocol occupied resource
|
||||
//
|
||||
if (BiosVideoPrivate->EdidDiscovered.Edid != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->EdidDiscovered.Edid);
|
||||
gBS->FreePool(BiosVideoPrivate->EdidDiscovered.Edid);
|
||||
}
|
||||
//
|
||||
// Free EDID active protocol occupied resource
|
||||
//
|
||||
if (BiosVideoPrivate->EdidActive.Edid != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->EdidActive.Edid);
|
||||
gBS->FreePool(BiosVideoPrivate->EdidActive.Edid);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->DevicePath!= NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->DevicePath);
|
||||
gBS->FreePool(BiosVideoPrivate->DevicePath);
|
||||
}
|
||||
|
||||
gBS->FreePool (BiosVideoPrivate);
|
||||
gBS->FreePool(BiosVideoPrivate);
|
||||
|
||||
return ;
|
||||
}
|
||||
@ -1135,7 +1135,7 @@ BiosVideoIsVga (
|
||||
sizeof (Pci) / sizeof (UINT32),
|
||||
&Pci
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return VgaCompatible;
|
||||
}
|
||||
|
||||
@ -1239,7 +1239,7 @@ BiosVideoCheckForVbe (
|
||||
BiosVideoPrivate->NumberOfPagesBelow1MB,
|
||||
&BiosVideoPrivate->PagesBelow1MB
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1275,7 +1275,7 @@ BiosVideoCheckForVbe (
|
||||
NULL,
|
||||
(VOID **) &EdidOverride
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Allocate double size of VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE to avoid overflow
|
||||
//
|
||||
@ -1293,7 +1293,7 @@ BiosVideoCheckForVbe (
|
||||
&EdidOverrideDataSize,
|
||||
(UINT8 **) &EdidOverrideDataBlock
|
||||
);
|
||||
if (!EFI_ERROR (Status) &&
|
||||
if (!EFI_ERROR(Status) &&
|
||||
EdidAttributes == 0 &&
|
||||
EdidOverrideDataSize != 0) {
|
||||
//
|
||||
@ -1429,7 +1429,7 @@ BiosVideoCheckForVbe (
|
||||
EdidActiveDataSize,
|
||||
(VOID**) &BiosVideoPrivate->EdidDiscovered.Edid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
CopyMem (
|
||||
@ -1444,7 +1444,7 @@ BiosVideoCheckForVbe (
|
||||
EdidActiveDataSize,
|
||||
(VOID**)&BiosVideoPrivate->EdidActive.Edid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
CopyMem (
|
||||
@ -1710,7 +1710,7 @@ BiosVideoCheckForVbe (
|
||||
ModeNumber * sizeof (BIOS_VIDEO_MODE_DATA),
|
||||
(VOID **) &ModeBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1723,7 +1723,7 @@ BiosVideoCheckForVbe (
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
|
||||
CurrentModeData = &ModeBuffer[ModeNumber - 1];
|
||||
@ -1791,7 +1791,7 @@ BiosVideoCheckForVbe (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE),
|
||||
(VOID **) &BiosVideoPrivate->GraphicsOutput.Mode
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
GraphicsOutputMode = BiosVideoPrivate->GraphicsOutput.Mode;
|
||||
@ -1800,7 +1800,7 @@ BiosVideoCheckForVbe (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID **) &GraphicsOutputMode->Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1816,7 +1816,7 @@ BiosVideoCheckForVbe (
|
||||
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, (UINT32) PreferMode);
|
||||
DBG(" SetMode pref %d (%d) = %r\n", PreferMode, (UINT32) PreferMode, Status);
|
||||
// MsgLog("setPreferMode %d status=%r\n", PreferMode, Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
for (PreferMode = 0; PreferMode < ModeNumber; PreferMode ++) {
|
||||
// DBG("try to set %d...", PreferMode);
|
||||
Status = BiosVideoGraphicsOutputSetMode (
|
||||
@ -1824,7 +1824,7 @@ BiosVideoCheckForVbe (
|
||||
(UINT32) PreferMode
|
||||
);
|
||||
DBG(" SetMode pref %d (%d) = %r\n", PreferMode, (UINT32) PreferMode, Status);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
// DBG("success\n");
|
||||
break;
|
||||
}
|
||||
@ -1841,15 +1841,15 @@ Done:
|
||||
//
|
||||
// If there was an error, then free the mode structure
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1887,7 +1887,7 @@ BiosVideoCheckForVga (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE),
|
||||
(VOID **) &BiosVideoPrivate->GraphicsOutput.Mode
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
Status = gBS->AllocatePool (
|
||||
@ -1895,7 +1895,7 @@ BiosVideoCheckForVga (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID **) &BiosVideoPrivate->GraphicsOutput.Mode->Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1909,7 +1909,7 @@ BiosVideoCheckForVga (
|
||||
sizeof (BIOS_VIDEO_MODE_DATA),
|
||||
(VOID **) &ModeBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1936,15 +1936,15 @@ Done:
|
||||
//
|
||||
// If there was an error, then free the mode structure
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (BiosVideoPrivate->ModeData != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->ModeData);
|
||||
gBS->FreePool(BiosVideoPrivate->ModeData);
|
||||
}
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
}
|
||||
gBS->FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
gBS->FreePool(BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
@ -1996,7 +1996,7 @@ BiosVideoGraphicsOutputQueryMode (
|
||||
sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION),
|
||||
(VOID**) Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -2070,15 +2070,15 @@ BiosVideoGraphicsOutputSetMode (
|
||||
|
||||
|
||||
if (BiosVideoPrivate->LineBuffer) {
|
||||
FreePool (BiosVideoPrivate->LineBuffer);
|
||||
FreePool(BiosVideoPrivate->LineBuffer);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->VgaFrameBuffer) {
|
||||
FreePool (BiosVideoPrivate->VgaFrameBuffer);
|
||||
FreePool(BiosVideoPrivate->VgaFrameBuffer);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->VbeFrameBuffer) {
|
||||
FreePool (BiosVideoPrivate->VbeFrameBuffer);
|
||||
FreePool(BiosVideoPrivate->VbeFrameBuffer);
|
||||
}
|
||||
|
||||
BiosVideoPrivate->LineBuffer = (UINT8 *) AllocatePool (ModeData->BytesPerScanLine);
|
||||
@ -2142,7 +2142,7 @@ BiosVideoGraphicsOutputSetMode (
|
||||
(ModeData->BytesPerScanLine * ModeData->VerticalResolution) >> 2,
|
||||
BiosVideoPrivate->VbeFrameBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -2192,15 +2192,15 @@ BiosVideoSetModeWorker (
|
||||
IA32_REGISTER_SET Regs;
|
||||
|
||||
if (BiosVideoPrivate->LineBuffer != NULL) {
|
||||
FreePool (BiosVideoPrivate->LineBuffer);
|
||||
FreePool(BiosVideoPrivate->LineBuffer);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->VgaFrameBuffer != NULL) {
|
||||
FreePool (BiosVideoPrivate->VgaFrameBuffer);
|
||||
FreePool(BiosVideoPrivate->VgaFrameBuffer);
|
||||
}
|
||||
|
||||
if (BiosVideoPrivate->VbeFrameBuffer != NULL) {
|
||||
FreePool (BiosVideoPrivate->VbeFrameBuffer);
|
||||
FreePool(BiosVideoPrivate->VbeFrameBuffer);
|
||||
}
|
||||
|
||||
BiosVideoPrivate->LineBuffer = (UINT8 *) AllocatePool (ModeData->BytesPerScanLine);
|
||||
@ -2264,7 +2264,7 @@ BiosVideoSetModeWorker (
|
||||
(ModeData->BytesPerScanLine * ModeData->VerticalResolution) >> 2,
|
||||
BiosVideoPrivate->VbeFrameBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
} */
|
||||
}
|
||||
@ -2346,7 +2346,7 @@ BiosVideoGraphicsOutputSetMode (
|
||||
}
|
||||
|
||||
Status = BiosVideoSetModeWorker (BiosVideoPrivate, ModeData, BiosVideoPrivate->DevicePath);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("BV - ERROR %r\n", Status);
|
||||
return Status;
|
||||
}
|
||||
@ -2421,7 +2421,7 @@ CopyVideoBuffer (
|
||||
TotalBytes,
|
||||
VbeBuffer
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2439,8 +2439,8 @@ CopyVideoBuffer (
|
||||
UnalignedBytes,
|
||||
VbeBuffer
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
FrameBufferAddr += UnalignedBytes;
|
||||
@ -2465,8 +2465,8 @@ CopyVideoBuffer (
|
||||
CopyBlockNum,
|
||||
VbeBuffer
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2482,8 +2482,8 @@ CopyVideoBuffer (
|
||||
RemainingBytes,
|
||||
VbeBuffer
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +43,8 @@ InitializeBiosIntCaller (
|
||||
EFI_SIZE_TO_PAGES(LegacyRegionSize),
|
||||
&LegacyRegionBase
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,8 +99,8 @@ InitializeInterruptRedirection (
|
||||
EFI_SIZE_TO_PAGES(LegacyRegionLength),
|
||||
&LegacyRegionBase
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -113,8 +113,8 @@ InitializeInterruptRedirection (
|
||||
// Get VectorBase, it should be 0x68
|
||||
//
|
||||
Status = Legacy8259->GetVector (Legacy8259, Efi8259Irq0, &ProtectedModeBaseVector);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ LegacyBiosInt86 (
|
||||
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
Stack16 = (UINT16 *)((UINT8 *) BiosDev->ThunkContext->RealModeBuffer + BiosDev->ThunkContext->RealModeBufferSize - sizeof (UINT16));
|
||||
|
||||
@ -205,7 +205,7 @@ LegacyBiosInt86 (
|
||||
// Restore protected mode interrupt state
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// End critical section
|
||||
|
@ -1137,8 +1137,8 @@ Returns:
|
||||
// Find the Legacy8259 protocol.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiLegacy8259ProtocolGuid, NULL, (VOID **) &gLegacy8259);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1146,8 +1146,8 @@ Returns:
|
||||
// Get the interrupt vector number corresponding to IRQ0 from the 8259 driver
|
||||
//
|
||||
Status = gLegacy8259->GetVector (gLegacy8259, Efi8259Irq0, (UINT8 *) &mTimerVector);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1187,8 +1187,8 @@ Returns:
|
||||
for (Irq = Efi8259Irq1; Irq <= Efi8259Irq15; Irq++) {
|
||||
InterruptVector = 0;
|
||||
Status = gLegacy8259->GetVector (gLegacy8259, Irq, (UINT8 *) &InterruptVector);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
InstallInterruptHandler (InterruptVector, SystemTimerHandler);
|
||||
@ -1206,7 +1206,7 @@ Returns:
|
||||
&mCpu,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1233,8 +1233,8 @@ InitializeBiosIntCaller (
|
||||
EFI_SIZE_TO_PAGES(LegacyRegionSize),
|
||||
&LegacyRegionBase
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
mThunkContext.RealModeBuffer = 0;
|
||||
return;
|
||||
}
|
||||
@ -1297,8 +1297,8 @@ LegacyBiosInt86 (
|
||||
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
||||
//
|
||||
Status = gLegacy8259->SetMode (gLegacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if ((Eflags & EFI_CPU_EFLAGS_IF) != 0) {
|
||||
EnableInterrupts ();
|
||||
}
|
||||
@ -1323,8 +1323,8 @@ LegacyBiosInt86 (
|
||||
// Restore protected mode interrupt state
|
||||
//
|
||||
Status = gLegacy8259->SetMode (gLegacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
// if (EFI_ERROR(Status)) {
|
||||
// return FALSE;
|
||||
// }
|
||||
|
||||
|
@ -145,7 +145,7 @@ GraphicsConsoleControllerDriverSupported (
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||
if (EFI_ERROR(Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||
//
|
||||
// Open Graphics Output Protocol failed, try to open UGA Draw Protocol
|
||||
//
|
||||
@ -158,7 +158,7 @@ GraphicsConsoleControllerDriverSupported (
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ GraphicsConsoleControllerDriverSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
@ -429,7 +429,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
@ -463,14 +463,14 @@ GraphicsConsoleControllerDriverStart (
|
||||
&SizeOfInfo,
|
||||
&Info
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if ((Info->HorizontalResolution >= HorizontalResolution) &&
|
||||
(Info->VerticalResolution >= VerticalResolution)) {
|
||||
HorizontalResolution = Info->HorizontalResolution;
|
||||
VerticalResolution = Info->VerticalResolution;
|
||||
ModeNumber = ModeIndex;
|
||||
}
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
}
|
||||
}
|
||||
if ((HorizontalResolution == 0x0) || (VerticalResolution == 0x0)) {
|
||||
@ -488,7 +488,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
VerticalResolution,
|
||||
&ModeNumber
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// if not supporting current mode, try 800x600 which is required by UEFI/EFI spec
|
||||
//
|
||||
@ -499,7 +499,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
&ModeNumber
|
||||
);
|
||||
Mode = Private->GraphicsOutput->Mode;
|
||||
if (EFI_ERROR (Status) && Mode->MaxMode != 0) {
|
||||
if (EFI_ERROR(Status) && Mode->MaxMode != 0) {
|
||||
//
|
||||
// Set default mode failed or device don't support default mode, then get the current mode information
|
||||
//
|
||||
@ -522,7 +522,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
ColorDepth,
|
||||
RefreshRate
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Try to set 800*600 which is required by UEFI/EFI spec
|
||||
//
|
||||
@ -533,7 +533,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
ColorDepth,
|
||||
RefreshRate
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = Private->UgaDraw->GetMode (
|
||||
Private->UgaDraw,
|
||||
&HorizontalResolution,
|
||||
@ -541,7 +541,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
&ColorDepth,
|
||||
&RefreshRate
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Error;
|
||||
}
|
||||
}
|
||||
@ -559,7 +559,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
&Private->ModeData
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
@ -570,11 +570,11 @@ GraphicsConsoleControllerDriverStart (
|
||||
/*
|
||||
DEBUG_CODE_BEGIN ();
|
||||
Status = GraphicsConsoleConOutSetMode (&Private->SimpleTextOutput, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Error;
|
||||
}
|
||||
Status = GraphicsConsoleConOutOutputString (&Private->SimpleTextOutput, (CHAR16 *)L"Graphics Console Started\n\r");
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Error;
|
||||
}
|
||||
DEBUG_CODE_END ();
|
||||
@ -590,7 +590,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
);
|
||||
|
||||
Error:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Close the GOP and UGA Draw Protocol
|
||||
//
|
||||
@ -611,17 +611,17 @@ Error:
|
||||
}
|
||||
|
||||
if (Private->LineBuffer != NULL) {
|
||||
FreePool (Private->LineBuffer);
|
||||
FreePool(Private->LineBuffer);
|
||||
}
|
||||
|
||||
if (Private->ModeData != NULL) {
|
||||
FreePool (Private->ModeData);
|
||||
FreePool(Private->ModeData);
|
||||
}
|
||||
|
||||
//
|
||||
// Free private data
|
||||
//
|
||||
FreePool (Private);
|
||||
FreePool(Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -666,7 +666,7 @@ GraphicsConsoleControllerDriverStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_STARTED;
|
||||
}
|
||||
|
||||
@ -678,7 +678,7 @@ GraphicsConsoleControllerDriverStop (
|
||||
&Private->SimpleTextOutput
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Close the GOP or UGA IO Protocol
|
||||
//
|
||||
@ -699,17 +699,17 @@ GraphicsConsoleControllerDriverStop (
|
||||
}
|
||||
|
||||
if (Private->LineBuffer != NULL) {
|
||||
FreePool (Private->LineBuffer);
|
||||
FreePool(Private->LineBuffer);
|
||||
}
|
||||
|
||||
if (Private->ModeData != NULL) {
|
||||
FreePool (Private->ModeData);
|
||||
FreePool(Private->ModeData);
|
||||
}
|
||||
|
||||
//
|
||||
// Free our instance data
|
||||
//
|
||||
FreePool (Private);
|
||||
FreePool(Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -758,7 +758,7 @@ CheckModeSupported (
|
||||
&SizeOfInfo,
|
||||
&Info
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if ((Info->HorizontalResolution == HorizontalResolution) &&
|
||||
(Info->VerticalResolution == VerticalResolution)) {
|
||||
if ((GraphicsOutput->Mode->Info->HorizontalResolution == HorizontalResolution) &&
|
||||
@ -766,17 +766,17 @@ CheckModeSupported (
|
||||
//
|
||||
// If video device has been set to this mode, we do not need to SetMode again
|
||||
//
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
break;
|
||||
} else {
|
||||
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
FreePool (Info);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
FreePool(Info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -820,7 +820,7 @@ EfiLocateHiiProtocol (
|
||||
(VOID **) &Handle
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -830,7 +830,7 @@ EfiLocateHiiProtocol (
|
||||
(VOID **) &mHiiDatabase
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -873,7 +873,7 @@ GraphicsConsoleConOutReset (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
Status = This->SetMode (This, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
Status = This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));
|
||||
@ -1136,7 +1136,7 @@ GraphicsConsoleConOutOutputString (
|
||||
}
|
||||
|
||||
Status = DrawUnicodeWeightAtCursorN (This, WString, Count);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Warning = TRUE;
|
||||
}
|
||||
//
|
||||
@ -1213,12 +1213,12 @@ GraphicsConsoleConOutTestString (
|
||||
NULL
|
||||
);
|
||||
if (Blt != NULL) {
|
||||
FreePool (Blt);
|
||||
FreePool(Blt);
|
||||
Blt = NULL;
|
||||
}
|
||||
Count++;
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
@ -1357,7 +1357,7 @@ GraphicsConsoleConOutSetMode (
|
||||
//
|
||||
FlushCursor (This);
|
||||
|
||||
FreePool (Private->LineBuffer);
|
||||
FreePool(Private->LineBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
@ -1385,7 +1385,7 @@ GraphicsConsoleConOutSetMode (
|
||||
// Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new graphics mode
|
||||
//
|
||||
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeData->GopModeNumber);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// The mode set operation failed
|
||||
//
|
||||
@ -1419,7 +1419,7 @@ GraphicsConsoleConOutSetMode (
|
||||
&ColorDepth,
|
||||
&RefreshRate
|
||||
);
|
||||
if (EFI_ERROR (Status) || HorizontalResolution != ModeData->GopWidth || VerticalResolution != ModeData->GopHeight) {
|
||||
if (EFI_ERROR(Status) || HorizontalResolution != ModeData->GopWidth || VerticalResolution != ModeData->GopHeight) {
|
||||
//
|
||||
// Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new graphics mode
|
||||
//
|
||||
@ -1430,7 +1430,7 @@ GraphicsConsoleConOutSetMode (
|
||||
32,
|
||||
60
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// The mode set operation failed
|
||||
//
|
||||
@ -1793,7 +1793,7 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
String = AllocateCopyPool ((Count + 1) * sizeof (CHAR16), UnicodeWeight);
|
||||
if (String == NULL) {
|
||||
FreePool (Blt);
|
||||
FreePool(Blt);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
//
|
||||
@ -1803,8 +1803,8 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
FontInfo = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (sizeof (EFI_FONT_DISPLAY_INFO));
|
||||
if (FontInfo == NULL) {
|
||||
FreePool (Blt);
|
||||
FreePool (String);
|
||||
FreePool(Blt);
|
||||
FreePool(String);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
//
|
||||
@ -1842,8 +1842,8 @@ DrawUnicodeWeightAtCursorN (
|
||||
|
||||
Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||
if (Blt->Image.Bitmap == NULL) {
|
||||
FreePool (Blt);
|
||||
FreePool (String);
|
||||
FreePool(Blt);
|
||||
FreePool(String);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -1865,7 +1865,7 @@ DrawUnicodeWeightAtCursorN (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Line breaks are handled by caller of DrawUnicodeWeightAtCursorN, so the updated parameter RowInfoArraySize by StringToImage will
|
||||
// always be 1 or 0 (if there is no valid Unicode Char can be printed). ASSERT here to make sure.
|
||||
@ -1886,20 +1886,20 @@ DrawUnicodeWeightAtCursorN (
|
||||
);
|
||||
}
|
||||
|
||||
FreePool (RowInfoArray);
|
||||
FreePool (Blt->Image.Bitmap);
|
||||
FreePool(RowInfoArray);
|
||||
FreePool(Blt->Image.Bitmap);
|
||||
} else {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (Blt != NULL) {
|
||||
FreePool (Blt);
|
||||
FreePool(Blt);
|
||||
}
|
||||
if (String != NULL) {
|
||||
FreePool (String);
|
||||
FreePool(String);
|
||||
}
|
||||
if (FontInfo != NULL) {
|
||||
FreePool (FontInfo);
|
||||
FreePool(FontInfo);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
@ -2054,7 +2054,7 @@ RegisterFontPackage (
|
||||
NULL,
|
||||
(VOID **) &HiiDatabase
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Add 4 bytes to the header for entire length for HiiAddPackages use only.
|
||||
@ -2098,7 +2098,7 @@ RegisterFontPackage (
|
||||
Package,
|
||||
NULL
|
||||
);
|
||||
FreePool (Package);
|
||||
FreePool(Package);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2142,7 +2142,7 @@ InitializeGraphicsConsole (
|
||||
&gGraphicsConsoleComponentName,
|
||||
&gGraphicsConsoleComponentName2
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ AcpiPlatformEntryPoint (
|
||||
// Find the AcpiTable protocol
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID**)&AcpiTable);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
#if DEBUG_ACPI
|
||||
@ -479,7 +479,7 @@ AcpiPlatformEntryPoint (
|
||||
&gEfiLoadedImageProtocolGuid,
|
||||
(VOID*)&LoadedImage
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
Status = gBS->HandleProtocol (
|
||||
@ -487,7 +487,7 @@ AcpiPlatformEntryPoint (
|
||||
&gEfiSimpleFileSystemProtocolGuid,
|
||||
(VOID *) &Volume
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ AcpiPlatformEntryPoint (
|
||||
//
|
||||
// Open the root directory of the volume
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = Volume->OpenVolume (Volume, &Root);
|
||||
}
|
||||
#else //Multiple FS protocols
|
||||
@ -513,9 +513,9 @@ AcpiPlatformEntryPoint (
|
||||
// Loop through all the file system structures and cache the file system info data
|
||||
for (Index =0; Index < mFsCount; Index++) {
|
||||
Status = gBS->HandleProtocol (mFs[Index], &gEfiSimpleFileSystemProtocolGuid, (VOID **)&Volume);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = Volume->OpenVolume (Volume, &Root);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
// Get information about the volume
|
||||
/* Size = 0;
|
||||
Status = Root->GetInfo (Root, &gEfiFileSystemInfoGuid, &Size, mFsInfo[Index]);
|
||||
@ -540,7 +540,7 @@ AcpiPlatformEntryPoint (
|
||||
StrCpyS(FileName, 32, ACPInames[Index]);
|
||||
// DBG(L"File probe %s\n", FileName);
|
||||
Status = Root->Open (Root, &ThisFile, FileName, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
/* Get right size we need to allocate */
|
||||
@ -556,7 +556,7 @@ AcpiPlatformEntryPoint (
|
||||
DBG(L"Buffer size %d\n", BufferSize);
|
||||
// DBG(L"GetInfo success!\n");
|
||||
Status = gBS->AllocatePool (EfiBootServicesData, BufferSize, (VOID **) &Info);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"No pool!\n");
|
||||
continue;
|
||||
}
|
||||
@ -568,11 +568,11 @@ AcpiPlatformEntryPoint (
|
||||
);
|
||||
FileSize = Info->FileSize;
|
||||
// DBG(L"FileSize = %d!\n", FileSize);
|
||||
gBS->FreePool (Info);
|
||||
gBS->FreePool(Info);
|
||||
//Slice - this is the problem.
|
||||
// FileBuffer = AllocatePool(FileSize);
|
||||
Status = gBS->AllocatePool (EfiBootServicesData, FileSize, (VOID **) &FileBuffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"No pool for FileBuffer size %d!\n", FileSize);
|
||||
continue;
|
||||
}
|
||||
@ -582,7 +582,7 @@ AcpiPlatformEntryPoint (
|
||||
EFI_SIZE_TO_PAGES(FileSize),
|
||||
FileBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"No pool for FileBuffer size %d!\n", FileSize);
|
||||
continue;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ SdtNotifyAcpiList (
|
||||
&AcpiTableInstance->TableList,
|
||||
&Table
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Find the notify
|
||||
@ -354,7 +354,7 @@ SdtUnregisterNotify (
|
||||
// Remove it from list and free the node.
|
||||
//
|
||||
RemoveEntryList (&(CurrentNotifyList->Link));
|
||||
FreePool (CurrentNotifyList);
|
||||
FreePool(CurrentNotifyList);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ SdtOpenSdtTable (
|
||||
&AcpiTableInstance->TableList,
|
||||
&Table
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ SdtOpenEx (
|
||||
|
||||
AmlHandle->Size = AmlGetObjectSize (AmlByteEncoding, Buffer, BufferSize);
|
||||
if (AmlHandle->Size == 0) {
|
||||
FreePool (AmlHandle);
|
||||
FreePool(AmlHandle);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -572,7 +572,7 @@ Open (
|
||||
}
|
||||
|
||||
Status = SdtGetMaxAmlBufferSize (Buffer, &MaxSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -614,12 +614,12 @@ Close (
|
||||
//
|
||||
if (AmlHandle->Modified) {
|
||||
Status = SdtUpdateAmlChecksum (AmlHandle->Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
FreePool (AmlHandle);
|
||||
FreePool(AmlHandle);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -681,7 +681,7 @@ GetOption (
|
||||
// Parse option
|
||||
//
|
||||
Status = AmlParseOptionHandleCommon (AmlHandle, (AML_OP_PARSE_INDEX)Index, DataType, (VOID **)Data, DataSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -745,7 +745,7 @@ SetOption (
|
||||
// Parse option
|
||||
//
|
||||
Status = AmlParseOptionHandleCommon (AmlHandle, (AML_OP_PARSE_INDEX)Index, &DataType, &OrgData, &OrgDataSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (DataType == EFI_ACPI_DATA_TYPE_NONE) {
|
||||
@ -820,7 +820,7 @@ GetChild (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (Buffer == NULL) {
|
||||
@ -858,7 +858,7 @@ SdtFindPathFromNonRoot (
|
||||
// For non-root handle, we need search from THIS node instead of ROOT.
|
||||
//
|
||||
Status = AmlFindPath (AmlHandle, AmlPath, &Buffer, FALSE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (Buffer == NULL) {
|
||||
@ -931,7 +931,7 @@ SdtFindPathFromRoot (
|
||||
ChildHandle = NULL;
|
||||
while (TRUE) {
|
||||
Status = GetChild (HandleIn, &ChildHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -948,7 +948,7 @@ SdtFindPathFromRoot (
|
||||
//
|
||||
AmlHandle = (EFI_AML_HANDLE *)ChildHandle;
|
||||
Status = AmlFindPath (AmlHandle, AmlPath, &Buffer, TRUE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -957,7 +957,7 @@ SdtFindPathFromRoot (
|
||||
// Great! Find it, open
|
||||
//
|
||||
Status = SdtOpenEx (Buffer, (UINTN)AmlHandle->Buffer + AmlHandle->Size - (UINTN)Buffer, HandleOut);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
//
|
||||
@ -1031,7 +1031,7 @@ FindPath (
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
FreePool (AmlPath);
|
||||
FreePool(AmlPath);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -1062,7 +1062,7 @@ ExitPmAuthNotification (
|
||||
NULL,
|
||||
&DxeSmmReadyToLock
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -1074,8 +1074,8 @@ ExitPmAuthNotification (
|
||||
&gEfiAcpiSdtProtocolGuid,
|
||||
&mPrivateData->AcpiSdtProtocol
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -60,8 +60,8 @@ InitializeAcpiTableDxe (
|
||||
// Call all constructors per produced protocols
|
||||
//
|
||||
Status = AcpiTableAcpiTableConstructor (PrivateData);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (PrivateData);
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->FreePool(PrivateData);
|
||||
return EFI_LOAD_ERROR;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ InitializeAcpiTableDxe (
|
||||
NULL
|
||||
);
|
||||
// }
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Register the event to install ACPI Table into EFI System Table
|
||||
|
@ -164,7 +164,7 @@ SetAcpiTable (
|
||||
// Delete the table list entry
|
||||
//
|
||||
Status = RemoveTableFromList (AcpiTableInstance, Version, *Handle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Should not get an error here ever, but abort if we do.
|
||||
//
|
||||
@ -193,7 +193,7 @@ SetAcpiTable (
|
||||
}
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Should not get an error here ever, but abort if we do.
|
||||
//
|
||||
@ -270,7 +270,7 @@ PublishTables (
|
||||
if (((Version & EFI_ACPI_TABLE_VERSION_1_0B) != 0) &&
|
||||
!AcpiTableInstance->TablesInstalled1) {
|
||||
Status = gBS->InstallConfigurationTable (&gEfiAcpi10TableGuid, AcpiTableInstance->Rsdp1);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ PublishTables (
|
||||
(Version & EFI_ACPI_TABLE_VERSION_3_0) != 0) &&
|
||||
!AcpiTableInstance->TablesInstalled3) {
|
||||
Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, AcpiTableInstance->Rsdp3);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@ -360,20 +360,20 @@ InstallAcpiTable (
|
||||
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0,
|
||||
TableKey
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = PublishTables (
|
||||
AcpiTableInstance,
|
||||
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0
|
||||
);
|
||||
}
|
||||
FreePool (AcpiTableBufferConst);
|
||||
FreePool(AcpiTableBufferConst);
|
||||
|
||||
//
|
||||
// Add a new table successfully, notify registed callback
|
||||
//
|
||||
/*
|
||||
if (FeaturePcdGet (PcdInstallAcpiSdtProtocol)) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
SdtNotifyAcpiList (
|
||||
AcpiTableInstance,
|
||||
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0,
|
||||
@ -421,14 +421,14 @@ UninstallAcpiTable (
|
||||
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0,
|
||||
&TableKey
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = PublishTables (
|
||||
AcpiTableInstance,
|
||||
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_FOUND;
|
||||
} else {
|
||||
return EFI_SUCCESS;
|
||||
@ -491,7 +491,7 @@ ReallocateAcpiTableBuffer (
|
||||
&PageAddress
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -656,8 +656,8 @@ AddTableToList (
|
||||
//
|
||||
// Check return value from memory alloc.
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (CurrentTableList);
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->FreePool(CurrentTableList);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
//
|
||||
@ -698,7 +698,7 @@ AddTableToList (
|
||||
((Version & EFI_ACPI_TABLE_VERSION_3_0) != 0 && AcpiTableInstance->Fadt3 != NULL)
|
||||
) {
|
||||
gBS->FreePages (CurrentTableList->PageAddress, CurrentTableList->NumberOfPages);
|
||||
gBS->FreePool (CurrentTableList);
|
||||
gBS->FreePool(CurrentTableList);
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
//
|
||||
@ -828,7 +828,7 @@ AddTableToList (
|
||||
((Version & EFI_ACPI_TABLE_VERSION_3_0) != 0 && AcpiTableInstance->Facs3 != NULL)
|
||||
) {
|
||||
gBS->FreePages (CurrentTableList->PageAddress, CurrentTableList->NumberOfPages);
|
||||
gBS->FreePool (CurrentTableList);
|
||||
gBS->FreePool(CurrentTableList);
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
//
|
||||
@ -905,7 +905,7 @@ AddTableToList (
|
||||
((Version & EFI_ACPI_TABLE_VERSION_3_0) != 0 && AcpiTableInstance->Dsdt3 != NULL)
|
||||
) {
|
||||
gBS->FreePages (CurrentTableList->PageAddress, CurrentTableList->NumberOfPages);
|
||||
gBS->FreePool (CurrentTableList);
|
||||
gBS->FreePool(CurrentTableList);
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
//
|
||||
@ -1015,8 +1015,8 @@ AddTableToList (
|
||||
//
|
||||
if (AcpiTableInstance->NumberOfTableEntries1 >= mEfiAcpiMaxNumTables) {
|
||||
Status = ReallocateAcpiTableBuffer (AcpiTableInstance);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -1052,8 +1052,8 @@ AddTableToList (
|
||||
//
|
||||
if (AcpiTableInstance->NumberOfTableEntries3 >= mEfiAcpiMaxNumTables) {
|
||||
Status = ReallocateAcpiTableBuffer (AcpiTableInstance);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -1544,7 +1544,7 @@ DeleteTable (
|
||||
//
|
||||
gBS->FreePages (Table->PageAddress, Table->NumberOfPages);
|
||||
RemoveEntryList (&(Table->Link));
|
||||
gBS->FreePool (Table);
|
||||
gBS->FreePool(Table);
|
||||
}
|
||||
//
|
||||
// Done
|
||||
@ -1593,14 +1593,14 @@ RemoveTableFromList (
|
||||
&AcpiTableInstance->TableList,
|
||||
&Table
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
//
|
||||
// Remove the table
|
||||
//
|
||||
Status = DeleteTable (AcpiTableInstance, Version, Table);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
//
|
||||
@ -1805,7 +1805,7 @@ AcpiTableAcpiTableConstructor (
|
||||
&PageAddress
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ AmlGetChildFromOptionList (
|
||||
(VOID **)&Data,
|
||||
&DataSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (DataType == EFI_ACPI_DATA_TYPE_NONE) {
|
||||
@ -206,7 +206,7 @@ AmlGetChildFromObjectChildList (
|
||||
// Now, we get the last node.
|
||||
//
|
||||
Status = AmlGetOffsetAfterLastOption (AmlParentHandle, &CurrentBuffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ AmlGetChildFromNonRoot (
|
||||
// 1. Get Option
|
||||
//
|
||||
Status = AmlGetChildFromOptionList (AmlParentHandle, AmlHandle, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (*Buffer != NULL) {
|
||||
|
@ -323,7 +323,7 @@ AmlConstructNodeListForChild (
|
||||
// Now, we get the last node.
|
||||
//
|
||||
Status = AmlGetOffsetAfterLastOption (AmlHandle, &CurrentBuffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ AmlConstructNodeListForChild (
|
||||
// Find the child node.
|
||||
//
|
||||
Status = SdtOpenEx (CurrentBuffer, (UINTN)Buffer + BufferSize - (UINTN)CurrentBuffer, (EFI_ACPI_HANDLE *)&AmlChildHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// No child found, break now.
|
||||
//
|
||||
@ -350,7 +350,7 @@ AmlConstructNodeListForChild (
|
||||
AmlRootNodeList,
|
||||
AmlParentNodeList
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ AmlDestructNodeList (
|
||||
//
|
||||
// Done.
|
||||
//
|
||||
FreePool (AmlParentNodeList);
|
||||
FreePool(AmlParentNodeList);
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ AmlFindPath (
|
||||
AmlRootNodeList, // Root
|
||||
AmlRootNodeList // Parent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ AmlParseOptionTerm (
|
||||
break;
|
||||
case AML_NAME:
|
||||
Status = AmlGetNameStringSize (Buffer, DataSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
@ -90,7 +90,7 @@ AmlParseOptionTerm (
|
||||
*DataType = AmlTypeToAcpiType (AML_NAME);
|
||||
}
|
||||
Status = AmlGetNameStringSize (Buffer, DataSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
@ -175,7 +175,7 @@ AmlParseOptionCommon (
|
||||
// return NameString size
|
||||
//
|
||||
Status = AmlGetNameStringSize (Buffer, DataSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (*DataSize > MaxBufferSize) {
|
||||
@ -243,7 +243,7 @@ AmlParseOptionCommon (
|
||||
Data,
|
||||
DataSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ AmlGetObjectSize (
|
||||
NULL,
|
||||
&DataSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return 0;
|
||||
} else {
|
||||
return DataSize;
|
||||
@ -370,7 +370,7 @@ AmlGetObjectName (
|
||||
&NameString,
|
||||
&NameSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return NULL;
|
||||
}
|
||||
// ASSERT (DataType == EFI_ACPI_DATA_TYPE_NAME_STRING);
|
||||
@ -405,7 +405,7 @@ AmlGetOffsetAfterLastOption (
|
||||
&Data,
|
||||
&DataSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ BdsInitialize (
|
||||
&gEfiBdsArchProtocolGuid, &gBds,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -180,7 +180,7 @@ BdsBootDeviceSelect (
|
||||
//
|
||||
// Deleting variable with current variable implementation shouldn't fail.
|
||||
//
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Add the boot next boot option
|
||||
@ -378,7 +378,7 @@ BdsFormalizeConsoleVariable (
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
|
||||
@ -455,7 +455,7 @@ BdsFormalizeEfiGlobalVariable (
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ BdsAllocateMemoryForPerformanceData (
|
||||
EFI_SIZE_TO_PAGES (PERF_DATA_MAX_LENGTH),
|
||||
&AcpiLowMemoryBase
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Save the pointer to variable for use in S3 resume.
|
||||
//
|
||||
@ -498,7 +498,7 @@ BdsAllocateMemoryForPerformanceData (
|
||||
sizeof (EFI_PHYSICAL_ADDRESS),
|
||||
&AcpiLowMemoryBase
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "[Bds] PerfDataMemAddr (%08x) cannot be saved to NV storage.\n", AcpiLowMemoryBase));
|
||||
}
|
||||
//
|
||||
@ -506,9 +506,9 @@ BdsAllocateMemoryForPerformanceData (
|
||||
// Still lock it even the variable cannot be saved to prevent it's set by 3rd party code.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = VariableLock->RequestToLock (VariableLock, L"PerfDataMemAddr", &gPerformanceProtocolGuid);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -585,10 +585,10 @@ BdsEntry (
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);
|
||||
DEBUG ((EFI_D_INFO, "[BdsDxe] Locate Variable Lock protocol - %r\n", Status));
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (Index = 0; Index < sizeof (mReadOnlyVariables) / sizeof (mReadOnlyVariables[0]); Index++) {
|
||||
Status = VariableLock->RequestToLock (VariableLock, mReadOnlyVariables[Index], &gEfiGlobalVariableGuid);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
}
|
||||
|
||||
@ -728,7 +728,7 @@ BdsDxeSetVariableAndReportStatusCodeOnError (
|
||||
DataSize,
|
||||
Data
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
NameSize = StrSize (VariableName);
|
||||
SetVariableStatus = AllocatePool (sizeof (EDKII_SET_VARIABLE_STATUS) + NameSize + DataSize);
|
||||
if (SetVariableStatus != NULL) {
|
||||
@ -750,7 +750,7 @@ BdsDxeSetVariableAndReportStatusCodeOnError (
|
||||
sizeof (EDKII_SET_VARIABLE_STATUS) + NameSize + DataSize
|
||||
);
|
||||
|
||||
FreePool (SetVariableStatus);
|
||||
FreePool(SetVariableStatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,10 +107,10 @@ OrderLegacyBootOption4SameType (
|
||||
DeviceTypeArray[Index] = BBS_TYPE_UNKNOWN;
|
||||
BbsIndexArray [Index] = 0xFFFF;
|
||||
}
|
||||
FreePool (BootOption->DevicePath);
|
||||
FreePool (BootOption->Description);
|
||||
FreePool (BootOption->LoadOptions);
|
||||
FreePool (BootOption);
|
||||
FreePool(BootOption->DevicePath);
|
||||
FreePool(BootOption->Description);
|
||||
FreePool(BootOption->LoadOptions);
|
||||
FreePool(BootOption);
|
||||
}
|
||||
|
||||
//
|
||||
@ -152,11 +152,11 @@ OrderLegacyBootOption4SameType (
|
||||
//
|
||||
// Changing content without increasing its size with current variable implementation shouldn't fail.
|
||||
//
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
FreePool (NewBootOption);
|
||||
FreePool (DeviceTypeArray);
|
||||
FreePool (BbsIndexArray);
|
||||
FreePool(NewBootOption);
|
||||
FreePool(DeviceTypeArray);
|
||||
FreePool(BbsIndexArray);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -237,10 +237,10 @@ GroupMultipleLegacyBootOption4SameType (
|
||||
}
|
||||
}
|
||||
}
|
||||
FreePool (BootOption->DevicePath);
|
||||
FreePool (BootOption->Description);
|
||||
FreePool (BootOption->LoadOptions);
|
||||
FreePool (BootOption);
|
||||
FreePool(BootOption->DevicePath);
|
||||
FreePool(BootOption->Description);
|
||||
FreePool(BootOption->LoadOptions);
|
||||
FreePool(BootOption);
|
||||
}
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
@ -253,7 +253,7 @@ GroupMultipleLegacyBootOption4SameType (
|
||||
//
|
||||
// Changing content without increasing its size with current variable implementation shouldn't fail.
|
||||
//
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
FreePool (BootOrder);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
FreePool(BootOrder);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ EfiLibOpenRoot (
|
||||
//
|
||||
// Open the root directory of the volume
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = Volume->OpenVolume (
|
||||
Volume,
|
||||
&File
|
||||
@ -55,7 +55,7 @@ EfiLibOpenRoot (
|
||||
//
|
||||
// Done
|
||||
//
|
||||
return EFI_ERROR (Status) ? NULL : File;
|
||||
return EFI_ERROR(Status) ? NULL : File;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,7 +96,7 @@ EfiGrowBuffer (
|
||||
if (*Status == EFI_BUFFER_TOO_SMALL) {
|
||||
|
||||
if (*Buffer != NULL) {
|
||||
FreePool (*Buffer);
|
||||
FreePool(*Buffer);
|
||||
}
|
||||
|
||||
*Buffer = AllocateZeroPool (BufferSize);
|
||||
@ -110,8 +110,8 @@ EfiGrowBuffer (
|
||||
//
|
||||
// If there's an error, free the buffer
|
||||
//
|
||||
if (!TryAgain && EFI_ERROR (*Status) && (*Buffer != NULL)) {
|
||||
FreePool (*Buffer);
|
||||
if (!TryAgain && EFI_ERROR(*Status) && (*Buffer != NULL)) {
|
||||
FreePool(*Buffer);
|
||||
*Buffer = NULL;
|
||||
}
|
||||
|
||||
@ -178,8 +178,8 @@ EfiLibDeleteVariable (
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
// ASSERT (!EFI_ERROR (Status));
|
||||
FreePool (VarBuf);
|
||||
// ASSERT (!EFI_ERROR(Status));
|
||||
FreePool(VarBuf);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -423,7 +423,7 @@ EfiReallocatePool (
|
||||
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
|
||||
}
|
||||
|
||||
FreePool (OldPool);
|
||||
FreePool(OldPool);
|
||||
}
|
||||
|
||||
return NewPool;
|
||||
|
@ -295,7 +295,7 @@ BootMaintExtractConfig (
|
||||
}
|
||||
AllocatedRequest = TRUE;
|
||||
UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize);
|
||||
FreePool (ConfigRequestHdr);
|
||||
FreePool(ConfigRequestHdr);
|
||||
}
|
||||
|
||||
Status = gHiiConfigRouting->BlockToConfig (
|
||||
@ -310,7 +310,7 @@ BootMaintExtractConfig (
|
||||
// Free the allocated config request string.
|
||||
//
|
||||
if (AllocatedRequest) {
|
||||
FreePool (ConfigRequest);
|
||||
FreePool(ConfigRequest);
|
||||
ConfigRequest = NULL;
|
||||
}
|
||||
//
|
||||
@ -401,7 +401,7 @@ BootMaintRouteConfig (
|
||||
NULL,
|
||||
(VOID**) &ConfigRouting
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ BootMaintRouteConfig (
|
||||
&BufferSize,
|
||||
Progress
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
//
|
||||
// Compare new and old BMM configuration data and only do action for modified item to
|
||||
// avoid setting unnecessary non-volatile variable
|
||||
@ -738,7 +738,7 @@ BootMaintCallback (
|
||||
// Initilize Form for legacy boot option.
|
||||
//
|
||||
Status = EfiLibLocateProtocol (&gEfiLegacyBiosProtocolGuid, (VOID **) &LegacyBios);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
InitializeLegacyBootOption ();
|
||||
}
|
||||
|
||||
@ -1217,7 +1217,7 @@ InitializeBM (
|
||||
CopyGuid (&PackageListHeader->PackageListGuid, &gFileExploreFormSetGuid);
|
||||
Status = gHiiDatabase->UpdatePackageList (gHiiDatabase, BmmCallbackInfo->FeHiiHandle, PackageListHeader);
|
||||
|
||||
FreePool (PackageListHeader);
|
||||
FreePool(PackageListHeader);
|
||||
|
||||
//
|
||||
// Init OpCode Handle and Allocate space for creation of Buffer
|
||||
@ -1441,7 +1441,7 @@ CleanUpStringDepository (
|
||||
CurrentListNode = StringDepository->ListHead;
|
||||
for (NodeIndex = 0; NodeIndex < StringDepository->TotalNodeNumber; NodeIndex++) {
|
||||
NextListNode = CurrentListNode->Next;
|
||||
FreePool (CurrentListNode);
|
||||
FreePool(CurrentListNode);
|
||||
CurrentListNode = NextListNode;
|
||||
}
|
||||
|
||||
@ -1450,7 +1450,7 @@ CleanUpStringDepository (
|
||||
//
|
||||
// Release string depository.
|
||||
//
|
||||
FreePool (FileOptionStrDepository);
|
||||
FreePool(FileOptionStrDepository);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1590,7 +1590,7 @@ InitBMPackage (
|
||||
//
|
||||
Ptr = AllocateZeroPool (sizeof (BM_LOAD_CONTEXT) + sizeof (BM_FILE_CONTEXT) + sizeof (BM_HANDLE_CONTEXT) + sizeof (BM_MENU_ENTRY));
|
||||
if (Ptr == NULL) {
|
||||
FreePool (BmmCallbackInfo);
|
||||
FreePool(BmmCallbackInfo);
|
||||
BmmCallbackInfo = NULL;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -1627,8 +1627,8 @@ InitBMPackage (
|
||||
&BmmCallbackInfo->BmmConfigAccess,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1643,8 +1643,8 @@ InitBMPackage (
|
||||
&BmmCallbackInfo->FeConfigAccess,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1718,8 +1718,8 @@ FreeBMPackage (
|
||||
);
|
||||
}
|
||||
|
||||
FreePool (BmmCallbackInfo->LoadContext);
|
||||
FreePool (BmmCallbackInfo);
|
||||
FreePool(BmmCallbackInfo->LoadContext);
|
||||
FreePool(BmmCallbackInfo);
|
||||
|
||||
mBmmCallbackInfo = NULL;
|
||||
|
||||
|
@ -83,7 +83,7 @@ BOpt_CreateMenuEntry (
|
||||
|
||||
MenuEntry->VariableContext = AllocateZeroPool (ContextSize);
|
||||
if (MenuEntry->VariableContext == NULL) {
|
||||
FreePool (MenuEntry);
|
||||
FreePool(MenuEntry);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -116,19 +116,19 @@ BOpt_DestroyMenuEntry (
|
||||
switch (MenuEntry->ContextSelection) {
|
||||
case BM_LOAD_CONTEXT_SELECT:
|
||||
LoadContext = (BM_LOAD_CONTEXT *) MenuEntry->VariableContext;
|
||||
FreePool (LoadContext->FilePathList);
|
||||
FreePool (LoadContext->LoadOption);
|
||||
FreePool(LoadContext->FilePathList);
|
||||
FreePool(LoadContext->LoadOption);
|
||||
if (LoadContext->OptionalData != NULL) {
|
||||
FreePool (LoadContext->OptionalData);
|
||||
FreePool(LoadContext->OptionalData);
|
||||
}
|
||||
FreePool (LoadContext);
|
||||
FreePool(LoadContext);
|
||||
break;
|
||||
|
||||
case BM_FILE_CONTEXT_SELECT:
|
||||
FileContext = (BM_FILE_CONTEXT *) MenuEntry->VariableContext;
|
||||
|
||||
if (!FileContext->IsRoot) {
|
||||
FreePool (FileContext->DevicePath);
|
||||
FreePool(FileContext->DevicePath);
|
||||
} else {
|
||||
if (FileContext->FHandle != NULL) {
|
||||
FileContext->FHandle->Close (FileContext->FHandle);
|
||||
@ -136,45 +136,45 @@ BOpt_DestroyMenuEntry (
|
||||
}
|
||||
|
||||
if (FileContext->FileName != NULL) {
|
||||
FreePool (FileContext->FileName);
|
||||
FreePool(FileContext->FileName);
|
||||
}
|
||||
if (FileContext->Info != NULL) {
|
||||
FreePool (FileContext->Info);
|
||||
FreePool(FileContext->Info);
|
||||
}
|
||||
FreePool (FileContext);
|
||||
FreePool(FileContext);
|
||||
break;
|
||||
/*
|
||||
case BM_CONSOLE_CONTEXT_SELECT:
|
||||
ConsoleContext = (BM_CONSOLE_CONTEXT *) MenuEntry->VariableContext;
|
||||
FreePool (ConsoleContext->DevicePath);
|
||||
FreePool (ConsoleContext);
|
||||
FreePool(ConsoleContext->DevicePath);
|
||||
FreePool(ConsoleContext);
|
||||
break;
|
||||
|
||||
case BM_TERMINAL_CONTEXT_SELECT:
|
||||
TerminalContext = (BM_TERMINAL_CONTEXT *) MenuEntry->VariableContext;
|
||||
FreePool (TerminalContext->DevicePath);
|
||||
FreePool (TerminalContext);
|
||||
FreePool(TerminalContext->DevicePath);
|
||||
FreePool(TerminalContext);
|
||||
break;
|
||||
*/
|
||||
case BM_HANDLE_CONTEXT_SELECT:
|
||||
HandleContext = (BM_HANDLE_CONTEXT *) MenuEntry->VariableContext;
|
||||
FreePool (HandleContext);
|
||||
FreePool(HandleContext);
|
||||
break;
|
||||
|
||||
case BM_LEGACY_DEV_CONTEXT_SELECT:
|
||||
LegacyDevContext = (BM_LEGACY_DEVICE_CONTEXT *) MenuEntry->VariableContext;
|
||||
FreePool (LegacyDevContext);
|
||||
FreePool(LegacyDevContext);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
FreePool (MenuEntry->DisplayString);
|
||||
FreePool(MenuEntry->DisplayString);
|
||||
if (MenuEntry->HelpString != NULL) {
|
||||
FreePool (MenuEntry->HelpString);
|
||||
FreePool(MenuEntry->HelpString);
|
||||
}
|
||||
|
||||
FreePool (MenuEntry);
|
||||
FreePool(MenuEntry);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -267,7 +267,7 @@ BOpt_FindFileSystem (
|
||||
&NoBlkIoHandles,
|
||||
&BlkIoHandle
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (Index = 0; Index < NoBlkIoHandles; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
BlkIoHandle[Index],
|
||||
@ -275,7 +275,7 @@ BOpt_FindFileSystem (
|
||||
(VOID **) &BlkIo
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ BOpt_FindFileSystem (
|
||||
if (BlkIo->Media->RemovableMedia) {
|
||||
Buffer = AllocateZeroPool (BlkIo->Media->BlockSize);
|
||||
if (NULL == Buffer) {
|
||||
FreePool (BlkIoHandle);
|
||||
FreePool(BlkIoHandle);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -296,10 +296,10 @@ BOpt_FindFileSystem (
|
||||
BlkIo->Media->BlockSize,
|
||||
Buffer
|
||||
);
|
||||
FreePool (Buffer);
|
||||
FreePool(Buffer);
|
||||
}
|
||||
}
|
||||
FreePool (BlkIoHandle);
|
||||
FreePool(BlkIoHandle);
|
||||
}
|
||||
|
||||
//
|
||||
@ -312,7 +312,7 @@ BOpt_FindFileSystem (
|
||||
&NoSimpleFsHandles,
|
||||
&SimpleFsHandle
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Find all the instances of the File System prototocol
|
||||
//
|
||||
@ -322,7 +322,7 @@ BOpt_FindFileSystem (
|
||||
&gEfiBlockIoProtocolGuid,
|
||||
(VOID **) &BlkIo
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If no block IO exists assume it's NOT a removable media
|
||||
//
|
||||
@ -339,7 +339,7 @@ BOpt_FindFileSystem (
|
||||
//
|
||||
MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);
|
||||
if (NULL == MenuEntry) {
|
||||
FreePool (SimpleFsHandle);
|
||||
FreePool(SimpleFsHandle);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ BOpt_FindFileSystem (
|
||||
}
|
||||
|
||||
if (NoSimpleFsHandles != 0) {
|
||||
FreePool (SimpleFsHandle);
|
||||
FreePool(SimpleFsHandle);
|
||||
}
|
||||
//
|
||||
// Searching for handles that support Load File protocol
|
||||
@ -417,11 +417,11 @@ BOpt_FindFileSystem (
|
||||
&LoadFileHandle
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (Index = 0; Index < NoLoadFileHandles; Index++) {
|
||||
MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);
|
||||
if (NULL == MenuEntry) {
|
||||
FreePool (LoadFileHandle);
|
||||
FreePool(LoadFileHandle);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -453,7 +453,7 @@ BOpt_FindFileSystem (
|
||||
}
|
||||
|
||||
if (NoLoadFileHandles != 0) {
|
||||
FreePool (LoadFileHandle);
|
||||
FreePool(LoadFileHandle);
|
||||
}
|
||||
|
||||
//
|
||||
@ -464,7 +464,7 @@ BOpt_FindFileSystem (
|
||||
NULL,
|
||||
(VOID **) &LegacyBios
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
for (Index = BBS_TYPE_FLOPPY; Index <= BBS_TYPE_EMBEDDED_NETWORK; Index++) {
|
||||
MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);
|
||||
@ -587,7 +587,7 @@ BOpt_FindFiles (
|
||||
Dir->Close (Dir);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -620,7 +620,7 @@ BOpt_FindFiles (
|
||||
for (;;) {
|
||||
BufferSize = DirBufferSize;
|
||||
Status = NewDir->Read (NewDir, &BufferSize, DirInfo);
|
||||
if (EFI_ERROR (Status) || BufferSize == 0) {
|
||||
if (EFI_ERROR(Status) || BufferSize == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ BOpt_FindFiles (
|
||||
}
|
||||
|
||||
DirectoryMenu.MenuNumber = OptionNumber;
|
||||
FreePool (DirInfo);
|
||||
FreePool(DirInfo);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -743,7 +743,7 @@ BOpt_GetLegacyOptions (
|
||||
NULL,
|
||||
(VOID **) &LegacyBios
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = LegacyBios->GetBbsInfo (
|
||||
LegacyBios,
|
||||
&HddCount,
|
||||
@ -751,7 +751,7 @@ BOpt_GetLegacyOptions (
|
||||
&BbsCount,
|
||||
&BbsTable
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -917,7 +917,7 @@ BOpt_GetBootOptions (
|
||||
|
||||
if (BootNext != NULL) {
|
||||
if (BootNextSize != sizeof (UINT16)) {
|
||||
FreePool (BootNext);
|
||||
FreePool(BootNext);
|
||||
BootNext = NULL;
|
||||
}
|
||||
}
|
||||
@ -942,7 +942,7 @@ BOpt_GetBootOptions (
|
||||
}
|
||||
|
||||
CopyMem (LoadOption, LoadOptionFromVar, BootOptionSize);
|
||||
FreePool (LoadOptionFromVar);
|
||||
FreePool(LoadOptionFromVar);
|
||||
|
||||
if (BootNext != NULL) {
|
||||
BootNextFlag = (BOOLEAN) (*BootNext == BootOrderList[Index]);
|
||||
@ -951,7 +951,7 @@ BOpt_GetBootOptions (
|
||||
}
|
||||
|
||||
if (0 == (*((UINT32 *) LoadOption) & LOAD_OPTION_ACTIVE)) {
|
||||
FreePool (LoadOption);
|
||||
FreePool(LoadOption);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@ -1073,10 +1073,10 @@ BOpt_GetBootOptions (
|
||||
}
|
||||
|
||||
if (BootNext != NULL) {
|
||||
FreePool (BootNext);
|
||||
FreePool(BootNext);
|
||||
}
|
||||
if (BootOrderList != NULL) {
|
||||
FreePool (BootOrderList);
|
||||
FreePool(BootOrderList);
|
||||
}
|
||||
BootOptionMenu.MenuNumber = MenuCount;
|
||||
return EFI_SUCCESS;
|
||||
@ -1159,7 +1159,7 @@ BOpt_AppendFileName (
|
||||
Ptr++;
|
||||
}
|
||||
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
|
||||
return Str;
|
||||
}
|
||||
@ -1232,7 +1232,7 @@ BOpt_IsEfiApp (
|
||||
|
||||
Status = Dir->Open (Dir, &File, FileName, EFI_FILE_MODE_READ, 0);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1314,7 +1314,7 @@ BOpt_FindDrivers (
|
||||
&NoDevicePathHandles,
|
||||
&DevicePathHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1342,7 +1342,7 @@ BOpt_FindDrivers (
|
||||
|
||||
NewMenuEntry = BOpt_CreateMenuEntry (BM_HANDLE_CONTEXT_SELECT);
|
||||
if (NULL == NewMenuEntry) {
|
||||
FreePool (DevicePathHandle);
|
||||
FreePool(DevicePathHandle);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -1358,7 +1358,7 @@ BOpt_FindDrivers (
|
||||
}
|
||||
|
||||
if (DevicePathHandle != NULL) {
|
||||
FreePool (DevicePathHandle);
|
||||
FreePool(DevicePathHandle);
|
||||
}
|
||||
|
||||
DriverMenu.MenuNumber = OptionNumber;
|
||||
@ -1537,7 +1537,7 @@ BOpt_GetDriverOptions (
|
||||
}
|
||||
|
||||
CopyMem (LoadOption, LoadOptionFromVar, DriverOptionSize);
|
||||
FreePool (LoadOptionFromVar);
|
||||
FreePool(LoadOptionFromVar);
|
||||
|
||||
NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT);
|
||||
if (NULL == NewMenuEntry) {
|
||||
@ -1624,7 +1624,7 @@ BOpt_GetDriverOptions (
|
||||
}
|
||||
|
||||
if (DriverOrderList != NULL) {
|
||||
FreePool (DriverOrderList);
|
||||
FreePool(DriverOrderList);
|
||||
}
|
||||
DriverOptionMenu.MenuNumber = Index;
|
||||
return EFI_SUCCESS;
|
||||
|
@ -313,7 +313,7 @@ RetrieveUartUid (
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &DevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ LocateSerialIo (
|
||||
&NoHandles,
|
||||
&Handles
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// No serial ports present
|
||||
//
|
||||
@ -479,7 +479,7 @@ LocateSerialIo (
|
||||
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
|
||||
NewMenuEntry = BOpt_CreateMenuEntry (BM_TERMINAL_CONTEXT_SELECT);
|
||||
if (NewMenuEntry == NULL) {
|
||||
FreePool (Handles);
|
||||
FreePool(Handles);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ LocateSerialIo (
|
||||
}
|
||||
}
|
||||
if (Handles != NULL) {
|
||||
FreePool (Handles);
|
||||
FreePool(Handles);
|
||||
}
|
||||
|
||||
//
|
||||
@ -585,7 +585,7 @@ LocateSerialIo (
|
||||
(EFI_DEVICE_PATH_PROTOCOL *) &Vendor
|
||||
);
|
||||
if (NewMenuEntry->HelpString != NULL) {
|
||||
FreePool (NewMenuEntry->HelpString);
|
||||
FreePool(NewMenuEntry->HelpString);
|
||||
}
|
||||
//
|
||||
// NewMenuEntry->HelpString = DevicePathToStr (NewDevicePath);
|
||||
|
@ -145,7 +145,7 @@ UpdateFileExplorer (
|
||||
RemoveEntryList (&NewMenuEntry->Link);
|
||||
BOpt_FreeMenu (&DirectoryMenu);
|
||||
Status = BOpt_FindFiles (CallbackData, NewMenuEntry);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
ExitFileExplorer = TRUE;
|
||||
goto exit;
|
||||
}
|
||||
@ -293,7 +293,7 @@ FileExplorerRouteConfig (
|
||||
NULL,
|
||||
(VOID**) &ConfigRouting
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -314,11 +314,11 @@ FileExplorerRouteConfig (
|
||||
&BufferSize,
|
||||
Progress
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (FeData->BootDescriptionData[0] != 0x00 || FeData->BootOptionalData[0] != 0x00) {
|
||||
Status = Var_UpdateBootOption (Private, FeData);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -334,7 +334,7 @@ FileExplorerRouteConfig (
|
||||
FeData->DriverOptionalData,
|
||||
FeData->ForceReconnect
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -799,7 +799,7 @@ UpdateConModePage (
|
||||
//
|
||||
for (Mode = 0; Mode < MaxMode; Mode++) {
|
||||
Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
ValidMode++;
|
||||
@ -827,7 +827,7 @@ UpdateConModePage (
|
||||
//
|
||||
for (Mode = 0; Mode < MaxMode; Mode++) {
|
||||
Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -876,7 +876,7 @@ UpdateConModePage (
|
||||
);
|
||||
|
||||
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
|
||||
FreePool (ModeToken);
|
||||
FreePool(ModeToken);
|
||||
|
||||
UpdatePageEnd (CallbackData);
|
||||
}
|
||||
@ -1227,14 +1227,14 @@ GetLegacyBootOptionVar (
|
||||
(BBS_BBS_DP == DevicePath->SubType)
|
||||
) {
|
||||
*OptionIndex = OrderBuffer[Index];
|
||||
FreePool (OrderBuffer);
|
||||
FreePool(OrderBuffer);
|
||||
return OptionBuffer;
|
||||
} else {
|
||||
FreePool (OptionBuffer);
|
||||
FreePool(OptionBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
FreePool (OrderBuffer);
|
||||
FreePool(OrderBuffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ Var_ChangeBootOrder (
|
||||
//
|
||||
if (BootOrderList != NULL) {
|
||||
EfiLibDeleteVariable (L"BootOrder", &gEfiGlobalVariableGuid);
|
||||
FreePool (BootOrderList);
|
||||
FreePool(BootOrderList);
|
||||
BootOrderList = NULL;
|
||||
}
|
||||
//
|
||||
@ -165,7 +165,7 @@ Var_ChangeBootOrder (
|
||||
BootOrderListSize * sizeof (UINT16),
|
||||
BootOrderList
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -269,7 +269,7 @@ Var_ChangeDriverOrder (
|
||||
//
|
||||
if (DriverOrderList != NULL) {
|
||||
EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid);
|
||||
FreePool (DriverOrderList);
|
||||
FreePool(DriverOrderList);
|
||||
DriverOrderList = NULL;
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ Var_ChangeDriverOrder (
|
||||
DriverOrderListSize * sizeof (UINT16),
|
||||
DriverOrderList
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -339,7 +339,7 @@ Var_UpdateAllConsoleOption (
|
||||
GetDevicePathSize (OutDevicePath),
|
||||
OutDevicePath
|
||||
);
|
||||
ASSERT (!EFI_ERROR (Status));
|
||||
ASSERT (!EFI_ERROR(Status));
|
||||
}
|
||||
|
||||
if (InpDevicePath != NULL) {
|
||||
@ -351,7 +351,7 @@ Var_UpdateAllConsoleOption (
|
||||
GetDevicePathSize (InpDevicePath),
|
||||
InpDevicePath
|
||||
);
|
||||
ASSERT (!EFI_ERROR (Status));
|
||||
ASSERT (!EFI_ERROR(Status));
|
||||
}
|
||||
|
||||
if (ErrDevicePath != NULL) {
|
||||
@ -363,7 +363,7 @@ Var_UpdateAllConsoleOption (
|
||||
GetDevicePathSize (ErrDevicePath),
|
||||
ErrDevicePath
|
||||
);
|
||||
ASSERT (!EFI_ERROR (Status));
|
||||
ASSERT (!EFI_ERROR(Status));
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -408,7 +408,7 @@ Var_UpdateConsoleOption (
|
||||
ConDevicePath = EfiLibGetVariable (ConsoleName, &gEfiGlobalVariableGuid);
|
||||
if (ConDevicePath != NULL) {
|
||||
EfiLibDeleteVariable (ConsoleName, &gEfiGlobalVariableGuid);
|
||||
FreePool (ConDevicePath);
|
||||
FreePool(ConDevicePath);
|
||||
ConDevicePath = NULL;
|
||||
};
|
||||
|
||||
@ -466,7 +466,7 @@ Var_UpdateConsoleOption (
|
||||
GetDevicePathSize (ConDevicePath),
|
||||
ConDevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -590,7 +590,7 @@ Var_UpdateDriverOption (
|
||||
|
||||
NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT);
|
||||
if (NULL == NewMenuEntry) {
|
||||
FreePool (Buffer);
|
||||
FreePool(Buffer);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -671,7 +671,7 @@ Var_UpdateDriverOption (
|
||||
BufferSize,
|
||||
Buffer
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
DriverOrderList = BdsLibGetVariableAndSize (
|
||||
L"DriverOrder",
|
||||
&gEfiGlobalVariableGuid,
|
||||
@ -693,11 +693,11 @@ Var_UpdateDriverOption (
|
||||
NewDriverOrderList
|
||||
);
|
||||
if (DriverOrderList != NULL) {
|
||||
FreePool (DriverOrderList);
|
||||
FreePool(DriverOrderList);
|
||||
}
|
||||
DriverOrderList = NULL;
|
||||
FreePool (NewDriverOrderList);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
FreePool(NewDriverOrderList);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
InsertTailList (&DriverOptionMenu.Head, &NewMenuEntry->Link);
|
||||
DriverOptionMenu.MenuNumber++;
|
||||
|
||||
@ -852,7 +852,7 @@ Var_UpdateBootOption (
|
||||
BufferSize,
|
||||
Buffer
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
BootOrderList = BdsLibGetVariableAndSize (
|
||||
L"BootOrder",
|
||||
@ -868,7 +868,7 @@ if (BootOrderList != NULL) {
|
||||
NewBootOrderList[BootOrderListSize / sizeof (UINT16)] = Index;
|
||||
}
|
||||
|
||||
FreePool (BootOrderList);
|
||||
FreePool(BootOrderList);
|
||||
}
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
@ -878,9 +878,9 @@ if (BootOrderList != NULL) {
|
||||
BootOrderListSize + sizeof (UINT16),
|
||||
NewBootOrderList
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
FreePool (NewBootOrderList);
|
||||
FreePool(NewBootOrderList);
|
||||
NewBootOrderList = NULL;
|
||||
InsertTailList (&BootOptionMenu.Head, &NewMenuEntry->Link);
|
||||
BootOptionMenu.MenuNumber++;
|
||||
@ -1018,7 +1018,7 @@ Var_UpdateBootOrder (
|
||||
BootOrderListSize,
|
||||
BootOrderList
|
||||
);
|
||||
FreePool (BootOrderList);
|
||||
FreePool(BootOrderList);
|
||||
|
||||
GroupMultipleLegacyBootOption4SameType ();
|
||||
|
||||
@ -1074,7 +1074,7 @@ Var_UpdateDriverOrder (
|
||||
//
|
||||
if (DriverOrderList != NULL) {
|
||||
EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid);
|
||||
FreePool (DriverOrderList);
|
||||
FreePool(DriverOrderList);
|
||||
}
|
||||
|
||||
ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.DriverOptionOrder) / sizeof (CallbackData->BmmFakeNvData.DriverOptionOrder[0])));
|
||||
@ -1089,7 +1089,7 @@ Var_UpdateDriverOrder (
|
||||
DriverOrderListSize,
|
||||
NewDriverOrderList
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1205,13 +1205,13 @@ Var_UpdateBBSOption (
|
||||
}
|
||||
|
||||
if (VarData >= OriginalPtr + VarSize) {
|
||||
FreePool (OriginalPtr);
|
||||
FreePool(OriginalPtr);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
NewOrder = AllocateZeroPool (DevOrder->Length - sizeof (DevOrder->Length));
|
||||
if (NewOrder == NULL) {
|
||||
FreePool (OriginalPtr);
|
||||
FreePool(OriginalPtr);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -1243,7 +1243,7 @@ Var_UpdateBBSOption (
|
||||
NewOrder,
|
||||
DevOrder->Length - sizeof (DevOrder->Length)
|
||||
);
|
||||
FreePool (NewOrder);
|
||||
FreePool(NewOrder);
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
VAR_LEGACY_DEV_ORDER,
|
||||
@ -1292,7 +1292,7 @@ Var_UpdateBBSOption (
|
||||
BootOptionVar
|
||||
);
|
||||
|
||||
FreePool (BootOptionVar);
|
||||
FreePool(BootOptionVar);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1315,15 +1315,15 @@ Var_UpdateBBSOption (
|
||||
BootOptionVar
|
||||
);
|
||||
|
||||
FreePool (BootOptionVar);
|
||||
FreePool(BootOptionVar);
|
||||
}
|
||||
}
|
||||
|
||||
BOpt_GetBootOptions (CallbackData);
|
||||
|
||||
FreePool (OriginalPtr);
|
||||
FreePool (EnBootOption);
|
||||
FreePool (DisBootOption);
|
||||
FreePool(OriginalPtr);
|
||||
FreePool(EnBootOption);
|
||||
FreePool(DisBootOption);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ InitializeBootManager (
|
||||
&gBootManagerPrivate.ConfigAccess,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Publish our HII data
|
||||
@ -399,7 +399,7 @@ CallBootManager (
|
||||
//
|
||||
Status = BdsLibBootViaBootOption (gOption, gOption->DevicePath, &ExitDataSize, &ExitData);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_SUCCEEDED));
|
||||
PlatformBdsBootSuccess (gOption);
|
||||
} else {
|
||||
|
@ -173,7 +173,7 @@ BdsProcessCapsules (
|
||||
CapsuleTable->CapsuleArrayNumber = CapsuleNumber;
|
||||
CopyMem(&CapsuleTable->CapsulePtr[0], CapsulePtrCache, CapsuleNumber * sizeof(VOID*));
|
||||
Status = gBS->InstallConfigurationTable (&CapsuleGuidCache[CacheIndex], (VOID*)CapsuleTable);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
CacheIndex++;
|
||||
}
|
||||
@ -219,9 +219,9 @@ BdsProcessCapsules (
|
||||
//
|
||||
// Free the allocated temp memory space.
|
||||
//
|
||||
FreePool (CapsuleGuidCache);
|
||||
FreePool (CapsulePtrCache);
|
||||
FreePool (CapsulePtr);
|
||||
FreePool(CapsuleGuidCache);
|
||||
FreePool(CapsulePtrCache);
|
||||
FreePool(CapsulePtr);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -185,8 +185,8 @@ InitializeDeviceManager (
|
||||
&gDeviceManagerPrivate.ConfigAccess,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -198,8 +198,8 @@ InitializeDeviceManager (
|
||||
&gDeviceManagerPrivate.DriverHealthConfigAccess,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
|
||||
// ASSERT (HiiPackageList != NULL);
|
||||
|
||||
Status = gHiiDatabase->ExportPackageLists (gHiiDatabase, Handle, &BufferSize, HiiPackageList);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
|
||||
CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
|
||||
*FormSetGuid = AllocateCopyPool (sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
|
||||
ASSERT (*FormSetGuid != NULL);
|
||||
FreePool (HiiPackageList);
|
||||
FreePool(HiiPackageList);
|
||||
return TRUE;
|
||||
}
|
||||
ClassGuid ++;
|
||||
@ -330,7 +330,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
|
||||
CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
|
||||
*FormSetGuid = AllocateCopyPool (sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
|
||||
ASSERT (*FormSetGuid != NULL);
|
||||
FreePool (HiiPackageList);
|
||||
FreePool(HiiPackageList);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@ -343,7 +343,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
|
||||
Offset += PackageHeader.Length;
|
||||
}
|
||||
|
||||
FreePool (HiiPackageList);
|
||||
FreePool(HiiPackageList);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -574,7 +574,7 @@ IsMacAddressDevicePath (
|
||||
}
|
||||
|
||||
if (Buffer != NULL) {
|
||||
FreePool (Buffer);
|
||||
FreePool(Buffer);
|
||||
}
|
||||
|
||||
return ReturnVal;
|
||||
@ -615,14 +615,14 @@ IsNeedAddNetworkMenu (
|
||||
*ItemCount = 0;
|
||||
|
||||
Status = gHiiDatabase->GetPackageListHandle (gHiiDatabase, Handle, &DriverHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
//
|
||||
// Get the device path by the got Driver handle .
|
||||
//
|
||||
Status = gBS->HandleProtocol (DriverHandle, &gEfiDevicePathProtocolGuid, (VOID **) &DevicePath);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
TmpDevicePath = DevicePath;
|
||||
@ -646,7 +646,7 @@ IsNeedAddNetworkMenu (
|
||||
//
|
||||
TmpDevicePath = DevicePath;
|
||||
Status = gBS->LocateDevicePath(&gEfiDevicePathProtocolGuid, &TmpDevicePath, &ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ IsNeedAddNetworkMenu (
|
||||
&OpenInfoBuffer,
|
||||
&EntryCount
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -686,7 +686,7 @@ IsNeedAddNetworkMenu (
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -719,7 +719,7 @@ IsNeedAddNetworkMenu (
|
||||
|
||||
Done:
|
||||
if (OpenInfoBuffer != NULL) {
|
||||
FreePool (OpenInfoBuffer);
|
||||
FreePool(OpenInfoBuffer);
|
||||
}
|
||||
return IsNeedAdd;
|
||||
}
|
||||
@ -783,9 +783,9 @@ AdjustArrayData (
|
||||
CopyMem (NewGuidLists, *GuidLists, Offset * sizeof (EFI_GUID *));
|
||||
NewGuidLists[Offset] = FormSetGuid;
|
||||
|
||||
FreePool (*HiiHandles);
|
||||
FreePool(*HiiHandles);
|
||||
*HiiHandles = NewHiiHandles;
|
||||
FreePool (*GuidLists);
|
||||
FreePool(*GuidLists);
|
||||
*GuidLists = NewGuidLists;
|
||||
}
|
||||
|
||||
@ -886,8 +886,8 @@ CallDeviceManager (
|
||||
NewStringTitle = AllocatePool (NewStringLen);
|
||||
UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString);
|
||||
HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);
|
||||
FreePool (String);
|
||||
FreePool (NewStringTitle);
|
||||
FreePool(String);
|
||||
FreePool(NewStringTitle);
|
||||
}
|
||||
|
||||
//
|
||||
@ -973,7 +973,7 @@ CallDeviceManager (
|
||||
}
|
||||
}
|
||||
Token = HiiSetString (HiiHandle, 0, String, NULL);
|
||||
FreePool (String);
|
||||
FreePool(String);
|
||||
|
||||
String = HiiGetString (HiiHandles[Index], FormSetHelp, NULL);
|
||||
if (String == NULL) {
|
||||
@ -984,7 +984,7 @@ CallDeviceManager (
|
||||
}
|
||||
}
|
||||
TokenHelp = HiiSetString (HiiHandle, 0, String, NULL);
|
||||
FreePool (String);
|
||||
FreePool(String);
|
||||
|
||||
//
|
||||
// Network device process
|
||||
@ -1196,14 +1196,14 @@ Done:
|
||||
|
||||
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
||||
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
||||
FreePool (HiiHandles);
|
||||
FreePool(HiiHandles);
|
||||
|
||||
for (Index = 0; Index < HandleNum; Index++) {
|
||||
if (GuidLists[Index] != NULL) {
|
||||
FreePool (GuidLists[Index]);
|
||||
FreePool(GuidLists[Index]);
|
||||
}
|
||||
}
|
||||
FreePool (GuidLists);
|
||||
FreePool(GuidLists);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -1399,7 +1399,7 @@ CallDriverHealth (
|
||||
}
|
||||
|
||||
Status = DriverHealthGetDriverName (DriverHealthInfo->DriverHandle, &DriverName);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Can not get the Driver name, so use the Device path
|
||||
//
|
||||
@ -1419,7 +1419,7 @@ CallDriverHealth (
|
||||
&ControllerName
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Can not get the Controller name, just let it empty.
|
||||
//
|
||||
@ -1466,11 +1466,11 @@ CallDriverHealth (
|
||||
// ASSERT (TmpString != NULL);
|
||||
if (TmpString) {
|
||||
StrCatS (String, 512, TmpString);
|
||||
FreePool (TmpString);
|
||||
FreePool(TmpString);
|
||||
}
|
||||
|
||||
Token = HiiSetString (HiiHandle, 0, String, NULL);
|
||||
FreePool (String);
|
||||
FreePool(String);
|
||||
|
||||
TokenHelp = HiiSetString (HiiHandle, 0, GetStringById( STRING_TOKEN (STR_DH_REPAIR_SINGLE_HELP)), NULL);
|
||||
|
||||
@ -1638,7 +1638,7 @@ CallDriverHealth (
|
||||
|
||||
if (DriverHealthInfo->MessageList != NULL) {
|
||||
FreePool(DriverHealthInfo->MessageList);
|
||||
FreePool (DriverHealthInfo);
|
||||
FreePool(DriverHealthInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1749,7 +1749,7 @@ GetSingleControllerHealthStatus (
|
||||
//
|
||||
Status = DriverHealth->GetHealthStatus (DriverHealth, ControllerHandle, ChildHandle, HealthStatus, &MessageList, &FormHiiHandle);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If the health status could not be retrieved, then return immediately
|
||||
//
|
||||
@ -1832,7 +1832,7 @@ GetAllControllersHealthStatus (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status) || DriverHealthHandles == NULL) {
|
||||
if (EFI_ERROR(Status) || DriverHealthHandles == NULL) {
|
||||
//
|
||||
// If the list of Driver Health Protocol handles can not be retrieved, then
|
||||
// return EFI_OUT_OF_RESOURCES
|
||||
@ -1860,7 +1860,7 @@ GetAllControllersHealthStatus (
|
||||
&gEfiDriverHealthProtocolGuid,
|
||||
(VOID **)&DriverHealth
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If the Driver Health Protocol can not be retrieved, then skip to the next
|
||||
// Driver Health Protocol handle
|
||||
@ -1877,7 +1877,7 @@ GetAllControllersHealthStatus (
|
||||
// If Status is an error code, then the health information could not be retrieved, so assume healthy
|
||||
// and skip to the next Driver Health Protocol handle
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1904,7 +1904,7 @@ GetAllControllersHealthStatus (
|
||||
&HandleCount,
|
||||
&Handles
|
||||
);
|
||||
if (EFI_ERROR (Status) || Handles == NULL) {
|
||||
if (EFI_ERROR(Status) || Handles == NULL) {
|
||||
//
|
||||
// If all the handles in the handle database can not be retrieved, then
|
||||
// return EFI_OUT_OF_RESOURCES
|
||||
@ -1925,7 +1925,7 @@ GetAllControllersHealthStatus (
|
||||
}
|
||||
|
||||
Status = GetSingleControllerHealthStatus (DriverHealthList, DriverHealthHandles[DriverHealthIndex], Handles[ControllerIndex], NULL, DriverHealth, &HealthStatus);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If Status is an error code, then the health information could not be retrieved, so assume healthy
|
||||
//
|
||||
@ -1935,7 +1935,7 @@ GetAllControllersHealthStatus (
|
||||
//
|
||||
// If CheckHealthSingleController() returned an error on a terminal state, then do not check the health of child controllers
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1951,7 +1951,7 @@ GetAllControllersHealthStatus (
|
||||
}
|
||||
|
||||
Status = GetSingleControllerHealthStatus (DriverHealthList, DriverHealthHandles[DriverHealthIndex], Handles[ControllerIndex], Handles[ChildIndex], DriverHealth, &HealthStatus);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If Status is an error code, then the health information could not be retrieved, so assume healthy
|
||||
//
|
||||
@ -1961,7 +1961,7 @@ GetAllControllersHealthStatus (
|
||||
//
|
||||
// If CheckHealthSingleController() returned an error on a terminal state, then skip to the next child
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -1972,10 +1972,10 @@ GetAllControllersHealthStatus (
|
||||
|
||||
Done:
|
||||
if (Handles != NULL) {
|
||||
gBS->FreePool (Handles);
|
||||
gBS->FreePool(Handles);
|
||||
}
|
||||
if (DriverHealthHandles != NULL) {
|
||||
gBS->FreePool (DriverHealthHandles);
|
||||
gBS->FreePool(DriverHealthHandles);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -2032,14 +2032,14 @@ PlaformHealthStatusCheck (
|
||||
//
|
||||
// Found one or more Handles.
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (Index = 0; Index < NoHandles; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
DriverHealthHandles[Index],
|
||||
&gEfiDriverHealthProtocolGuid,
|
||||
(VOID **) &DriverHealth
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = DriverHealth->GetHealthStatus (
|
||||
DriverHealth,
|
||||
NULL,
|
||||
@ -2052,7 +2052,7 @@ PlaformHealthStatusCheck (
|
||||
//
|
||||
// Get the healthy status of the module
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if (HealthStatus != EfiDriverHealthStatusHealthy) {
|
||||
//
|
||||
// Return immediately one driver's status not in healthy.
|
||||
@ -2130,8 +2130,8 @@ ProcessSingleControllerHealth (
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
// ASSERT( !EFI_ERROR (Status));
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT( !EFI_ERROR(Status));
|
||||
if (EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -2150,8 +2150,8 @@ ProcessSingleControllerHealth (
|
||||
NULL,
|
||||
&FormHiiHandle
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2180,7 +2180,7 @@ ProcessSingleControllerHealth (
|
||||
//
|
||||
if (LocalHealthStatus == EfiDriverHealthStatusReconnectRequired) {
|
||||
Status = gBS->DisconnectController (ControllerHandle, NULL, NULL);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Disconnect failed. Need to promote reconnect to a reboot.
|
||||
//
|
||||
@ -2355,7 +2355,7 @@ DriverHealthSelectBestLanguage (
|
||||
NULL
|
||||
);
|
||||
if (LanguageVariable != NULL) {
|
||||
FreePool (LanguageVariable);
|
||||
FreePool(LanguageVariable);
|
||||
}
|
||||
|
||||
return BestLanguage;
|
||||
@ -2402,7 +2402,7 @@ GetComponentNameWorker (
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -2457,7 +2457,7 @@ GetDriverNameWorker (
|
||||
&ComponentName,
|
||||
&BestLanguage
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -2469,7 +2469,7 @@ GetDriverNameWorker (
|
||||
BestLanguage,
|
||||
DriverName
|
||||
);
|
||||
FreePool (BestLanguage);
|
||||
FreePool(BestLanguage);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -2503,7 +2503,7 @@ DriverHealthGetDriverName (
|
||||
// Get driver name from UEFI 2.0 Component Name 2 protocol interface.
|
||||
//
|
||||
Status = GetDriverNameWorker (&gEfiComponentName2ProtocolGuid, DriverBindingHandle, DriverName);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If it fails to get the driver name from Component Name protocol interface, we should fall back on
|
||||
// EFI 1.1 Component Name protocol interface.
|
||||
@ -2562,7 +2562,7 @@ GetControllerNameWorker (
|
||||
&ComponentName,
|
||||
&BestLanguage
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -2576,7 +2576,7 @@ GetControllerNameWorker (
|
||||
BestLanguage,
|
||||
ControllerName
|
||||
);
|
||||
FreePool (BestLanguage);
|
||||
FreePool(BestLanguage);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -2624,7 +2624,7 @@ DriverHealthGetControllerName (
|
||||
ChildHandle,
|
||||
ControllerName
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If it fails to get the controller name from Component Name protocol interface, we should fall back on
|
||||
// EFI 1.1 Component Name protocol interface.
|
||||
|
@ -240,7 +240,7 @@ FrontPageCallback (
|
||||
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
|
||||
|
||||
FreePool (Lang);
|
||||
FreePool(Lang);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -334,7 +334,7 @@ InitializeFrontPage (
|
||||
// Locate Hii relative protocols
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFormBrowser2);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ InitializeFrontPage (
|
||||
&gFrontPagePrivate.ConfigAccess,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Publish our HII data
|
||||
@ -442,7 +442,7 @@ InitializeFrontPage (
|
||||
ASSERT (gFrontPagePrivate.LanguageToken != NULL);
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &HiiString);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
LangCode = mLanguageString;
|
||||
OptionCount = 0;
|
||||
@ -455,10 +455,10 @@ InitializeFrontPage (
|
||||
StringBuffer = AllocateZeroPool (StringSize);
|
||||
ASSERT (StringBuffer != NULL);
|
||||
Status = HiiString->GetString (HiiString, Lang, HiiHandle, PRINTABLE_LANGUAGE_NAME_STRING_ID, StringBuffer, &StringSize, NULL);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
StringBuffer = AllocatePool (AsciiStrSize (Lang) * sizeof (CHAR16));
|
||||
ASSERT (StringBuffer != NULL);
|
||||
AsciiStrToUnicodeStrS (Lang, StringBuffer, AsciiStrSize(Lang));
|
||||
@ -466,7 +466,7 @@ InitializeFrontPage (
|
||||
|
||||
ASSERT (StringBuffer != NULL);
|
||||
gFrontPagePrivate.LanguageToken[OptionCount] = HiiSetString (HiiHandle, 0, StringBuffer, NULL);
|
||||
FreePool (StringBuffer);
|
||||
FreePool(StringBuffer);
|
||||
|
||||
OptionCount++;
|
||||
}
|
||||
@ -482,7 +482,7 @@ InitializeFrontPage (
|
||||
while (*LangCode != 0) {
|
||||
GetNextLanguage (&LangCode, Lang);
|
||||
|
||||
if (CurrentLang != NULL && AsciiStrCmp (Lang, CurrentLang) == 0) {
|
||||
if (CurrentLang != NULL && AsciiStrCmp(Lang, CurrentLang) == 0) {
|
||||
HiiCreateOneOfOptionOpCode (
|
||||
OptionsOpCodeHandle,
|
||||
gFrontPagePrivate.LanguageToken[OptionCount],
|
||||
@ -504,9 +504,9 @@ InitializeFrontPage (
|
||||
}
|
||||
|
||||
if (CurrentLang != NULL) {
|
||||
FreePool (CurrentLang);
|
||||
FreePool(CurrentLang);
|
||||
}
|
||||
FreePool (Lang);
|
||||
FreePool(Lang);
|
||||
|
||||
HiiCreateOneOfOpCode (
|
||||
StartOpCodeHandle,
|
||||
@ -759,8 +759,8 @@ UpdateFrontPageStrings (
|
||||
NULL,
|
||||
(VOID **) &Smbios
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ UpdateFrontPageStrings (
|
||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length), StrIndex, &NewString);
|
||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
|
||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||
FreePool (NewString);
|
||||
FreePool(NewString);
|
||||
Find[0] = TRUE;
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ UpdateFrontPageStrings (
|
||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record + Type1Record->Hdr.Length), StrIndex, &NewString);
|
||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
|
||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||
FreePool (NewString);
|
||||
FreePool(NewString);
|
||||
Find[1] = TRUE;
|
||||
}
|
||||
|
||||
@ -797,7 +797,7 @@ UpdateFrontPageStrings (
|
||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record->Hdr.Length), StrIndex, &NewString);
|
||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
|
||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||
FreePool (NewString);
|
||||
FreePool(NewString);
|
||||
Find[2] = TRUE;
|
||||
}
|
||||
|
||||
@ -806,7 +806,7 @@ UpdateFrontPageStrings (
|
||||
ConvertProcessorToString(Type4Record->CurrentSpeed, 6, &NewString);
|
||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_SPEED);
|
||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||
FreePool (NewString);
|
||||
FreePool(NewString);
|
||||
Find[3] = TRUE;
|
||||
}
|
||||
|
||||
@ -818,7 +818,7 @@ UpdateFrontPageStrings (
|
||||
);
|
||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_MEMORY_SIZE);
|
||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||
FreePool (NewString);
|
||||
FreePool(NewString);
|
||||
Find[4] = TRUE;
|
||||
}
|
||||
} while ( !(Find[0] && Find[1] && Find[2] && Find[3] && Find[4]));
|
||||
@ -852,7 +852,7 @@ WaitForSingleEvent (
|
||||
// Create a timer event
|
||||
//
|
||||
Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Set the timer event
|
||||
//
|
||||
@ -873,7 +873,7 @@ WaitForSingleEvent (
|
||||
//
|
||||
// If the timer expired, change the return to timed out
|
||||
//
|
||||
if (!EFI_ERROR (Status) && Index == 1) {
|
||||
if (!EFI_ERROR(Status) && Index == 1) {
|
||||
Status = EFI_TIMEOUT;
|
||||
}
|
||||
}
|
||||
@ -882,7 +882,7 @@ WaitForSingleEvent (
|
||||
// No timeout... just wait on the event
|
||||
//
|
||||
Status = gBS->WaitForEvent (1, &Event, &Index);
|
||||
// ASSERT (!EFI_ERROR (Status));
|
||||
// ASSERT (!EFI_ERROR(Status));
|
||||
// ASSERT (Index == 0);
|
||||
}
|
||||
|
||||
@ -962,7 +962,7 @@ ShowProgress (
|
||||
}
|
||||
|
||||
if (TmpStr != NULL) {
|
||||
gBS->FreePool (TmpStr);
|
||||
gBS->FreePool(TmpStr);
|
||||
}
|
||||
|
||||
//
|
||||
@ -976,7 +976,7 @@ ShowProgress (
|
||||
// User pressed some key
|
||||
//
|
||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1041,7 +1041,7 @@ PlatformBdsEnterFrontPage (
|
||||
&gEfiGraphicsOutputProtocolGuid,
|
||||
(VOID**)&GraphicsOutput
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
GraphicsOutput = NULL;
|
||||
}
|
||||
|
||||
@ -1050,7 +1050,7 @@ PlatformBdsEnterFrontPage (
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
(VOID**)&SimpleTextOut
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SimpleTextOut = NULL;
|
||||
}
|
||||
|
||||
@ -1100,7 +1100,7 @@ PlatformBdsEnterFrontPage (
|
||||
gST->ConOut->ClearScreen (gST->ConOut);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Timeout or user press enter to continue
|
||||
//
|
||||
@ -1112,7 +1112,7 @@ PlatformBdsEnterFrontPage (
|
||||
// Boot Logo is corrupted, report it using Boot Logo protocol.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiBootLogoProtocolGuid, NULL, (VOID **) &BootLogo);
|
||||
if (!EFI_ERROR (Status) && (BootLogo != NULL)) {
|
||||
if (!EFI_ERROR(Status) && (BootLogo != NULL)) {
|
||||
BootLogo->SetBootLogo (BootLogo, NULL, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@ -1213,7 +1213,7 @@ PlatformBdsEnterFrontPage (
|
||||
} while (/*(Status == EFI_SUCCESS) && (*/gCallbackKey != FRONT_PAGE_KEY_CONTINUE); //);
|
||||
|
||||
if (mLanguageString != NULL) {
|
||||
FreePool (mLanguageString);
|
||||
FreePool(mLanguageString);
|
||||
mLanguageString = NULL;
|
||||
}
|
||||
//
|
||||
@ -1280,7 +1280,7 @@ BdsSetConsoleMode (
|
||||
&gEfiGraphicsOutputProtocolGuid,
|
||||
(VOID**)&GraphicsOutput
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
GraphicsOutput = NULL;
|
||||
}
|
||||
|
||||
@ -1289,7 +1289,7 @@ BdsSetConsoleMode (
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
(VOID**)&SimpleTextOut
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SimpleTextOut = NULL;
|
||||
}
|
||||
|
||||
@ -1337,7 +1337,7 @@ BdsSetConsoleMode (
|
||||
&SizeOfInfo,
|
||||
&Info
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if ((Info->HorizontalResolution == NewHorizontalResolution) &&
|
||||
(Info->VerticalResolution == NewVerticalResolution)) {
|
||||
if ((GraphicsOutput->Mode->Info->HorizontalResolution == NewHorizontalResolution) &&
|
||||
@ -1346,12 +1346,12 @@ BdsSetConsoleMode (
|
||||
// Current resolution is same with required resolution, check if text mode need be set
|
||||
//
|
||||
Status = SimpleTextOut->QueryMode (SimpleTextOut, SimpleTextOut->Mode->Mode, &CurrentColumn, &CurrentRow);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if ((EFI_ERROR (Status)) || (CurrentColumn == NewColumns && CurrentRow == NewRows)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if ((EFI_ERROR(Status)) || (CurrentColumn == NewColumns && CurrentRow == NewRows)) {
|
||||
//
|
||||
// If current text mode is same with required text mode. Do nothing
|
||||
//
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
return EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
@ -1365,13 +1365,13 @@ BdsSetConsoleMode (
|
||||
// Required text mode is supported, set it.
|
||||
//
|
||||
Status = SimpleTextOut->SetMode (SimpleTextOut, Index);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
//
|
||||
// Update text mode PCD.
|
||||
//
|
||||
//PcdSet32 (PcdConOutColumn, mSetupTextModeColumn);
|
||||
//PcdSet32 (PcdConOutRow, mSetupTextModeRow);
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
@ -1380,7 +1380,7 @@ BdsSetConsoleMode (
|
||||
//
|
||||
// If requried text mode is not supported, return error.
|
||||
//
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
@ -1390,13 +1390,13 @@ BdsSetConsoleMode (
|
||||
// In this case, the driver which produces simple text out need be restarted.
|
||||
//
|
||||
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
FreePool (Info);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
FreePool(Info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
FreePool (Info);
|
||||
FreePool(Info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1429,7 +1429,7 @@ BdsSetConsoleMode (
|
||||
&HandleCount,
|
||||
&HandleBuffer
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (Index = 0; Index < HandleCount; Index++) {
|
||||
gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);
|
||||
}
|
||||
@ -1437,7 +1437,7 @@ BdsSetConsoleMode (
|
||||
gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);
|
||||
}
|
||||
if (HandleBuffer != NULL) {
|
||||
FreePool (HandleBuffer);
|
||||
FreePool(HandleBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ IsKeyOptionValid (
|
||||
// Check CRC for Boot Option
|
||||
//
|
||||
gBS->CalculateCrc32 (BootOptionVar, BootOptionSize, &Crc);
|
||||
FreePool (BootOptionVar);
|
||||
FreePool(BootOptionVar);
|
||||
|
||||
return (BOOLEAN) ((KeyOption->BootOptionCrc == Crc) ? TRUE : FALSE);
|
||||
}
|
||||
@ -141,8 +141,8 @@ RegisterHotkey (
|
||||
//
|
||||
// Got the option, so just return
|
||||
//
|
||||
FreePool (TempOption);
|
||||
FreePool (KeyOrder);
|
||||
FreePool(TempOption);
|
||||
FreePool(KeyOrder);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -160,12 +160,12 @@ RegisterHotkey (
|
||||
}
|
||||
}
|
||||
|
||||
FreePool (TempOption);
|
||||
FreePool(TempOption);
|
||||
}
|
||||
|
||||
if (UpdateBootOption && (KeyOrder != NULL)) {
|
||||
RegisterOptionNumber = KeyOrder[Index];
|
||||
FreePool (TempOption);
|
||||
FreePool(TempOption);
|
||||
} else {
|
||||
Index = 0;
|
||||
RegisterOptionNumber = (UINT16) (MaxOptionNumber + 1);
|
||||
@ -186,8 +186,8 @@ RegisterHotkey (
|
||||
KeyOptionSize,
|
||||
KeyOption
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (KeyOrder);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(KeyOrder);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ RegisterHotkey (
|
||||
|
||||
NewKeyOrder = AllocatePool (KeyOrderSize);
|
||||
if (NewKeyOrder == NULL) {
|
||||
FreePool (KeyOrder);
|
||||
FreePool(KeyOrder);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -220,9 +220,9 @@ RegisterHotkey (
|
||||
);
|
||||
|
||||
if (KeyOrder != NULL) {
|
||||
FreePool (KeyOrder);
|
||||
FreePool(KeyOrder);
|
||||
}
|
||||
FreePool (NewKeyOrder);
|
||||
FreePool(NewKeyOrder);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -300,7 +300,7 @@ UnregisterHotkey (
|
||||
KeyOrder
|
||||
);
|
||||
|
||||
FreePool (KeyOrder);
|
||||
FreePool(KeyOrder);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -332,7 +332,7 @@ HotkeyBoot (
|
||||
|
||||
Status = BdsLibBootViaBootOption (mHotkeyBootOption, mHotkeyBootOption->DevicePath, &ExitDataSize, &ExitData);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Call platform action to indicate the boot fail
|
||||
//
|
||||
@ -345,10 +345,10 @@ HotkeyBoot (
|
||||
mHotkeyBootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_SUCCEEDED));
|
||||
PlatformBdsBootSuccess (mHotkeyBootOption);
|
||||
}
|
||||
FreePool (mHotkeyBootOption->Description);
|
||||
FreePool (mHotkeyBootOption->DevicePath);
|
||||
FreePool (mHotkeyBootOption->LoadOptions);
|
||||
FreePool (mHotkeyBootOption);
|
||||
FreePool(mHotkeyBootOption->Description);
|
||||
FreePool(mHotkeyBootOption->DevicePath);
|
||||
FreePool(mHotkeyBootOption->LoadOptions);
|
||||
FreePool(mHotkeyBootOption);
|
||||
|
||||
mHotkeyBootOption = NULL;
|
||||
|
||||
@ -482,7 +482,7 @@ HotkeyRegisterNotify (
|
||||
HotkeyCallback,
|
||||
&Hotkey->NotifyHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// some of the hotkey registry failed
|
||||
//
|
||||
@ -525,7 +525,7 @@ HotkeyEvent (
|
||||
&BufferSize,
|
||||
&Handle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If no more notification events exist
|
||||
//
|
||||
@ -537,8 +537,8 @@ HotkeyEvent (
|
||||
&gEfiSimpleTextInputExProtocolGuid,
|
||||
(VOID **) &SimpleTextInEx
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If no more notification events exist
|
||||
//
|
||||
@ -744,8 +744,8 @@ HotkeyGetOptionNumbers (
|
||||
// if (Status == EFI_NOT_FOUND) {
|
||||
// break;
|
||||
// }
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -771,7 +771,7 @@ HotkeyGetOptionNumbers (
|
||||
}
|
||||
}
|
||||
|
||||
FreePool (Name);
|
||||
FreePool(Name);
|
||||
|
||||
return OptionNumbers;
|
||||
}
|
||||
@ -817,8 +817,8 @@ InitializeHotkeyService (
|
||||
//
|
||||
// Platform needs to make sure setting volatile variable before calling 3rd party code shouldn't fail.
|
||||
//
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -833,11 +833,11 @@ InitializeHotkeyService (
|
||||
if (IsKeyOptionValid (KeyOption)) {
|
||||
HotkeyInsertList (KeyOption);
|
||||
}
|
||||
FreePool (KeyOption);
|
||||
FreePool(KeyOption);
|
||||
}
|
||||
|
||||
if (KeyOptionNumbers != NULL) {
|
||||
FreePool (KeyOptionNumbers);
|
||||
FreePool(KeyOptionNumbers);
|
||||
}
|
||||
|
||||
//
|
||||
@ -850,8 +850,8 @@ InitializeHotkeyService (
|
||||
NULL,
|
||||
&mHotkeyEvent
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -863,7 +863,7 @@ InitializeHotkeyService (
|
||||
mHotkeyEvent,
|
||||
&mHotkeyRegistration
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ InitializeLangVariable (
|
||||
}
|
||||
|
||||
if (Lang != NULL) {
|
||||
FreePool (Lang);
|
||||
FreePool(Lang);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ PlatformBdsShowProgress (
|
||||
&gEfiGraphicsOutputProtocolGuid,
|
||||
(VOID **) &GraphicsOutput
|
||||
);
|
||||
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||
if (EFI_ERROR(Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||
GraphicsOutput = NULL;
|
||||
|
||||
Status = gBS->HandleProtocol (
|
||||
@ -77,7 +77,7 @@ PlatformBdsShowProgress (
|
||||
(VOID **) &UgaDraw
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ PlatformBdsShowProgress (
|
||||
&ColorDepth,
|
||||
&RefreshRate
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
} else {
|
||||
@ -261,8 +261,8 @@ BdsMemoryTest (
|
||||
NULL,
|
||||
(VOID **) &GenMemoryTest
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (Pos);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(Pos);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ BdsMemoryTest (
|
||||
// do the test, and then the status of EFI_NO_MEDIA will be returned by
|
||||
// "MemoryTestInit". So it does not need to test memory again, just return.
|
||||
//
|
||||
FreePool (Pos);
|
||||
FreePool(Pos);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ BdsMemoryTest (
|
||||
|
||||
if (TmpStr != NULL) {
|
||||
PrintXY (10, 10, NULL, NULL, TmpStr);
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
}
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, "Enter memory test.\n"));
|
||||
@ -305,7 +305,7 @@ BdsMemoryTest (
|
||||
TmpStr = GetStringById (STRING_TOKEN (STR_SYSTEM_MEM_ERROR));
|
||||
if (TmpStr != NULL) {
|
||||
PrintXY (10, 10, NULL, NULL, TmpStr);
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
}
|
||||
|
||||
// ASSERT (0);
|
||||
@ -327,7 +327,7 @@ BdsMemoryTest (
|
||||
//
|
||||
StrnCatS (StrPercent, 80, TmpStr, sizeof (StrPercent) / sizeof (CHAR16) - StrLen (StrPercent) - 1);
|
||||
PrintXY (10, 10, NULL, NULL, StrPercent);
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
}
|
||||
|
||||
TmpStr = GetStringById (STRING_TOKEN (STR_PERFORM_MEM_TEST));
|
||||
@ -340,7 +340,7 @@ BdsMemoryTest (
|
||||
TestPercent,
|
||||
(UINTN) PreviousValue
|
||||
);
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ BdsMemoryTest (
|
||||
|
||||
if (!PcdGetBool (PcdConInConnectOnDemand)) {
|
||||
KeyStatus = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||
if (!EFI_ERROR (KeyStatus) && (Key.ScanCode == SCAN_ESC)) {
|
||||
if (!EFI_ERROR(KeyStatus) && (Key.ScanCode == SCAN_ESC)) {
|
||||
if (!RequireSoftECCInit) {
|
||||
if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) {
|
||||
TmpStr = GetStringById (STRING_TOKEN (STR_PERFORM_MEM_TEST));
|
||||
@ -364,7 +364,7 @@ BdsMemoryTest (
|
||||
100,
|
||||
(UINTN) PreviousValue
|
||||
);
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
}
|
||||
|
||||
PrintXY (10, 10, NULL, NULL, L"100");
|
||||
@ -391,7 +391,7 @@ Done:
|
||||
TmpStr = GetStringById (STRING_TOKEN (STR_MEM_TEST_COMPLETED));
|
||||
if (TmpStr != NULL) {
|
||||
StrnCatS (StrTotalMemory, 80, TmpStr, StrTotalMemorySize / sizeof (CHAR16) - StrLen (StrTotalMemory) - 1);
|
||||
FreePool (TmpStr);
|
||||
FreePool(TmpStr);
|
||||
}
|
||||
|
||||
PrintXY (10, 10, NULL, NULL, StrTotalMemory);
|
||||
@ -408,7 +408,7 @@ Done:
|
||||
DEBUG ((EFI_D_INFO, "%d bytes of system memory tested OK\r\n", TotalMemorySize));
|
||||
}
|
||||
|
||||
FreePool (Pos);
|
||||
FreePool(Pos);
|
||||
|
||||
|
||||
//
|
||||
|
@ -68,7 +68,7 @@ GrowDepexStack (
|
||||
//
|
||||
// Free The Old Stack
|
||||
//
|
||||
FreePool (mDepexEvaluationStack);
|
||||
FreePool(mDepexEvaluationStack);
|
||||
}
|
||||
|
||||
//
|
||||
@ -107,7 +107,7 @@ PushBool (
|
||||
// Grow the stack
|
||||
//
|
||||
Status = GrowDepexStack ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -239,7 +239,7 @@ CoreIsSchedulable (
|
||||
//
|
||||
Status = CoreAllEfiServicesAvailable ();
|
||||
DEBUG ((DEBUG_DISPATCH, " All UEFI Services Available = "));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, "FALSE\n RESULT = FALSE\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -305,7 +305,7 @@ CoreIsSchedulable (
|
||||
|
||||
Status = CoreLocateProtocol (&DriverGuid, NULL, &Interface);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = FALSE\n", &DriverGuid));
|
||||
Status = PushBool (FALSE);
|
||||
} else {
|
||||
@ -313,7 +313,7 @@ CoreIsSchedulable (
|
||||
*Iterator = EFI_DEP_REPLACE_TRUE;
|
||||
Status = PushBool (TRUE);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -324,19 +324,19 @@ CoreIsSchedulable (
|
||||
case EFI_DEP_AND:
|
||||
DEBUG ((DEBUG_DISPATCH, " AND\n"));
|
||||
Status = PopBool (&Operator);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = PopBool (&Operator2);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = PushBool ((BOOLEAN)(Operator && Operator2));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -345,19 +345,19 @@ CoreIsSchedulable (
|
||||
case EFI_DEP_OR:
|
||||
DEBUG ((DEBUG_DISPATCH, " OR\n"));
|
||||
Status = PopBool (&Operator);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = PopBool (&Operator2);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = PushBool ((BOOLEAN)(Operator || Operator2));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -366,13 +366,13 @@ CoreIsSchedulable (
|
||||
case EFI_DEP_NOT:
|
||||
DEBUG ((DEBUG_DISPATCH, " NOT\n"));
|
||||
Status = PopBool (&Operator);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = PushBool ((BOOLEAN)(!Operator));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -381,7 +381,7 @@ CoreIsSchedulable (
|
||||
case EFI_DEP_TRUE:
|
||||
DEBUG ((DEBUG_DISPATCH, " TRUE\n"));
|
||||
Status = PushBool (TRUE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -390,7 +390,7 @@ CoreIsSchedulable (
|
||||
case EFI_DEP_FALSE:
|
||||
DEBUG ((DEBUG_DISPATCH, " FALSE\n"));
|
||||
Status = PushBool (FALSE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -399,7 +399,7 @@ CoreIsSchedulable (
|
||||
case EFI_DEP_END:
|
||||
DEBUG ((DEBUG_DISPATCH, " END\n"));
|
||||
Status = PopBool (&Operator);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
@ -411,7 +411,7 @@ CoreIsSchedulable (
|
||||
DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = TRUE\n", &DriverGuid));
|
||||
|
||||
Status = PushBool (TRUE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ CoreGetDepexSectionAndPreProccess (
|
||||
(UINTN *)&DriverEntry->DepexSize,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_PROTOCOL_ERROR) {
|
||||
//
|
||||
// The section extraction protocol failed so set protocol error flag
|
||||
@ -456,7 +456,7 @@ CoreDispatcher (
|
||||
&gEfiEventDxeDispatchGuid,
|
||||
&DxeDispatchEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ CoreDispatcher (
|
||||
//
|
||||
// Update the driver state to reflect that it's been loaded
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreAcquireDispatcherLock ();
|
||||
|
||||
if (Status == EFI_SECURITY_VIOLATION) {
|
||||
@ -563,7 +563,7 @@ CoreDispatcher (
|
||||
// so that SMM Dispatcher get chance to dispatch SMM Drivers which depend
|
||||
// on UEFI protocols
|
||||
//
|
||||
if (!EFI_ERROR (ReturnStatus)) {
|
||||
if (!EFI_ERROR(ReturnStatus)) {
|
||||
CoreSignalEvent (DxeDispatchEvent);
|
||||
}
|
||||
|
||||
@ -741,13 +741,13 @@ FvIsBeingProcesssed (
|
||||
//
|
||||
FvNameGuidIsFound = FALSE;
|
||||
Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolumeBlockProtocolGuid, (VOID **)&Fvb);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Get the full FV header based on FVB protocol.
|
||||
//
|
||||
ASSERT (Fvb != NULL);
|
||||
Status = GetFwVolHeader (Fvb, &FwVolHeader);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ASSERT (FwVolHeader != NULL);
|
||||
if (VerifyFvHeaderChecksum (FwVolHeader) && FwVolHeader->ExtHeaderOffset != 0) {
|
||||
ExtHeaderOffset = (UINT32) FwVolHeader->ExtHeaderOffset;
|
||||
@ -775,11 +775,11 @@ FvIsBeingProcesssed (
|
||||
// Read FvNameGuid from FV extension header.
|
||||
//
|
||||
Status = ReadFvbData (Fvb, &LbaIndex, &LbaOffset, sizeof (FvNameGuid), (UINT8 *) &FvNameGuid);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
FvNameGuidIsFound = TRUE;
|
||||
}
|
||||
}
|
||||
CoreFreePool (FwVolHeader);
|
||||
CoreFreePool(FwVolHeader);
|
||||
}
|
||||
}
|
||||
|
||||
@ -839,7 +839,7 @@ CoreFvToDevicePath (
|
||||
// Remember the device path of the FV
|
||||
//
|
||||
Status = CoreHandleProtocol (FvHandle, &gEfiDevicePathProtocolGuid, (VOID **)&FvDevicePath);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
FileNameDevicePath = NULL;
|
||||
} else {
|
||||
//
|
||||
@ -1004,7 +1004,7 @@ CoreProcessFvImageFile (
|
||||
&BufferSize,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Evaluate the authentication status of the Firmware Volume through
|
||||
// Security Architectural Protocol
|
||||
@ -1017,7 +1017,7 @@ CoreProcessFvImageFile (
|
||||
FvFileDevicePath
|
||||
);
|
||||
if (FvFileDevicePath != NULL) {
|
||||
FreePool (FvFileDevicePath);
|
||||
FreePool(FvFileDevicePath);
|
||||
}
|
||||
|
||||
if (Status != EFI_SUCCESS) {
|
||||
@ -1025,7 +1025,7 @@ CoreProcessFvImageFile (
|
||||
// Security check failed. The firmware volume should not be used for any purpose.
|
||||
//
|
||||
if (Buffer != NULL) {
|
||||
FreePool (Buffer);
|
||||
FreePool(Buffer);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
@ -1063,7 +1063,7 @@ CoreProcessFvImageFile (
|
||||
//
|
||||
CopyMem (AlignedBuffer, Buffer, BufferSize);
|
||||
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) AlignedBuffer;
|
||||
CoreFreePool (Buffer);
|
||||
CoreFreePool(Buffer);
|
||||
Buffer = NULL;
|
||||
}
|
||||
}
|
||||
@ -1079,12 +1079,12 @@ CoreProcessFvImageFile (
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// ReadSection or Produce FVB failed, Free data buffer
|
||||
//
|
||||
if (Buffer != NULL) {
|
||||
FreePool (Buffer);
|
||||
FreePool(Buffer);
|
||||
}
|
||||
|
||||
if (AlignedBuffer != NULL) {
|
||||
@ -1150,7 +1150,7 @@ CoreFwVolEventProtocolNotify (
|
||||
&BufferSize,
|
||||
&FvHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If no more notification events exit
|
||||
//
|
||||
@ -1177,7 +1177,7 @@ CoreFwVolEventProtocolNotify (
|
||||
}
|
||||
|
||||
Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Fv);
|
||||
if (EFI_ERROR (Status) || Fv == NULL) {
|
||||
if (EFI_ERROR(Status) || Fv == NULL) {
|
||||
//
|
||||
// FvHandle must have Firmware Volume2 protocol thus we should never get here.
|
||||
//
|
||||
@ -1186,7 +1186,7 @@ CoreFwVolEventProtocolNotify (
|
||||
}
|
||||
|
||||
Status = CoreHandleProtocol (FvHandle, &gEfiDevicePathProtocolGuid, (VOID **)&FvDevicePath);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// The Firmware volume doesn't have device path, can't be dispatched.
|
||||
//
|
||||
@ -1214,7 +1214,7 @@ CoreFwVolEventProtocolNotify (
|
||||
&Attributes,
|
||||
&Size
|
||||
);
|
||||
if (!EFI_ERROR (GetNextFileStatus)) {
|
||||
if (!EFI_ERROR(GetNextFileStatus)) {
|
||||
if (Type == EFI_FV_FILETYPE_DXE_CORE) {
|
||||
//
|
||||
// If this is the DXE core fill in it's DevicePath & DeviceHandle
|
||||
@ -1257,12 +1257,12 @@ CoreFwVolEventProtocolNotify (
|
||||
&SizeOfBuffer,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// If PEI depex section is found, this FV image will be ignored in DXE phase.
|
||||
// Now, DxeCore doesn't support FV image with more one type DEPEX section.
|
||||
//
|
||||
FreePool (DepexBuffer);
|
||||
FreePool(DepexBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1280,12 +1280,12 @@ CoreFwVolEventProtocolNotify (
|
||||
&SizeOfBuffer,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// If SMM depex section is found, this FV image will be ignored in DXE phase.
|
||||
// Now, DxeCore doesn't support FV image with more one type DEPEX section.
|
||||
//
|
||||
FreePool (DepexBuffer);
|
||||
FreePool(DepexBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1303,7 +1303,7 @@ CoreFwVolEventProtocolNotify (
|
||||
&SizeOfBuffer,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If no depex section, produce a firmware volume block protocol for it so it gets dispatched from.
|
||||
//
|
||||
@ -1312,7 +1312,7 @@ CoreFwVolEventProtocolNotify (
|
||||
//
|
||||
// If depex section is found, this FV image will be dispatched until its depex is evaluated to TRUE.
|
||||
//
|
||||
FreePool (DepexBuffer);
|
||||
FreePool(DepexBuffer);
|
||||
CoreAddToDriverList (Fv, FvHandle, &NameGuid, Type);
|
||||
}
|
||||
} else {
|
||||
@ -1322,7 +1322,7 @@ CoreFwVolEventProtocolNotify (
|
||||
CoreAddToDriverList (Fv, FvHandle, &NameGuid, Type);
|
||||
}
|
||||
}
|
||||
} while (!EFI_ERROR (GetNextFileStatus));
|
||||
} while (!EFI_ERROR(GetNextFileStatus));
|
||||
}
|
||||
|
||||
//
|
||||
@ -1338,7 +1338,7 @@ CoreFwVolEventProtocolNotify (
|
||||
&SizeOfBuffer,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
AprioriEntryCount = SizeOfBuffer / sizeof (EFI_GUID);
|
||||
} else {
|
||||
AprioriEntryCount = 0;
|
||||
@ -1370,7 +1370,7 @@ CoreFwVolEventProtocolNotify (
|
||||
//
|
||||
// Free data allocated by Fv->ReadSection ()
|
||||
//
|
||||
CoreFreePool (AprioriFile);
|
||||
CoreFreePool(AprioriFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1295,7 +1295,7 @@ CoreAllocatePool (
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CoreFreePool (
|
||||
CoreFreePool(
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
|
@ -256,7 +256,7 @@ DxeMain (
|
||||
VectorInfoList = (EFI_VECTOR_HANDOFF_INFO *) (GET_GUID_HOB_DATA(GuidHob));
|
||||
}
|
||||
Status = InitializeCpuExceptionHandlers (VectorInfoList);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -288,7 +288,7 @@ DxeMain (
|
||||
// Start the Image Services.
|
||||
//
|
||||
Status = CoreInitializeImageServices (HobStart);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -313,7 +313,7 @@ DxeMain (
|
||||
// Initialize the Global Coherency Domain Services
|
||||
//
|
||||
Status = CoreInitializeGcdServices (&HobStart, MemoryBaseAddress, MemoryLength);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -324,7 +324,7 @@ DxeMain (
|
||||
// Install the DXE Services Table into the EFI System Tables's Configuration Table
|
||||
//
|
||||
Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDxeCoreDS);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -333,7 +333,7 @@ DxeMain (
|
||||
// Install the HOB List into the EFI System Tables's Configuration Table
|
||||
//
|
||||
Status = CoreInstallConfigurationTable (&gEfiHobListGuid, HobStart);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -342,7 +342,7 @@ DxeMain (
|
||||
// Install Memory Type Information Table into the EFI System Tables's Configuration Table
|
||||
//
|
||||
Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -354,7 +354,7 @@ DxeMain (
|
||||
//
|
||||
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
|
||||
Status = CoreInstallConfigurationTable (&gLoadFixedAddressConfigurationTableGuid, &gLoadModuleAtFixAddressConfigurationTable);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -405,7 +405,7 @@ DxeMain (
|
||||
// Initialize the Event Services
|
||||
//
|
||||
Status = CoreInitializeEventServices ();
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -427,7 +427,7 @@ DxeMain (
|
||||
// ASSERT (VectorInfo != NULL);
|
||||
if (!VectorInfo) return;
|
||||
Status = CoreInstallConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID *) VectorInfo);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -453,7 +453,7 @@ DxeMain (
|
||||
&gEfiDecompressProtocolGuid, &gEfiDecompress,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -469,13 +469,13 @@ DxeMain (
|
||||
// Produce Firmware Volume Protocols, one for each FV in the HOB list.
|
||||
//
|
||||
Status = FwVolBlockDriverInit (gDxeCoreImageHandle, gDxeCoreST);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Status = FwVolDriverInit (gDxeCoreImageHandle, gDxeCoreST);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -484,7 +484,7 @@ DxeMain (
|
||||
// Produce the Section Extraction Protocol
|
||||
//
|
||||
Status = InitializeSectionExtraction (gDxeCoreImageHandle, gDxeCoreST);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -531,7 +531,7 @@ DxeMain (
|
||||
(EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_EC_NO_ARCH)
|
||||
);
|
||||
}
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
@ -775,7 +775,7 @@ CoreExitBootServices (
|
||||
// Terminate memory services if the MapKey matches
|
||||
//
|
||||
Status = CoreTerminateMemoryMap (MapKey);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Notify other drivers that ExitBootServices fail
|
||||
//
|
||||
@ -948,7 +948,7 @@ DxeMainUefiDecompress (
|
||||
}
|
||||
|
||||
Status = UefiDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ GenericProtocolNotify (
|
||||
// See if the expected protocol is present in the handle database
|
||||
//
|
||||
Status = CoreLocateProtocol (Entry->ProtocolGuid, Entry->Registration, &Protocol);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ CoreCreateEventInternal (
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(EFI_ERROR (Status)) {
|
||||
if(EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -762,8 +762,8 @@ CoreCloseEvent (
|
||||
//
|
||||
CoreUnregisterProtocolNotify (Event);
|
||||
|
||||
Status = CoreFreePool (Event);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
Status = CoreFreePool(Event);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -186,8 +186,8 @@ CoreInitializeTimer (
|
||||
NULL,
|
||||
&mEfiCheckTimerEvent
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
mEfiCheckTimerEvent = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ CoreSetInterruptState (
|
||||
return;
|
||||
}
|
||||
Status = gSmmBase2->InSmm (gSmmBase2, &InSmm);
|
||||
if (!EFI_ERROR (Status) && !InSmm) {
|
||||
if (!EFI_ERROR(Status) && !InSmm) {
|
||||
gCpu->EnableInterrupt(gCpu);
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ ReadFvbData (
|
||||
*StartLba = *StartLba + 1;
|
||||
while (DataSize > 0) {
|
||||
Status = Fvb->GetBlockSize (Fvb, *StartLba, &BlockSize, &NumberOfBlocks);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ ReadFvbData (
|
||||
BlockIndex = 0;
|
||||
while (BlockIndex < NumberOfBlocks && DataSize >= BlockSize) {
|
||||
Status = Fvb->Read (Fvb, *StartLba + BlockIndex, 0, &BlockSize, Data);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
Data += BlockSize;
|
||||
@ -146,7 +146,7 @@ ReadFvbData (
|
||||
//
|
||||
if (DataSize > 0) {
|
||||
Status = Fvb->Read (Fvb, *StartLba + BlockIndex, 0, &DataSize, Data);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -194,7 +194,7 @@ GetFwVolHeader (
|
||||
Offset = 0;
|
||||
FvhLength = sizeof (EFI_FIRMWARE_VOLUME_HEADER);
|
||||
Status = ReadFvbData (Fvb, &StartLba, &Offset, FvhLength, (UINT8 *)&TempFvh);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -217,11 +217,11 @@ GetFwVolHeader (
|
||||
FvhLength = TempFvh.HeaderLength - sizeof (EFI_FIRMWARE_VOLUME_HEADER);
|
||||
Buffer = (UINT8 *)*FwVolHeader + sizeof (EFI_FIRMWARE_VOLUME_HEADER);
|
||||
Status = ReadFvbData (Fvb, &StartLba, &Offset, FvhLength, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Read failed so free buffer
|
||||
//
|
||||
CoreFreePool (*FwVolHeader);
|
||||
CoreFreePool(*FwVolHeader);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -257,7 +257,7 @@ FreeFvDeviceResource (
|
||||
CloseSectionStream (FfsFileEntry->StreamHandle);
|
||||
}
|
||||
|
||||
CoreFreePool (FfsFileEntry);
|
||||
CoreFreePool(FfsFileEntry);
|
||||
|
||||
FfsFileEntry = (FFS_FILE_LIST_ENTRY *) NextEntry;
|
||||
}
|
||||
@ -266,12 +266,12 @@ FreeFvDeviceResource (
|
||||
//
|
||||
// Free the cache
|
||||
//
|
||||
CoreFreePool (FvDevice->CachedFv);
|
||||
CoreFreePool(FvDevice->CachedFv);
|
||||
|
||||
//
|
||||
// Free Volume Header
|
||||
//
|
||||
CoreFreePool (FvDevice->FwVolHeader);
|
||||
CoreFreePool(FvDevice->FwVolHeader);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -316,7 +316,7 @@ FvCheck (
|
||||
FwVolHeader = FvDevice->FwVolHeader;
|
||||
|
||||
Status = Fvb->GetAttributes (Fvb, &FvbAttributes);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ FvCheck (
|
||||
//
|
||||
// Not check EFI_BAD_BUFFER_SIZE, for Size = BlockMap->Length
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -521,7 +521,7 @@ FvCheck (
|
||||
}
|
||||
|
||||
Done:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreeFvDeviceResource (FvDevice);
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ NotifyFwVolBlock (
|
||||
break;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -585,8 +585,8 @@ NotifyFwVolBlock (
|
||||
// Get the FirmwareVolumeBlock protocol on that handle
|
||||
//
|
||||
Status = CoreHandleProtocol (Handle, &gEfiFirmwareVolumeBlockProtocolGuid, (VOID **)&Fvb);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status) || (Fvb == NULL)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status) || (Fvb == NULL)) {
|
||||
if (FwVolHeader) {
|
||||
FreePool(FwVolHeader);
|
||||
}
|
||||
@ -599,7 +599,7 @@ NotifyFwVolBlock (
|
||||
// Make sure the Fv Header is O.K.
|
||||
//
|
||||
Status = GetFwVolHeader (Fvb, &FwVolHeader);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (FwVolHeader) {
|
||||
FreePool(FwVolHeader);
|
||||
}
|
||||
@ -608,7 +608,7 @@ NotifyFwVolBlock (
|
||||
// ASSERT (FwVolHeader != NULL);
|
||||
|
||||
if (!VerifyFvHeaderChecksum (FwVolHeader)) {
|
||||
CoreFreePool (FwVolHeader);
|
||||
CoreFreePool(FwVolHeader);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ NotifyFwVolBlock (
|
||||
// Check if there is an FV protocol already installed in that handle
|
||||
//
|
||||
Status = CoreHandleProtocol (Handle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Fv);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Update Fv to use a new Fvb
|
||||
//
|
||||
@ -660,7 +660,7 @@ NotifyFwVolBlock (
|
||||
FvDevice->AuthenticationStatus = GetFvbAuthenticationStatus (Fvb);
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (FvCheck (FvDevice))) {
|
||||
if (!EFI_ERROR(FvCheck (FvDevice))) {
|
||||
//
|
||||
// Install an New FV protocol on the existing handle
|
||||
//
|
||||
@ -670,12 +670,12 @@ NotifyFwVolBlock (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&FvDevice->Fv
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
} else {
|
||||
//
|
||||
// Free FvDevice Buffer for the corrupt FV image.
|
||||
//
|
||||
CoreFreePool (FvDevice);
|
||||
CoreFreePool(FvDevice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ FvGetNextFile (
|
||||
FvDevice = FV_DEVICE_FROM_THIS (This);
|
||||
|
||||
Status = FvGetVolumeAttributes (This, &FvAttributes);
|
||||
if (EFI_ERROR (Status)){
|
||||
if (EFI_ERROR(Status)){
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ FvReadFile (
|
||||
&LocalAttributes,
|
||||
&FileSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
} while (!CompareGuid (&SearchNameGuid, NameGuid));
|
||||
@ -444,7 +444,7 @@ FvReadFileSection (
|
||||
//
|
||||
FfsEntry = (FFS_FILE_LIST_ENTRY *) FvDevice->LastKey;
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ FvReadFileSection (
|
||||
FileBuffer,
|
||||
&FfsEntry->StreamHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@ -484,7 +484,7 @@ FvReadFileSection (
|
||||
FvDevice->IsFfs3Fv
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Inherit the authentication status.
|
||||
//
|
||||
@ -496,7 +496,7 @@ FvReadFileSection (
|
||||
//
|
||||
|
||||
Done:
|
||||
CoreFreePool (FileBuffer);
|
||||
CoreFreePool(FileBuffer);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
FvbDev->LbaCache = AllocatePool (FvbDev->NumBlocks * sizeof (LBA_CACHE));
|
||||
if (FvbDev->LbaCache == NULL) {
|
||||
CoreFreePool (FvbDev);
|
||||
CoreFreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -557,7 +557,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);
|
||||
if (FvbDev->DevicePath == NULL) {
|
||||
FreePool (FvbDev);
|
||||
FreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
((FV_MEMMAP_DEVICE_PATH *) FvbDev->DevicePath)->MemMapDevPath.StartingAddress = BaseAddress;
|
||||
@ -568,7 +568,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);
|
||||
if (FvbDev->DevicePath == NULL) {
|
||||
FreePool (FvbDev);
|
||||
FreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
CopyGuid (
|
||||
|
@ -148,7 +148,7 @@ CoreDumpGcdMemorySpaceMap (
|
||||
UINTN Index;
|
||||
|
||||
Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_GCD, "GCD:CoreGetMemorySpaceMap failed %r\n", Status));
|
||||
return;
|
||||
@ -170,7 +170,7 @@ CoreDumpGcdMemorySpaceMap (
|
||||
));
|
||||
}
|
||||
DEBUG ((DEBUG_GCD, "\n"));
|
||||
FreePool (MemorySpaceMap);
|
||||
FreePool(MemorySpaceMap);
|
||||
);
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ CoreDumpGcdIoSpaceMap (
|
||||
UINTN Index;
|
||||
|
||||
Status = CoreGetIoSpaceMap (&NumberOfDescriptors, &IoSpaceMap);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_GCD, "GCD:CoreGetIoSpaceMap failed %r\n", Status));
|
||||
return;
|
||||
@ -215,7 +215,7 @@ CoreDumpGcdIoSpaceMap (
|
||||
));
|
||||
}
|
||||
DEBUG ((DEBUG_GCD, "\n"));
|
||||
FreePool (IoSpaceMap);
|
||||
FreePool(IoSpaceMap);
|
||||
);
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ CoreAllocateGcdMapEntry (
|
||||
|
||||
*BottomEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));
|
||||
if (*BottomEntry == NULL) {
|
||||
CoreFreePool (*TopEntry);
|
||||
CoreFreePool(*TopEntry);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -520,7 +520,7 @@ CoreMergeGcdMapEntry (
|
||||
Entry->BaseAddress = AdjacentEntry->BaseAddress;
|
||||
}
|
||||
RemoveEntryList (AdjacentLink);
|
||||
CoreFreePool (AdjacentEntry);
|
||||
CoreFreePool(AdjacentEntry);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -550,10 +550,10 @@ CoreCleanupGcdMapEntry (
|
||||
LIST_ENTRY *Link;
|
||||
|
||||
if (TopEntry->Signature == 0) {
|
||||
CoreFreePool (TopEntry);
|
||||
CoreFreePool(TopEntry);
|
||||
}
|
||||
if (BottomEntry->Signature == 0) {
|
||||
CoreFreePool (BottomEntry);
|
||||
CoreFreePool(BottomEntry);
|
||||
}
|
||||
|
||||
Link = StartLink;
|
||||
@ -754,7 +754,7 @@ CoreConvertSpace (
|
||||
// Search for the list of descriptors that cover the range BaseAddress to BaseAddress+Length
|
||||
//
|
||||
Status = CoreSearchGcdMapEntry (BaseAddress, Length, &StartLink, &EndLink, Map);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
|
||||
goto Done;
|
||||
@ -844,7 +844,7 @@ CoreConvertSpace (
|
||||
// Allocate work space to perform this operation
|
||||
//
|
||||
Status = CoreAllocateGcdMapEntry (&TopEntry, &BottomEntry);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@ -870,9 +870,9 @@ CoreConvertSpace (
|
||||
CpuArchAttributes
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
CoreFreePool (TopEntry);
|
||||
CoreFreePool (BottomEntry);
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreFreePool(TopEntry);
|
||||
CoreFreePool(BottomEntry);
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@ -1101,7 +1101,7 @@ CoreAllocateSpace (
|
||||
// Search for the list of descriptors that cover the range BaseAddress to BaseAddress+Length
|
||||
//
|
||||
Status = CoreSearchGcdMapEntry (*BaseAddress, Length, &StartLink, &EndLink, Map);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@ -1119,7 +1119,7 @@ CoreAllocateSpace (
|
||||
Entry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
|
||||
Link = Link->ForwardLink;
|
||||
Status = CoreAllocateSpaceCheckEntry (Operation, Entry, GcdMemoryType, GcdIoType);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@ -1158,7 +1158,7 @@ CoreAllocateSpace (
|
||||
}
|
||||
|
||||
Status = CoreAllocateSpaceCheckEntry (Operation, Entry, GcdMemoryType, GcdIoType);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1189,7 +1189,7 @@ CoreAllocateSpace (
|
||||
// Search for the list of descriptors that cover the range BaseAddress to BaseAddress+Length
|
||||
//
|
||||
Status = CoreSearchGcdMapEntry (*BaseAddress, Length, &StartLink, &EndLink, Map);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@ -1208,7 +1208,7 @@ CoreAllocateSpace (
|
||||
while (SubLink != EndLink->ForwardLink) {
|
||||
Entry = CR (SubLink, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
|
||||
Status = CoreAllocateSpaceCheckEntry (Operation, Entry, GcdMemoryType, GcdIoType);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Link = SubLink;
|
||||
Found = FALSE;
|
||||
break;
|
||||
@ -1229,7 +1229,7 @@ CoreAllocateSpace (
|
||||
// Allocate work space to perform this operation
|
||||
//
|
||||
Status = CoreAllocateGcdMapEntry (&TopEntry, &BottomEntry);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@ -1258,7 +1258,7 @@ CoreAllocateSpace (
|
||||
|
||||
Done:
|
||||
DEBUG ((DEBUG_GCD, " Status = %r", Status));
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_GCD, " (BaseAddress = %016lx)", *BaseAddress));
|
||||
}
|
||||
DEBUG ((DEBUG_GCD, "\n"));
|
||||
@ -1391,7 +1391,7 @@ CoreAddMemorySpace (
|
||||
|
||||
Status = CoreInternalAddMemorySpace (GcdMemoryType, BaseAddress, Length, Capabilities);
|
||||
|
||||
if (!EFI_ERROR (Status) && GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {
|
||||
if (!EFI_ERROR(Status) && GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {
|
||||
|
||||
PageBaseAddress = PageAlignLength (BaseAddress);
|
||||
PageLength = PageAlignLength (BaseAddress + Length - PageBaseAddress);
|
||||
@ -1406,7 +1406,7 @@ CoreAddMemorySpace (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
CoreAddMemoryDescriptor (
|
||||
EfiConventionalMemory,
|
||||
PageBaseAddress,
|
||||
@ -1425,7 +1425,7 @@ CoreAddMemorySpace (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
CoreAddMemoryDescriptor (
|
||||
EfiConventionalMemory,
|
||||
PageBaseAddress,
|
||||
@ -1544,7 +1544,7 @@ CoreGetMemorySpaceDescriptor (
|
||||
// Search for the list of descriptors that contain BaseAddress
|
||||
//
|
||||
Status = CoreSearchGcdMapEntry (BaseAddress, 1, &StartLink, &EndLink, &mGcdMemorySpaceMap);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
} else {
|
||||
// ASSERT (StartLink != NULL && EndLink != NULL);
|
||||
@ -1853,7 +1853,7 @@ CoreGetIoSpaceDescriptor (
|
||||
// Search for the list of descriptors that contain BaseAddress
|
||||
//
|
||||
Status = CoreSearchGcdMapEntry (BaseAddress, 1, &StartLink, &EndLink, &mGcdIoSpaceMap);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
} else {
|
||||
// ASSERT (StartLink != NULL && EndLink != NULL);
|
||||
@ -2427,7 +2427,7 @@ CoreInitializeGcdServices (
|
||||
MemoryHob = Hob.MemoryAllocation;
|
||||
BaseAddress = MemoryHob->AllocDescriptor.MemoryBaseAddress;
|
||||
Status = CoreGetMemorySpaceDescriptor (BaseAddress, &Descriptor);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = CoreAllocateMemorySpace (
|
||||
EfiGcdAllocateAddress,
|
||||
Descriptor.GcdMemoryType,
|
||||
@ -2437,7 +2437,7 @@ CoreInitializeGcdServices (
|
||||
gDxeCoreImageHandle,
|
||||
NULL
|
||||
);
|
||||
if (!EFI_ERROR (Status) && Descriptor.GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {
|
||||
if (!EFI_ERROR(Status) && Descriptor.GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {
|
||||
CoreAddMemoryDescriptor (
|
||||
MemoryHob->AllocDescriptor.MemoryType,
|
||||
MemoryHob->AllocDescriptor.MemoryBaseAddress,
|
||||
@ -2514,7 +2514,7 @@ CoreInitializeGcdServices (
|
||||
}
|
||||
}
|
||||
}
|
||||
CoreFreePool (MemorySpaceMap);
|
||||
CoreFreePool(MemorySpaceMap);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ CoreConnectController (
|
||||
// Make sure ControllerHandle is valid
|
||||
//
|
||||
Status = CoreValidateHandle (ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ CoreConnectController (
|
||||
// Check whether the user has permission to start UEFI device drivers.
|
||||
//
|
||||
Status = CoreHandleProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, (VOID **)&HandleFilePath);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
FilePath = HandleFilePath;
|
||||
TempFilePath = NULL;
|
||||
if (RemainingDevicePath != NULL && !Recursive) {
|
||||
@ -104,9 +104,9 @@ CoreConnectController (
|
||||
FALSE
|
||||
);
|
||||
if (TempFilePath != NULL) {
|
||||
FreePool (TempFilePath);
|
||||
FreePool(TempFilePath);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -144,7 +144,7 @@ CoreConnectController (
|
||||
// Free the aligned copy of RemainingDevicePath
|
||||
//
|
||||
if (AlignedRemainingDevicePath != NULL) {
|
||||
CoreFreePool (AlignedRemainingDevicePath);
|
||||
CoreFreePool(AlignedRemainingDevicePath);
|
||||
}
|
||||
|
||||
//
|
||||
@ -160,7 +160,7 @@ CoreConnectController (
|
||||
// Make sure the DriverBindingHandle is valid
|
||||
//
|
||||
Status = CoreValidateHandle (ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Release the protocol lock on the handle database
|
||||
//
|
||||
@ -230,7 +230,7 @@ CoreConnectController (
|
||||
//
|
||||
// Free the handle buffer of ControllerHandle's children
|
||||
//
|
||||
CoreFreePool (ChildHandleBuffer);
|
||||
CoreFreePool(ChildHandleBuffer);
|
||||
}
|
||||
|
||||
return ReturnStatus;
|
||||
@ -274,7 +274,7 @@ AddSortedDriverBindingProtocol (
|
||||
// Make sure the DriverBindingHandle is valid
|
||||
//
|
||||
Status = CoreValidateHandle (DriverBindingHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ AddSortedDriverBindingProtocol (
|
||||
&gEfiDriverBindingProtocolGuid,
|
||||
(VOID **) &DriverBinding
|
||||
);
|
||||
if (EFI_ERROR (Status) || DriverBinding == NULL) {
|
||||
if (EFI_ERROR(Status) || DriverBinding == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ AddSortedDriverBindingProtocol (
|
||||
//
|
||||
// If DriverBindingHandle does not support the Driver Binding Protocol then return
|
||||
//
|
||||
if (EFI_ERROR (Status) || DriverBinding == NULL) {
|
||||
if (EFI_ERROR(Status) || DriverBinding == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ CoreConnectSingleController (
|
||||
&DriverBindingHandleCount,
|
||||
&DriverBindingHandleBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status) || (DriverBindingHandleCount == 0)) {
|
||||
if (EFI_ERROR(Status) || (DriverBindingHandleCount == 0)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -437,7 +437,7 @@ CoreConnectSingleController (
|
||||
//
|
||||
SortedDriverBindingProtocols = AllocatePool (sizeof (VOID *) * DriverBindingHandleCount);
|
||||
if (SortedDriverBindingProtocols == NULL) {
|
||||
CoreFreePool (DriverBindingHandleBuffer);
|
||||
CoreFreePool(DriverBindingHandleBuffer);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ CoreConnectSingleController (
|
||||
NULL,
|
||||
(VOID **) &PlatformDriverOverride
|
||||
);
|
||||
if (!EFI_ERROR (Status) && (PlatformDriverOverride != NULL)) {
|
||||
if (!EFI_ERROR(Status) && (PlatformDriverOverride != NULL)) {
|
||||
DriverImageHandle = NULL;
|
||||
do {
|
||||
Status = PlatformDriverOverride->GetDriver (
|
||||
@ -473,7 +473,7 @@ CoreConnectSingleController (
|
||||
ControllerHandle,
|
||||
&DriverImageHandle
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
AddSortedDriverBindingProtocol (
|
||||
DriverImageHandle,
|
||||
&NumberOfSortedDriverBindingProtocols,
|
||||
@ -483,7 +483,7 @@ CoreConnectSingleController (
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
} while (!EFI_ERROR (Status));
|
||||
} while (!EFI_ERROR(Status));
|
||||
}
|
||||
#if FAMILY_OVERRIDE
|
||||
//
|
||||
@ -498,7 +498,7 @@ CoreConnectSingleController (
|
||||
&gEfiDriverFamilyOverrideProtocolGuid,
|
||||
(VOID **) &DriverFamilyOverride
|
||||
);
|
||||
if (!EFI_ERROR (Status) && (DriverFamilyOverride != NULL)) {
|
||||
if (!EFI_ERROR(Status) && (DriverFamilyOverride != NULL)) {
|
||||
DriverFamilyOverrideVersion = DriverFamilyOverride->GetVersion (DriverFamilyOverride);
|
||||
if ((HighestIndex == DriverBindingHandleCount) || (DriverFamilyOverrideVersion > HighestVersion)) {
|
||||
HighestVersion = DriverFamilyOverrideVersion;
|
||||
@ -529,14 +529,14 @@ CoreConnectSingleController (
|
||||
&gEfiBusSpecificDriverOverrideProtocolGuid,
|
||||
(VOID **) &BusSpecificDriverOverride
|
||||
);
|
||||
if (!EFI_ERROR (Status) && (BusSpecificDriverOverride != NULL)) {
|
||||
if (!EFI_ERROR(Status) && (BusSpecificDriverOverride != NULL)) {
|
||||
DriverImageHandle = NULL;
|
||||
do {
|
||||
Status = BusSpecificDriverOverride->GetDriver (
|
||||
BusSpecificDriverOverride,
|
||||
&DriverImageHandle
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
AddSortedDriverBindingProtocol (
|
||||
DriverImageHandle,
|
||||
&NumberOfSortedDriverBindingProtocols,
|
||||
@ -546,7 +546,7 @@ CoreConnectSingleController (
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
} while (!EFI_ERROR (Status));
|
||||
} while (!EFI_ERROR(Status));
|
||||
}
|
||||
|
||||
//
|
||||
@ -567,7 +567,7 @@ CoreConnectSingleController (
|
||||
//
|
||||
// Free the Driver Binding Handle Buffer
|
||||
//
|
||||
CoreFreePool (DriverBindingHandleBuffer);
|
||||
CoreFreePool(DriverBindingHandleBuffer);
|
||||
|
||||
//
|
||||
// If the number of Driver Binding Protocols has increased since this function started, then return
|
||||
@ -580,12 +580,12 @@ CoreConnectSingleController (
|
||||
&NewDriverBindingHandleCount,
|
||||
&NewDriverBindingHandleBuffer
|
||||
);
|
||||
CoreFreePool (NewDriverBindingHandleBuffer);
|
||||
CoreFreePool(NewDriverBindingHandleBuffer);
|
||||
if (NewDriverBindingHandleCount > DriverBindingHandleCount) {
|
||||
//
|
||||
// Free any buffers that were allocated with AllocatePool()
|
||||
//
|
||||
CoreFreePool (SortedDriverBindingProtocols);
|
||||
CoreFreePool(SortedDriverBindingProtocols);
|
||||
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
@ -649,7 +649,7 @@ CoreConnectSingleController (
|
||||
RemainingDevicePath
|
||||
);
|
||||
// PERF_END (DriverBinding->DriverBindingHandle, "DB:Support:", NULL, 0);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
SortedDriverBindingProtocols[Index] = NULL;
|
||||
DriverFound = TRUE;
|
||||
if (PlatformDriverOverride) {
|
||||
@ -673,7 +673,7 @@ CoreConnectSingleController (
|
||||
);
|
||||
// PERF_END (DriverBinding->DriverBindingHandle, "DB:Start:", NULL, 0);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// The driver was successfully started on ControllerHandle, so set a flag
|
||||
//
|
||||
@ -694,7 +694,7 @@ CoreConnectSingleController (
|
||||
//
|
||||
// Free any buffers that were allocated with AllocatePool()
|
||||
//
|
||||
CoreFreePool (SortedDriverBindingProtocols);
|
||||
CoreFreePool(SortedDriverBindingProtocols);
|
||||
|
||||
//
|
||||
// If at least one driver was started on ControllerHandle, then return EFI_SUCCESS.
|
||||
@ -783,7 +783,7 @@ CoreDisconnectController (
|
||||
// Make sure ControllerHandle is valid
|
||||
//
|
||||
Status = CoreValidateHandle (ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ CoreDisconnectController (
|
||||
//
|
||||
if (ChildHandle != NULL) {
|
||||
Status = CoreValidateHandle (ChildHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -881,7 +881,7 @@ CoreDisconnectController (
|
||||
&gEfiDriverBindingProtocolGuid,
|
||||
(VOID **)&DriverBinding
|
||||
);
|
||||
if (EFI_ERROR (Status) || DriverBinding == NULL) {
|
||||
if (EFI_ERROR(Status) || DriverBinding == NULL) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -964,16 +964,16 @@ CoreDisconnectController (
|
||||
Status = DriverBinding->Stop (DriverBinding, ControllerHandle, ChildrenToStop, ChildBuffer);
|
||||
}
|
||||
}
|
||||
if (!EFI_ERROR (Status) && ((ChildHandle == NULL) || (ChildBufferCount == ChildrenToStop))) {
|
||||
if (!EFI_ERROR(Status) && ((ChildHandle == NULL) || (ChildBufferCount == ChildrenToStop))) {
|
||||
Status = DriverBinding->Stop (DriverBinding, ControllerHandle, 0, NULL);
|
||||
}
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
StopCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (ChildBuffer != NULL) {
|
||||
CoreFreePool (ChildBuffer);
|
||||
CoreFreePool(ChildBuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -987,7 +987,7 @@ CoreDisconnectController (
|
||||
Done:
|
||||
|
||||
if (DriverImageHandleBuffer != NULL) {
|
||||
CoreFreePool (DriverImageHandleBuffer);
|
||||
CoreFreePool(DriverImageHandleBuffer);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -277,7 +277,7 @@ CoreUnregisterProtocolNotify (
|
||||
|
||||
do {
|
||||
Status = CoreUnregisterProtocolNotifyEvent (Event);
|
||||
} while (!EFI_ERROR (Status));
|
||||
} while (!EFI_ERROR(Status));
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -373,7 +373,7 @@ CoreInstallProtocolInterfaceNotify (
|
||||
|
||||
if (*UserHandle != NULL) {
|
||||
Status = CoreHandleProtocol (*UserHandle, Protocol, (VOID **)&ExistingInterface);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@ -431,7 +431,7 @@ CoreInstallProtocolInterfaceNotify (
|
||||
}
|
||||
|
||||
Status = CoreValidateHandle (Handle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ Done:
|
||||
// Done, unlock the database and return
|
||||
//
|
||||
CoreReleaseProtocolLock ();
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Return the new handle back to the caller
|
||||
//
|
||||
@ -489,7 +489,7 @@ Done:
|
||||
// There was an error, clean up
|
||||
//
|
||||
if (Prot != NULL) {
|
||||
CoreFreePool (Prot);
|
||||
CoreFreePool(Prot);
|
||||
}
|
||||
}
|
||||
|
||||
@ -552,7 +552,7 @@ CoreInstallMultipleProtocolInterfaces (
|
||||
// Check for duplicate device path and install the protocol interfaces
|
||||
//
|
||||
VA_START (Args, Handle);
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR(Status); Index++) {
|
||||
//
|
||||
// If protocol is NULL, then it's the end of the list
|
||||
//
|
||||
@ -570,7 +570,7 @@ CoreInstallMultipleProtocolInterfaces (
|
||||
DeviceHandle = NULL;
|
||||
DevicePath = Interface;
|
||||
Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, &DeviceHandle);
|
||||
if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(DevicePath)) {
|
||||
if (!EFI_ERROR(Status) && (DeviceHandle != NULL) && IsDevicePathEnd(DevicePath)) {
|
||||
// If we wish to keep installing anyway, we should just prevent the status change here, otherwise function will return EFI_ALREADY_STARTED
|
||||
//Status = EFI_ALREADY_STARTED;
|
||||
continue;
|
||||
@ -587,7 +587,7 @@ CoreInstallMultipleProtocolInterfaces (
|
||||
//
|
||||
// If there was an error, remove all the interfaces that were installed without any errors
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Reset the va_arg back to the first argument.
|
||||
//
|
||||
@ -651,7 +651,7 @@ CoreDisconnectControllersUsingProtocolInterface (
|
||||
CoreReleaseProtocolLock ();
|
||||
Status = CoreDisconnectController (UserHandle, OpenData->AgentHandle, NULL);
|
||||
CoreAcquireProtocolLock ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
ItemFound = FALSE;
|
||||
break;
|
||||
}
|
||||
@ -659,7 +659,7 @@ CoreDisconnectControllersUsingProtocolInterface (
|
||||
}
|
||||
} while (ItemFound);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Attempt to remove BY_HANDLE_PROTOOCL and GET_PROTOCOL and TEST_PROTOCOL Open List items
|
||||
//
|
||||
@ -674,7 +674,7 @@ CoreDisconnectControllersUsingProtocolInterface (
|
||||
ItemFound = TRUE;
|
||||
RemoveEntryList (&OpenData->Link);
|
||||
Prot->OpenListCount--;
|
||||
CoreFreePool (OpenData);
|
||||
CoreFreePool(OpenData);
|
||||
}
|
||||
}
|
||||
} while (ItemFound);
|
||||
@ -683,7 +683,7 @@ CoreDisconnectControllersUsingProtocolInterface (
|
||||
//
|
||||
// If there are errors or still has open items in the list, then reconnect all the drivers and return an error
|
||||
//
|
||||
if (EFI_ERROR (Status) || (Prot->OpenListCount > 0)) {
|
||||
if (EFI_ERROR(Status) || (Prot->OpenListCount > 0)) {
|
||||
CoreReleaseProtocolLock ();
|
||||
CoreConnectController (UserHandle, NULL, NULL, TRUE);
|
||||
CoreAcquireProtocolLock ();
|
||||
@ -731,7 +731,7 @@ CoreUninstallProtocolInterface (
|
||||
// Check that UserHandle is a valid handle
|
||||
//
|
||||
Status = CoreValidateHandle (UserHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -756,7 +756,7 @@ CoreUninstallProtocolInterface (
|
||||
UserHandle,
|
||||
Prot
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// One or more drivers refused to release, so return the error
|
||||
//
|
||||
@ -786,7 +786,7 @@ CoreUninstallProtocolInterface (
|
||||
// Free the memory
|
||||
//
|
||||
Prot->Signature = 0;
|
||||
CoreFreePool (Prot);
|
||||
CoreFreePool(Prot);
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -796,7 +796,7 @@ CoreUninstallProtocolInterface (
|
||||
if (IsListEmpty (&Handle->Protocols)) {
|
||||
Handle->Signature = 0;
|
||||
RemoveEntryList (&Handle->AllHandles);
|
||||
CoreFreePool (Handle);
|
||||
CoreFreePool(Handle);
|
||||
}
|
||||
|
||||
Done:
|
||||
@ -838,7 +838,7 @@ CoreUninstallMultipleProtocolInterfaces (
|
||||
UINTN Index;
|
||||
|
||||
VA_START (Args, Handle);
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR(Status); Index++) {
|
||||
//
|
||||
// If protocol is NULL, then it's the end of the list
|
||||
//
|
||||
@ -860,7 +860,7 @@ CoreUninstallMultipleProtocolInterfaces (
|
||||
// If there was an error, add all the interfaces that were
|
||||
// uninstalled without any errors
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Reset the va_arg back to the first argument.
|
||||
//
|
||||
@ -899,7 +899,7 @@ CoreGetProtocolInterface (
|
||||
LIST_ENTRY *Link;
|
||||
|
||||
Status = CoreValidateHandle (UserHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1017,7 +1017,7 @@ CoreOpenProtocol (
|
||||
// Check for invalid UserHandle
|
||||
//
|
||||
Status = CoreValidateHandle (UserHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1027,11 +1027,11 @@ CoreOpenProtocol (
|
||||
switch (Attributes) {
|
||||
case EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER :
|
||||
Status = CoreValidateHandle (ImageHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
Status = CoreValidateHandle (ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
if (UserHandle == ControllerHandle) {
|
||||
@ -1041,17 +1041,17 @@ CoreOpenProtocol (
|
||||
case EFI_OPEN_PROTOCOL_BY_DRIVER :
|
||||
case EFI_OPEN_PROTOCOL_BY_DRIVER | EFI_OPEN_PROTOCOL_EXCLUSIVE :
|
||||
Status = CoreValidateHandle (ImageHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
Status = CoreValidateHandle (ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
break;
|
||||
case EFI_OPEN_PROTOCOL_EXCLUSIVE :
|
||||
Status = CoreValidateHandle (ImageHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
break;
|
||||
@ -1138,7 +1138,7 @@ CoreOpenProtocol (
|
||||
CoreReleaseProtocolLock ();
|
||||
Status = CoreDisconnectController (UserHandle, OpenData->AgentHandle, NULL);
|
||||
CoreAcquireProtocolLock ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
goto Done;
|
||||
}
|
||||
@ -1228,16 +1228,16 @@ CoreCloseProtocol (
|
||||
// Check for invalid parameters
|
||||
//
|
||||
Status = CoreValidateHandle (UserHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
Status = CoreValidateHandle (AgentHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
if (ControllerHandle != NULL) {
|
||||
Status = CoreValidateHandle (ControllerHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -1269,7 +1269,7 @@ CoreCloseProtocol (
|
||||
if ((OpenData->AgentHandle == AgentHandle) && (OpenData->ControllerHandle == ControllerHandle)) {
|
||||
RemoveEntryList (&OpenData->Link);
|
||||
ProtocolInterface->OpenListCount--;
|
||||
CoreFreePool (OpenData);
|
||||
CoreFreePool(OpenData);
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
@ -1422,7 +1422,7 @@ CoreProtocolsPerHandle (
|
||||
EFI_GUID **Buffer;
|
||||
|
||||
Status = CoreValidateHandle (UserHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ CoreLocateDevicePath (
|
||||
// Get a list of all handles that support the requested protocol
|
||||
//
|
||||
Status = CoreLocateHandleBuffer (ByProtocol, Protocol, NULL, &HandleCount, &Handles);
|
||||
if (EFI_ERROR (Status) || HandleCount == 0) {
|
||||
if (EFI_ERROR(Status) || HandleCount == 0) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -477,7 +477,7 @@ CoreLocateDevicePath (
|
||||
for(Index = 0; Index < HandleCount; Index += 1) {
|
||||
Handle = Handles[Index];
|
||||
Status = CoreHandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID **)&TmpDevicePath);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If this handle doesn't support device path, then skip it
|
||||
//
|
||||
@ -507,7 +507,7 @@ CoreLocateDevicePath (
|
||||
}
|
||||
}
|
||||
|
||||
CoreFreePool (Handles);
|
||||
CoreFreePool(Handles);
|
||||
|
||||
//
|
||||
// If there wasn't any match, then no parts of the device path was found.
|
||||
|
@ -194,7 +194,7 @@ CoreReinstallProtocolInterface (
|
||||
PROTOCOL_ENTRY *ProtEntry;
|
||||
|
||||
Status = CoreValidateHandle (UserHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ CoreReinstallProtocolInterface (
|
||||
UserHandle,
|
||||
Prot
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// One or more drivers refused to release, so return the error
|
||||
//
|
||||
|
@ -180,7 +180,7 @@ CoreInitializeImageServices (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&Image->Info
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
mCurrentImage = Image;
|
||||
|
||||
@ -386,7 +386,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
|
||||
&Size,
|
||||
&SectionHeader
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
if (Size != sizeof (EFI_IMAGE_SECTION_HEADER)) {
|
||||
@ -468,7 +468,7 @@ CoreLoadPeImage (
|
||||
// Get information about the image being loaded
|
||||
//
|
||||
Status = PeCoffLoaderGetImageInfo (&Image->ImageContext);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ CoreLoadPeImage (
|
||||
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 ) {
|
||||
Status = GetPeCoffImageFixLoadingAssignedAddress (&(Image->ImageContext));
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If the code memory is not ready, invoke CoreAllocatePage with AllocateAnyPages to load the driver.
|
||||
//
|
||||
@ -567,7 +567,7 @@ CoreLoadPeImage (
|
||||
&Image->ImageContext.ImageAddress
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status) && !Image->ImageContext.RelocationsStripped) {
|
||||
if (EFI_ERROR(Status) && !Image->ImageContext.RelocationsStripped) {
|
||||
Status = CoreAllocatePages (
|
||||
AllocateAnyPages,
|
||||
(EFI_MEMORY_TYPE) (Image->ImageContext.ImageCodeMemoryType),
|
||||
@ -576,7 +576,7 @@ CoreLoadPeImage (
|
||||
);
|
||||
}
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
DstBufAlocated = TRUE;
|
||||
@ -616,7 +616,7 @@ CoreLoadPeImage (
|
||||
// Load the image from the file into the allocated memory
|
||||
//
|
||||
Status = PeCoffLoaderLoadImage (&Image->ImageContext);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -639,7 +639,7 @@ CoreLoadPeImage (
|
||||
// Relocate the image in memory
|
||||
//
|
||||
Status = PeCoffLoaderRelocateImage (&Image->ImageContext);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -796,7 +796,7 @@ Done:
|
||||
}
|
||||
|
||||
if (Image->ImageContext.FixupData != NULL) {
|
||||
CoreFreePool (Image->ImageContext.FixupData);
|
||||
CoreFreePool(Image->ImageContext.FixupData);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -826,7 +826,7 @@ CoreLoadedImageInfo (
|
||||
&gEfiLoadedImageProtocolGuid,
|
||||
(VOID **)&LoadedImage
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Image = LOADED_IMAGE_PRIVATE_DATA_FROM_THIS (LoadedImage);
|
||||
} else {
|
||||
DEBUG ((DEBUG_LOAD, "CoreLoadedImageInfo: Not an ImageHandle %p\n", ImageHandle));
|
||||
@ -885,14 +885,14 @@ CoreUnloadAndCloseImage (
|
||||
&HandleCount,
|
||||
&HandleBuffer
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {
|
||||
Status = CoreProtocolsPerHandle (
|
||||
HandleBuffer[HandleIndex],
|
||||
&ProtocolGuidArray,
|
||||
&ArrayCount
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (ProtocolIndex = 0; ProtocolIndex < ArrayCount; ProtocolIndex++) {
|
||||
Status = CoreOpenProtocolInformation (
|
||||
HandleBuffer[HandleIndex],
|
||||
@ -900,7 +900,7 @@ CoreUnloadAndCloseImage (
|
||||
&OpenInfo,
|
||||
&OpenInfoCount
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for (OpenInfoIndex = 0; OpenInfoIndex < OpenInfoCount; OpenInfoIndex++) {
|
||||
if (OpenInfo[OpenInfoIndex].AgentHandle == Image->Handle) {
|
||||
Status = CoreCloseProtocol (
|
||||
@ -922,7 +922,7 @@ CoreUnloadAndCloseImage (
|
||||
}
|
||||
}
|
||||
if (HandleBuffer != NULL) {
|
||||
CoreFreePool (HandleBuffer);
|
||||
CoreFreePool(HandleBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -957,7 +957,7 @@ CoreUnloadAndCloseImage (
|
||||
//
|
||||
RemoveEntryList (&Image->RuntimeData->Link);
|
||||
}
|
||||
CoreFreePool (Image->RuntimeData);
|
||||
CoreFreePool(Image->RuntimeData);
|
||||
}
|
||||
|
||||
//
|
||||
@ -971,18 +971,18 @@ CoreUnloadAndCloseImage (
|
||||
// Done with the Image structure
|
||||
//
|
||||
if (Image->Info.FilePath != NULL) {
|
||||
CoreFreePool (Image->Info.FilePath);
|
||||
CoreFreePool(Image->Info.FilePath);
|
||||
}
|
||||
|
||||
if (Image->LoadedImageDevicePath != NULL) {
|
||||
CoreFreePool (Image->LoadedImageDevicePath);
|
||||
CoreFreePool(Image->LoadedImageDevicePath);
|
||||
}
|
||||
|
||||
if (Image->FixupData != NULL) {
|
||||
CoreFreePool (Image->FixupData);
|
||||
CoreFreePool(Image->FixupData);
|
||||
}
|
||||
|
||||
CoreFreePool (Image);
|
||||
CoreFreePool(Image);
|
||||
}
|
||||
|
||||
|
||||
@ -1090,7 +1090,7 @@ CoreLoadImageCommon (
|
||||
FHand.Source = SourceBuffer;
|
||||
FHand.SourceSize = SourceSize;
|
||||
Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DeviceHandle = NULL;
|
||||
}
|
||||
if (SourceSize > 0) {
|
||||
@ -1119,17 +1119,17 @@ CoreLoadImageCommon (
|
||||
//
|
||||
FHand.FreeBuffer = TRUE;
|
||||
Status = CoreLocateDevicePath (&gEfiFirmwareVolume2ProtocolGuid, &HandleFilePath, &DeviceHandle);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ImageIsFromFv = TRUE;
|
||||
} else {
|
||||
HandleFilePath = FilePath;
|
||||
Status = CoreLocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &HandleFilePath, &DeviceHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!BootPolicy) {
|
||||
HandleFilePath = FilePath;
|
||||
Status = CoreLocateDevicePath (&gEfiLoadFile2ProtocolGuid, &HandleFilePath, &DeviceHandle);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
HandleFilePath = FilePath;
|
||||
Status = CoreLocateDevicePath (&gEfiLoadFileProtocolGuid, &HandleFilePath, &DeviceHandle);
|
||||
}
|
||||
@ -1141,7 +1141,7 @@ CoreLoadImageCommon (
|
||||
if (Status == EFI_ALREADY_STARTED) {
|
||||
Image = NULL;
|
||||
goto Done;
|
||||
} else if (EFI_ERROR (Status)) {
|
||||
} else if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1156,7 +1156,7 @@ CoreLoadImageCommon (
|
||||
FHand.SourceSize,
|
||||
BootPolicy
|
||||
);
|
||||
if (!EFI_ERROR (SecurityStatus) && ImageIsFromFv) {
|
||||
if (!EFI_ERROR(SecurityStatus) && ImageIsFromFv) {
|
||||
//
|
||||
// When Security2 is installed, Security Architectural Protocol must be published.
|
||||
//
|
||||
@ -1186,7 +1186,7 @@ CoreLoadImageCommon (
|
||||
//
|
||||
// Check Security Status.
|
||||
//
|
||||
if (EFI_ERROR (SecurityStatus) && SecurityStatus != EFI_SECURITY_VIOLATION) {
|
||||
if (EFI_ERROR(SecurityStatus) && SecurityStatus != EFI_SECURITY_VIOLATION) {
|
||||
if (SecurityStatus == EFI_ACCESS_DENIED) {
|
||||
//
|
||||
// Image was not loaded because the platform policy prohibits the image from being loaded.
|
||||
@ -1213,7 +1213,7 @@ CoreLoadImageCommon (
|
||||
FilePath = OriginalFilePath;
|
||||
if (DeviceHandle != NULL) {
|
||||
Status = CoreHandleProtocol (DeviceHandle, &gEfiDevicePathProtocolGuid, (VOID **)&HandleFilePath);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
FilePathSize = GetDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);
|
||||
FilePath = (EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *)FilePath) + FilePathSize );
|
||||
}
|
||||
@ -1246,7 +1246,7 @@ CoreLoadImageCommon (
|
||||
&Image->Info,
|
||||
FALSE
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1254,7 +1254,7 @@ CoreLoadImageCommon (
|
||||
// Load the image. If EntryPoint is Null, it will not be set.
|
||||
//
|
||||
Status = CoreLoadPeImage (BootPolicy, &FHand, Image, DstBuffer, EntryPoint, Attribute);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if ((Status == EFI_BUFFER_TOO_SMALL) || (Status == EFI_OUT_OF_RESOURCES)) {
|
||||
if (NumberOfPages != NULL) {
|
||||
*NumberOfPages = Image->NumberOfPages;
|
||||
@ -1283,7 +1283,7 @@ CoreLoadImageCommon (
|
||||
&Image->Info,
|
||||
&Image->Info
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1304,7 +1304,7 @@ CoreLoadImageCommon (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
Image->LoadedImageDevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -1318,7 +1318,7 @@ CoreLoadImageCommon (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
(VOID *) (UINTN) Image->ImageContext.HiiResourceData
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
@ -1334,18 +1334,18 @@ Done:
|
||||
// If we allocated the Source buffer, free it
|
||||
//
|
||||
if (FHand.FreeBuffer) {
|
||||
CoreFreePool (FHand.Source);
|
||||
CoreFreePool(FHand.Source);
|
||||
}
|
||||
|
||||
//
|
||||
// There was an error. If there's an Image structure, free it
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Image != NULL) {
|
||||
CoreUnloadAndCloseImage (Image, (BOOLEAN)(DstBuffer == 0));
|
||||
Image = NULL;
|
||||
}
|
||||
} else if (EFI_ERROR (SecurityStatus)) {
|
||||
} else if (EFI_ERROR(SecurityStatus)) {
|
||||
Status = SecurityStatus;
|
||||
}
|
||||
|
||||
@ -1430,7 +1430,7 @@ CoreLoadImage (
|
||||
);
|
||||
|
||||
Handle = NULL;
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// ImageHandle will be valid only Status is success.
|
||||
//
|
||||
@ -1520,7 +1520,7 @@ CoreLoadImageEx (
|
||||
);
|
||||
|
||||
Handle = NULL;
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// ImageHandle will be valid only Status is success.
|
||||
//
|
||||
@ -1576,7 +1576,7 @@ CoreStartImage (
|
||||
if (Image == NULL || Image->Started) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (EFI_ERROR (Image->LoadImageStatus)) {
|
||||
if (EFI_ERROR(Image->LoadImageStatus)) {
|
||||
return Image->LoadImageStatus;
|
||||
}
|
||||
|
||||
@ -1643,7 +1643,7 @@ CoreStartImage (
|
||||
// all the resource in this situation.
|
||||
//
|
||||
DEBUG_CODE_BEGIN ();
|
||||
if (EFI_ERROR (Image->Status)) {
|
||||
if (EFI_ERROR(Image->Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "Error: Image at %11p start failed: %r\n", Image->Info.ImageBase, Image->Status));
|
||||
}
|
||||
DEBUG_CODE_END ();
|
||||
@ -1660,7 +1660,7 @@ CoreStartImage (
|
||||
ASSERT (Image->Tpl == gEfiCurrentTpl);
|
||||
CoreRestoreTpl (Image->Tpl);
|
||||
|
||||
CoreFreePool (Image->JumpBuffer);
|
||||
CoreFreePool(Image->JumpBuffer);
|
||||
|
||||
//
|
||||
// Pop the current start image context
|
||||
@ -1696,7 +1696,7 @@ CoreStartImage (
|
||||
//
|
||||
// Caller doesn't want the exit data, free it
|
||||
//
|
||||
CoreFreePool (Image->ExitData);
|
||||
CoreFreePool(Image->ExitData);
|
||||
Image->ExitData = NULL;
|
||||
}
|
||||
|
||||
@ -1709,7 +1709,7 @@ CoreStartImage (
|
||||
// If the image returned an error, or if the image is an application
|
||||
// unload it
|
||||
//
|
||||
if (EFI_ERROR (Image->Status) || Image->Type == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION) {
|
||||
if (EFI_ERROR(Image->Status) || Image->Type == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION) {
|
||||
CoreUnloadAndCloseImage (Image, TRUE);
|
||||
//
|
||||
// ImageHandle may be invalid after the image is unloaded, so use NULL handle to record perf log.
|
||||
@ -1874,7 +1874,7 @@ CoreUnloadImage (
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// if the Image was not started or Unloaded O.K. then clean up
|
||||
//
|
||||
|
@ -589,7 +589,7 @@ CoreAddMemoryDescriptor (
|
||||
gMemoryTypeInformation[Index].NumberOfPages,
|
||||
&mMemoryTypeStatistics[Type].BaseAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If an error occurs allocating the pages for the current memory type, then
|
||||
// free all the pages allocates for the previous memory types and return. This
|
||||
@ -1191,7 +1191,7 @@ CoreAllocatePages (
|
||||
Done:
|
||||
CoreReleaseMemoryLock ();
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
*Memory = Start;
|
||||
}
|
||||
|
||||
@ -1264,7 +1264,7 @@ CoreFreePages (
|
||||
|
||||
Status = CoreConvertPages (Memory, NumberOfPages, EfiConventionalMemory);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ CoreAllocatePool (
|
||||
// Acquire the memory lock and make the allocation
|
||||
//
|
||||
Status = CoreAcquireLockOrFail (&gMemoryLock);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ Done:
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CoreFreePool (
|
||||
CoreFreePool(
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ CoreInitializeDebugImageInfoTable (
|
||||
RealPages,
|
||||
&Memory
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
/* if (PcdGet64 (PcdMaxEfiSystemTablePointerAddress) != 0) {
|
||||
DEBUG ((EFI_D_INFO, "Allocate memory for EFI_SYSTEM_TABLE_POINTER below PcdMaxEfiSystemTablePointerAddress failed. \
|
||||
Retry to allocate memroy as close to the top of memory as feasible.\n"));
|
||||
@ -86,8 +86,8 @@ CoreInitializeDebugImageInfoTable (
|
||||
RealPages,
|
||||
&Memory
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -102,7 +102,7 @@ CoreInitializeDebugImageInfoTable (
|
||||
// Free first unaligned page(s).
|
||||
//
|
||||
Status = CoreFreePages (Memory, UnalignedPages);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
Memory = (EFI_PHYSICAL_ADDRESS)(UINTN)(AlignedMemory + EFI_PAGES_TO_SIZE (Pages));
|
||||
UnalignedPages = RealPages - Pages - UnalignedPages;
|
||||
@ -111,7 +111,7 @@ CoreInitializeDebugImageInfoTable (
|
||||
// Free last unaligned page(s).
|
||||
//
|
||||
Status = CoreFreePages (Memory, UnalignedPages);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
//
|
||||
@ -132,7 +132,7 @@ CoreInitializeDebugImageInfoTable (
|
||||
// Configuration Table
|
||||
//
|
||||
Status = CoreInstallConfigurationTable (&gEfiDebugImageInfoTableGuid, &mDebugInfoTableHeader);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ CoreNewDebugImageInfoEntry (
|
||||
//
|
||||
// Free the old table
|
||||
//
|
||||
CoreFreePool (Table);
|
||||
CoreFreePool(Table);
|
||||
//
|
||||
// Update the table header
|
||||
//
|
||||
@ -273,7 +273,7 @@ CoreRemoveDebugImageInfoEntry (
|
||||
// Found a match. Free up the record, then NULL the pointer to indicate the slot
|
||||
// is free.
|
||||
//
|
||||
CoreFreePool (Table[Index].NormalImage);
|
||||
CoreFreePool(Table[Index].NormalImage);
|
||||
Table[Index].NormalImage = NULL;
|
||||
//
|
||||
// Decrease the number of EFI_DEBUG_IMAGE_INFO elements and set the mDebugInfoTable in modified status.
|
||||
|
@ -142,7 +142,7 @@ CoreInstallConfigurationTable (
|
||||
// Free Old Table
|
||||
//
|
||||
// Print(L"Free Old Table\n");
|
||||
CoreFreePool (gDxeCoreST->ConfigurationTable);
|
||||
CoreFreePool(gDxeCoreST->ConfigurationTable);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -64,7 +64,7 @@ CoreSetWatchdogTimer (
|
||||
//
|
||||
// Check for errors
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ InitializeSectionExtraction (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&mCustomGuidedSectionExtractionProtocol
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -363,7 +363,7 @@ OpenSectionStreamEx (
|
||||
if (SectionStreamLength > 0) {
|
||||
NewStream->StreamBuffer = AllocatePool (SectionStreamLength);
|
||||
if (NewStream->StreamBuffer == NULL) {
|
||||
CoreFreePool (NewStream);
|
||||
CoreFreePool(NewStream);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
//
|
||||
@ -523,7 +523,7 @@ VerifyGuidedSectionGuid (
|
||||
// Found the recorded GuidedSectionGuid.
|
||||
//
|
||||
Status = CoreLocateProtocol (GuidedSectionGuid, NULL, (VOID **) &Interface);
|
||||
if (!EFI_ERROR (Status) && Interface != NULL) {
|
||||
if (!EFI_ERROR(Status) && Interface != NULL) {
|
||||
//
|
||||
// Found the supported Guided Section Extraction Porotocol for the Guided Section.
|
||||
//
|
||||
@ -576,7 +576,7 @@ NotifyGuidedExtraction (
|
||||
&NewStreamBufferSize,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Make sure we initialize the new stream with the correct
|
||||
@ -602,14 +602,14 @@ NotifyGuidedExtraction (
|
||||
AuthenticationStatus,
|
||||
&Context->ChildNode->EncapsulatedStreamHandle
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Close the event when done.
|
||||
//
|
||||
gBS->CloseEvent (Event);
|
||||
Context->ChildNode->Event = NULL;
|
||||
FreePool (Context);
|
||||
FreePool(Context);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -726,7 +726,7 @@ CreateChildNode (
|
||||
// Get the CompressionSectionHeader
|
||||
//
|
||||
if (Node->Size < sizeof (EFI_COMPRESSION_SECTION)) {
|
||||
CoreFreePool (Node);
|
||||
CoreFreePool(Node);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ CreateChildNode (
|
||||
NewStreamBufferSize = UncompressedLength;
|
||||
NewStreamBuffer = AllocatePool (NewStreamBufferSize);
|
||||
if (NewStreamBuffer == NULL) {
|
||||
CoreFreePool (Node);
|
||||
CoreFreePool(Node);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -769,7 +769,7 @@ CreateChildNode (
|
||||
// Decompress the stream
|
||||
//
|
||||
Status = CoreLocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID **)&Decompress);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
ASSERT (Decompress != NULL);
|
||||
|
||||
Status = Decompress->GetInfo (
|
||||
@ -779,10 +779,10 @@ CreateChildNode (
|
||||
(UINT32 *)&NewStreamBufferSize,
|
||||
&ScratchSize
|
||||
);
|
||||
if (EFI_ERROR (Status) || (NewStreamBufferSize != UncompressedLength)) {
|
||||
CoreFreePool (Node);
|
||||
CoreFreePool (NewStreamBuffer);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status) || (NewStreamBufferSize != UncompressedLength)) {
|
||||
CoreFreePool(Node);
|
||||
CoreFreePool(NewStreamBuffer);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = EFI_BAD_BUFFER_SIZE;
|
||||
}
|
||||
return Status;
|
||||
@ -790,8 +790,8 @@ CreateChildNode (
|
||||
|
||||
ScratchBuffer = AllocatePool (ScratchSize);
|
||||
if (ScratchBuffer == NULL) {
|
||||
CoreFreePool (Node);
|
||||
CoreFreePool (NewStreamBuffer);
|
||||
CoreFreePool(Node);
|
||||
CoreFreePool(NewStreamBuffer);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -804,10 +804,10 @@ CreateChildNode (
|
||||
ScratchBuffer,
|
||||
ScratchSize
|
||||
);
|
||||
CoreFreePool (ScratchBuffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
CoreFreePool (Node);
|
||||
CoreFreePool (NewStreamBuffer);
|
||||
CoreFreePool(ScratchBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreFreePool(Node);
|
||||
CoreFreePool(NewStreamBuffer);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -823,9 +823,9 @@ CreateChildNode (
|
||||
Stream->AuthenticationStatus,
|
||||
&Node->EncapsulatedStreamHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
CoreFreePool (Node);
|
||||
CoreFreePool (NewStreamBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreFreePool(Node);
|
||||
CoreFreePool(NewStreamBuffer);
|
||||
return Status;
|
||||
}
|
||||
break;
|
||||
@ -851,8 +851,8 @@ CreateChildNode (
|
||||
&NewStreamBufferSize,
|
||||
&AuthenticationStatus
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
CoreFreePool (*ChildNode);
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreFreePool(*ChildNode);
|
||||
return EFI_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
@ -880,9 +880,9 @@ CreateChildNode (
|
||||
AuthenticationStatus,
|
||||
&Node->EncapsulatedStreamHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
CoreFreePool (*ChildNode);
|
||||
CoreFreePool (NewStreamBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreFreePool(*ChildNode);
|
||||
CoreFreePool(NewStreamBuffer);
|
||||
return Status;
|
||||
}
|
||||
} else {
|
||||
@ -918,8 +918,8 @@ CreateChildNode (
|
||||
&Node->EncapsulatedStreamHandle
|
||||
);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
CoreFreePool (Node);
|
||||
if (EFI_ERROR(Status)) {
|
||||
CoreFreePool(Node);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -1005,9 +1005,9 @@ FindChildNode (
|
||||
// So, its size should be >= the size of commen section header.
|
||||
//
|
||||
Status = CreateChildNode (SourceStream, 0, &CurrentChildNode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (CurrentChildNode != NULL) {
|
||||
CoreFreePool (CurrentChildNode);
|
||||
CoreFreePool(CurrentChildNode);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
@ -1058,7 +1058,7 @@ FindChildNode (
|
||||
// to find the request child node in the rest stream.
|
||||
//
|
||||
if (*SectionInstance == 0) {
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
*FoundChild = RecursedChildNode;
|
||||
*FoundStream = RecursedFoundStream;
|
||||
return EFI_SUCCESS;
|
||||
@ -1098,14 +1098,14 @@ FindChildNode (
|
||||
// There's an unparsed child remaining in the stream, so create a new child node
|
||||
//
|
||||
Status = CreateChildNode (SourceStream, NextChildOffset, &CurrentChildNode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (CurrentChildNode != NULL) {
|
||||
CoreFreePool (CurrentChildNode);
|
||||
CoreFreePool(CurrentChildNode);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
} else {
|
||||
// ASSERT (EFI_ERROR (ErrorStatus));
|
||||
// ASSERT (EFI_ERROR(ErrorStatus));
|
||||
return ErrorStatus;
|
||||
}
|
||||
}
|
||||
@ -1242,7 +1242,7 @@ GetSection (
|
||||
// Locate target stream
|
||||
//
|
||||
Status = FindStreamNode (SectionStreamHandle, &StreamNode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto GetSection_Done;
|
||||
}
|
||||
@ -1270,7 +1270,7 @@ GetSection (
|
||||
&ChildStreamNode,
|
||||
&ExtractedAuthenticationStatus
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto GetSection_Done;
|
||||
}
|
||||
|
||||
@ -1353,7 +1353,7 @@ FreeChildNode (
|
||||
//
|
||||
// Last, free the child node itself
|
||||
//
|
||||
CoreFreePool (ChildNode);
|
||||
CoreFreePool(ChildNode);
|
||||
}
|
||||
|
||||
|
||||
@ -1386,7 +1386,7 @@ CloseSectionStream (
|
||||
// Locate target stream
|
||||
//
|
||||
Status = FindStreamNode (StreamHandleToClose, &StreamNode);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Found the stream, so close it
|
||||
//
|
||||
@ -1396,8 +1396,8 @@ CloseSectionStream (
|
||||
ChildNode = CHILD_SECTION_NODE_FROM_LINK (Link);
|
||||
FreeChildNode (ChildNode);
|
||||
}
|
||||
CoreFreePool (StreamNode->StreamBuffer);
|
||||
CoreFreePool (StreamNode);
|
||||
CoreFreePool(StreamNode->StreamBuffer);
|
||||
CoreFreePool(StreamNode);
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
@ -1524,7 +1524,7 @@ CustomGuidedSectionExtract (
|
||||
&SectionAttribute
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "GetInfo from guided section Failed - %r\n", Status));
|
||||
return Status;
|
||||
}
|
||||
@ -1545,7 +1545,7 @@ CustomGuidedSectionExtract (
|
||||
//
|
||||
AllocatedOutputBuffer = AllocatePool (OutputBufferSize);
|
||||
if (AllocatedOutputBuffer == NULL) {
|
||||
FreePool (ScratchBuffer);
|
||||
FreePool(ScratchBuffer);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
*OutputBuffer = AllocatedOutputBuffer;
|
||||
@ -1560,15 +1560,15 @@ CustomGuidedSectionExtract (
|
||||
ScratchBuffer,
|
||||
AuthenticationStatus
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Decode failed
|
||||
//
|
||||
if (AllocatedOutputBuffer != NULL) {
|
||||
CoreFreePool (AllocatedOutputBuffer);
|
||||
CoreFreePool(AllocatedOutputBuffer);
|
||||
}
|
||||
if (ScratchBuffer != NULL) {
|
||||
CoreFreePool (ScratchBuffer);
|
||||
CoreFreePool(ScratchBuffer);
|
||||
}
|
||||
DEBUG ((DEBUG_ERROR, "Extract guided section Failed - %r\n", Status));
|
||||
return Status;
|
||||
@ -1592,7 +1592,7 @@ CustomGuidedSectionExtract (
|
||||
// Free unused scratch buffer.
|
||||
//
|
||||
if (ScratchBuffer != NULL) {
|
||||
CoreFreePool (ScratchBuffer);
|
||||
CoreFreePool(ScratchBuffer);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@ -110,7 +110,7 @@ EfiLoader (
|
||||
&ScratchSize
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to get decompress information for BFV!\n");
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ EfiLoader (
|
||||
);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to decompress BFV!\n");
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ EfiLoader (
|
||||
&DestinationSize,
|
||||
&ScratchSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to get decompress information for DxeIpl!\n");
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ EfiLoader (
|
||||
(VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS,
|
||||
(VOID *)(UINTN)((EFI_DECOMPRESSED_BUFFER_ADDRESS + DestinationSize + 0x1000) & 0xfffff000)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to decompress DxeIpl image\n");
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ EfiLoader (
|
||||
&NumberOfMemoryMapEntries,
|
||||
EfiMemoryDescriptor
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to load and relocate DxeIpl PE image!\n");
|
||||
}
|
||||
/* PrintString (
|
||||
@ -216,7 +216,7 @@ EfiLoader (
|
||||
&DestinationSize,
|
||||
&ScratchSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to get decompress information for DxeMain FV image!\n");
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ EfiLoader (
|
||||
(VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS,
|
||||
(VOID *)(UINTN)((EFI_DECOMPRESSED_BUFFER_ADDRESS + DestinationSize + 0x1000) & 0xfffff000)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to decompress DxeMain FV image!\n");
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ EfiLoader (
|
||||
&NumberOfMemoryMapEntries,
|
||||
EfiMemoryDescriptor
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SystemHang ("Failed to load/relocate DxeMain!\n");
|
||||
}
|
||||
/* PrintString (
|
||||
|
@ -212,7 +212,7 @@ EfiLdrPeCoffLoadPeImage (
|
||||
sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY),
|
||||
&TempDebugEntry
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if (TempDebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {
|
||||
CodeViewSize = TempDebugEntry.SizeOfData;
|
||||
CodeViewFileOffset = TempDebugEntry.FileOffset;
|
||||
|
@ -128,7 +128,7 @@ Returns:
|
||||
&gPciBusComponentName,
|
||||
&gPciBusComponentName2
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
InitializePciDevicePool ();
|
||||
|
||||
@ -190,7 +190,7 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ Returns:
|
||||
//
|
||||
Status = PciEnumerator (Controller);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ Returns:
|
||||
//
|
||||
Status = DeRegisterPciDevice (Controller, ChildHandleBuffer[Index]);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ Returns:
|
||||
{
|
||||
DestroyPciDeviceTree (RootBridge);
|
||||
|
||||
gBS->FreePool (RootBridge);
|
||||
gBS->FreePool(RootBridge);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -192,7 +192,7 @@ Returns:
|
||||
if (IS_PCI_BRIDGE (&(Temp->Pci))) {
|
||||
DestroyPciDeviceTree (Temp);
|
||||
}
|
||||
gBS->FreePool (Temp);
|
||||
gBS->FreePool(Temp);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@ -303,7 +303,7 @@ Returns:
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("PciIo protocol not installed Status=%r\n", Status);
|
||||
return Status;
|
||||
} else {
|
||||
@ -315,7 +315,7 @@ Returns:
|
||||
PciIoDevice->Handle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -334,7 +334,7 @@ Returns:
|
||||
&PciExpressCapRegOffset,
|
||||
NULL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
PciIoDevice->IsPciExp = TRUE;
|
||||
// DEBUG ((EFI_D_ERROR, "PciExp - %x (B-%x, D-%x, F-%x)\n", PciIoDevice->IsPciExp, PciIoDevice->BusNumber, PciIoDevice->DeviceNumber, PciIoDevice->FunctionNumber));
|
||||
DBG("PciExp - %x (B-%x, D-%x, F-%x)\n", PciIoDevice->IsPciExp, PciIoDevice->BusNumber, PciIoDevice->DeviceNumber, PciIoDevice->FunctionNumber);
|
||||
@ -388,7 +388,7 @@ Returns:
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (PciIo);
|
||||
|
||||
//
|
||||
@ -410,7 +410,7 @@ Returns:
|
||||
Node = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
Status = DeRegisterPciDevice (Controller, Node->Handle);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ Returns:
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiPciRootBridgeIoProtocolGuid,
|
||||
@ -775,7 +775,7 @@ Returns:
|
||||
(VOID **) &Dev
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ Returns:
|
||||
PCI_DRIVER_OVERRIDE_LIST *Node;
|
||||
|
||||
Status = gBS->HandleProtocol (DriverImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &LoadedImage);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ Returns:
|
||||
// Get information about the image
|
||||
//
|
||||
Status = PeCoffLoaderGetImageInfo (&ImageContext);
|
||||
/* if (EFI_ERROR (Status)) {
|
||||
/* if (EFI_ERROR(Status)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ Returns:
|
||||
Pci
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status) && (Pci->Hdr).VendorId != 0xffff) {
|
||||
if (!EFI_ERROR(Status) && (Pci->Hdr).VendorId != 0xffff) {
|
||||
|
||||
//
|
||||
// Read the entire config header for the device
|
||||
@ -226,14 +226,14 @@ Returns:
|
||||
(UINT8) Func
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) && Func == 0) {
|
||||
if (EFI_ERROR(Status) && Func == 0) {
|
||||
//
|
||||
// go to next device if there is no Function 0
|
||||
//
|
||||
break;
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
//
|
||||
// Collect all the information about the PCI device discovered
|
||||
@ -252,7 +252,7 @@ Returns:
|
||||
//
|
||||
//
|
||||
|
||||
if (!EFI_ERROR (Status) && (IS_PCI_BRIDGE (&Pci) || IS_CARDBUS_BRIDGE (&Pci))) {
|
||||
if (!EFI_ERROR(Status) && (IS_PCI_BRIDGE (&Pci) || IS_CARDBUS_BRIDGE (&Pci))) {
|
||||
|
||||
//
|
||||
// If it is PPB, we need to get the secondary bus to continue the enumeration
|
||||
@ -261,7 +261,7 @@ Returns:
|
||||
|
||||
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x19, 1, &SecBus);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -556,7 +556,7 @@ Returns:
|
||||
//
|
||||
// test if it supports 64 memory or not
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
Status = BarExisted (
|
||||
PciIoDevice,
|
||||
@ -565,7 +565,7 @@ Returns:
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
PciIoDevice->Decodes |= EFI_BRIDGE_PMEM32_DECODE_SUPPORTED;
|
||||
PciIoDevice->Decodes |= EFI_BRIDGE_PMEM64_DECODE_SUPPORTED;
|
||||
} else {
|
||||
@ -899,7 +899,7 @@ Returns:
|
||||
&OriginalValue
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
PciIoDevice->PciBar[BarIndex].BaseAddress = 0;
|
||||
PciIoDevice->PciBar[BarIndex].Length = 0;
|
||||
PciIoDevice->PciBar[BarIndex].Alignment = 0;
|
||||
@ -1001,7 +1001,7 @@ Returns:
|
||||
&OriginalValue
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Offset + 4;
|
||||
}
|
||||
|
||||
@ -1166,7 +1166,7 @@ Returns:
|
||||
(VOID **) &PciIoDevice
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1201,8 +1201,8 @@ Returns:
|
||||
InitializePciIoInstance (PciIoDevice);
|
||||
Status = InitializePciDriverOverrideInstance (PciIoDevice);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (PciIoDevice);
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->FreePool(PciIoDevice);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1274,7 +1274,7 @@ Returns:
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
|
||||
if (EFI_ERROR(Status) && Status != EFI_ALREADY_STARTED) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1289,7 +1289,7 @@ Returns:
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
|
||||
if (EFI_ERROR(Status) && Status != EFI_ALREADY_STARTED) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1300,7 +1300,7 @@ Returns:
|
||||
|
||||
Status = PciRootBridgeIo->Configuration (PciRootBridgeIo, (VOID **) &Descriptors);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1326,7 +1326,7 @@ Returns:
|
||||
(UINT8) MinBus
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
//
|
||||
// If successfully, insert the node into device pool
|
||||
|
@ -480,7 +480,7 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeMem, Width, 1, &Offset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeIo, Width, 1, &Offset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -591,7 +591,7 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeMem, Width, Count, &Offset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -644,7 +644,7 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeMem, Width, Count, &Offset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -697,7 +697,7 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeIo, Width, Count, &Offset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeIo, Width, Count, &Offset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -796,7 +796,7 @@ Returns:
|
||||
|
||||
Address = Offset;
|
||||
Status = PciIoVerifyConfigAccess (PciIoDevice, Width, Count, &Address);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -842,7 +842,7 @@ Returns:
|
||||
|
||||
Address = Offset;
|
||||
Status = PciIoVerifyConfigAccess (PciIoDevice, Width, Count, &Address);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -903,12 +903,12 @@ Returns:
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, DestBarIndex, PciBarTypeMem, Width, Count, &DestOffset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = PciIoVerifyBarAccess (PciIoDevice, SrcBarIndex, PciBarTypeMem, Width, Count, &SrcOffset);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -1373,7 +1373,7 @@ Returns:
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// The PCI Root Bridge could not modify the attributes, so return the error.
|
||||
//
|
||||
@ -1788,7 +1788,7 @@ Returns:
|
||||
(UINT32) *Length,
|
||||
&NonRelativeOffset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ Returns:
|
||||
1,
|
||||
&AllOnes
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ Returns:
|
||||
1,
|
||||
&AllOnes
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ Returns:
|
||||
|
||||
RomPcir = AllocatePool (sizeof (PCI_DATA_STRUCTURE));
|
||||
if (RomPcir == NULL) {
|
||||
FreePool (RomHeader);
|
||||
FreePool(RomHeader);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -282,8 +282,8 @@ Returns:
|
||||
Image = AllocatePool ((UINT32) RomImageSize);
|
||||
if (Image == NULL) {
|
||||
RomDecode (PciDevice, RomBarIndex, RomBar, FALSE);
|
||||
gBS->FreePool (RomHeader);
|
||||
gBS->FreePool (RomPcir);
|
||||
gBS->FreePool(RomHeader);
|
||||
gBS->FreePool(RomPcir);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -308,8 +308,8 @@ Returns:
|
||||
//
|
||||
// Free allocated memory
|
||||
//
|
||||
gBS->FreePool (RomHeader);
|
||||
gBS->FreePool (RomPcir);
|
||||
gBS->FreePool(RomHeader);
|
||||
gBS->FreePool(RomPcir);
|
||||
|
||||
return retStatus;
|
||||
}
|
||||
@ -492,7 +492,7 @@ Returns:
|
||||
|
||||
if (EfiRomHeader->CompressionType == EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED) {
|
||||
Status = gBS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID **) &Decompress);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SkipImage = TRUE;
|
||||
} else {
|
||||
SkipImage = TRUE;
|
||||
@ -503,7 +503,7 @@ Returns:
|
||||
&DestinationSize,
|
||||
&ScratchSize
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//DecompressedImageBuffer = NULL;
|
||||
DecompressedImageBuffer = AllocatePool (DestinationSize);
|
||||
if (DecompressedImageBuffer != NULL) {
|
||||
@ -518,13 +518,13 @@ Returns:
|
||||
Scratch,
|
||||
ScratchSize
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ImageBuffer = DecompressedImageBuffer;
|
||||
ImageLength = DestinationSize;
|
||||
SkipImage = FALSE;
|
||||
}
|
||||
|
||||
gBS->FreePool (Scratch);
|
||||
gBS->FreePool(Scratch);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -543,9 +543,9 @@ Returns:
|
||||
ImageLength,
|
||||
&ImageHandle
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->StartImage (ImageHandle, NULL, NULL);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
AddDriver (PciDevice, ImageHandle);
|
||||
retStatus = EFI_SUCCESS;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ Returns:
|
||||
NULL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ Returns:
|
||||
1,
|
||||
&PowerManagementCSR
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Clear PME_Status bit
|
||||
//
|
||||
|
@ -64,7 +64,7 @@ PciRomAddImageMapping (
|
||||
CopyMem (TempMapping, mRomImageTable, mNumberOfPciRomImages * sizeof (EFI_PCI_ROM_IMAGE_MAPPING));
|
||||
|
||||
if (mRomImageTable != NULL) {
|
||||
gBS->FreePool (mRomImageTable);
|
||||
gBS->FreePool(mRomImageTable);
|
||||
}
|
||||
|
||||
mRomImageTable = TempMapping;
|
||||
@ -204,7 +204,7 @@ Returns:
|
||||
|
||||
if (EfiRomHeader->CompressionType == EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED) {
|
||||
Status = gBS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID **) &Decompress);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
SkipImage = TRUE;
|
||||
} else {
|
||||
SkipImage = TRUE;
|
||||
@ -215,7 +215,7 @@ Returns:
|
||||
&DestinationSize,
|
||||
&ScratchSize
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
// DecompressedImageBuffer = NULL;
|
||||
DecompressedImageBuffer = AllocatePool (DestinationSize);
|
||||
if (DecompressedImageBuffer != NULL) {
|
||||
@ -230,13 +230,13 @@ Returns:
|
||||
Scratch,
|
||||
ScratchSize
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ImageBuffer = DecompressedImageBuffer;
|
||||
ImageLength = DestinationSize;
|
||||
SkipImage = FALSE;
|
||||
}
|
||||
|
||||
gBS->FreePool (Scratch);
|
||||
gBS->FreePool(Scratch);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -260,9 +260,9 @@ Returns:
|
||||
ImageLength,
|
||||
&ImageHandle
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->StartImage (ImageHandle, NULL, NULL);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
PciRomAddImageMapping (
|
||||
ImageHandle,
|
||||
PciOptionRomDescriptor->Seg,
|
||||
@ -274,12 +274,12 @@ Returns:
|
||||
}
|
||||
}
|
||||
if (FilePath != NULL) {
|
||||
gBS->FreePool (FilePath);
|
||||
gBS->FreePool(FilePath);
|
||||
}
|
||||
}
|
||||
|
||||
if (DecompressedImageBuffer != NULL) {
|
||||
gBS->FreePool (DecompressedImageBuffer);
|
||||
gBS->FreePool(DecompressedImageBuffer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -316,7 +316,7 @@ Returns:
|
||||
UINT16 MaxBus;
|
||||
|
||||
Status = EfiGetSystemConfigurationTable (&gEfiPciOptionRomTableGuid, (VOID **) &PciOptionRomTable);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ Returns:
|
||||
if (!PciOptionRomDescriptor->DontLoadEfiRom) {
|
||||
if (PciOptionRomDescriptor->Seg == PciRootBridgeIo->SegmentNumber) {
|
||||
Status = PciRootBridgeIo->Configuration (PciRootBridgeIo, (VOID **) &Descriptors);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ Returns:
|
||||
UINTN Index;
|
||||
|
||||
Status = EfiGetSystemConfigurationTable (&gEfiPciOptionRomTableGuid, (VOID **) &PciOptionRomTable);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
@ -76,10 +76,10 @@ InstallProcessorSmbios (
|
||||
|
||||
Token = HiiSetString (gStringHandle, 0, UString, NULL);
|
||||
if (Token == 0) {
|
||||
gBS->FreePool (UString);
|
||||
gBS->FreePool(UString);
|
||||
return ;
|
||||
}
|
||||
gBS->FreePool (UString);
|
||||
gBS->FreePool(UString);
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -144,10 +144,10 @@ InstallMiscSmbios (
|
||||
|
||||
Token = HiiSetString (gStringHandle, 0, UString, NULL);
|
||||
if (Token == 0) {
|
||||
gBS->FreePool (UString);
|
||||
gBS->FreePool(UString);
|
||||
return ;
|
||||
}
|
||||
gBS->FreePool (UString);
|
||||
gBS->FreePool(UString);
|
||||
|
||||
//
|
||||
// Log Smios Type 0
|
||||
@ -174,10 +174,10 @@ InstallMiscSmbios (
|
||||
|
||||
Token = HiiSetString (gStringHandle, 0, UString, NULL);
|
||||
if (Token == 0) {
|
||||
gBS->FreePool (UString);
|
||||
gBS->FreePool(UString);
|
||||
return ;
|
||||
}
|
||||
gBS->FreePool (UString);
|
||||
gBS->FreePool(UString);
|
||||
|
||||
//
|
||||
// Log Smbios Type 1
|
||||
@ -207,7 +207,7 @@ SmbiosGenEntrypoint (
|
||||
NULL,
|
||||
(VOID**)&gSmbios
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -326,5 +326,5 @@ LogSmbiosData (
|
||||
&SmbiosHandle,
|
||||
(EFI_SMBIOS_TABLE_HEADER*)Buffer
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ PcRtcInit (
|
||||
// Wait for up to 0.1 seconds for the RTC to be updated
|
||||
//
|
||||
Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Set the variable with default value if the RTC is functioning incorrectly.
|
||||
//
|
||||
@ -196,7 +196,7 @@ PcRtcInit (
|
||||
&DataSize,
|
||||
(VOID *) &TimerVar
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Time.TimeZone = (INT16) TimerVar;
|
||||
Time.Daylight = (UINT8) (TimerVar >> 16);
|
||||
} else {
|
||||
@ -208,10 +208,10 @@ PcRtcInit (
|
||||
// Validate time fields
|
||||
//
|
||||
Status = ConvertRtcTimeToEfiTime (&Time, RegisterB);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = RtcTimeFieldsValid (&Time);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Time.Second = RTC_INIT_SECOND;
|
||||
Time.Minute = RTC_INIT_MINUTE;
|
||||
Time.Hour = RTC_INIT_HOUR;
|
||||
@ -227,7 +227,7 @@ PcRtcInit (
|
||||
// Reset time value according to new RTC configuration
|
||||
//
|
||||
Status = PcRtcSetTime (&Time, Global);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ PcRtcInit (
|
||||
// so we can use them to get and set wakeup time.
|
||||
//
|
||||
Status = PcRtcGetWakeupTime (&Enabled, &Pending, &Time, Global);
|
||||
if ((Enabled) || (!EFI_ERROR (Status))) {
|
||||
if ((Enabled) || (!EFI_ERROR(Status))) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ PcRtcInit (
|
||||
// Wait for up to 0.1 seconds for the RTC to be updated
|
||||
//
|
||||
Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -284,7 +284,7 @@ PcRtcInit (
|
||||
sizeof (Time),
|
||||
&Time
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -360,7 +360,7 @@ PcRtcGetTime (
|
||||
// Wait for up to 0.1 seconds for the RTC to be updated
|
||||
//
|
||||
Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -398,10 +398,10 @@ PcRtcGetTime (
|
||||
// Make sure all field values are in correct range
|
||||
//
|
||||
Status = ConvertRtcTimeToEfiTime (Time, RegisterB);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = RtcTimeFieldsValid (Time);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -452,7 +452,7 @@ PcRtcSetTime (
|
||||
// Make sure that the time fields are valid
|
||||
//
|
||||
Status = RtcTimeFieldsValid (Time);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -468,7 +468,7 @@ PcRtcSetTime (
|
||||
// Wait for up to 0.1 seconds for the RTC to be updated
|
||||
//
|
||||
Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -487,7 +487,7 @@ PcRtcSetTime (
|
||||
sizeof (TimerVar),
|
||||
&TimerVar
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -578,7 +578,7 @@ PcRtcGetWakeupTime (
|
||||
// Wait for up to 0.1 seconds for the RTC to be updated
|
||||
//
|
||||
Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -616,7 +616,7 @@ PcRtcGetWakeupTime (
|
||||
&DataSize,
|
||||
&RtcTime
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// The alarm variable exists. In this case, we read variable to get info.
|
||||
//
|
||||
@ -636,10 +636,10 @@ PcRtcGetWakeupTime (
|
||||
// Make sure all field values are in correct range
|
||||
//
|
||||
Status = ConvertRtcTimeToEfiTime (Time, RegisterB);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = RtcTimeFieldsValid (Time);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -684,7 +684,7 @@ PcRtcSetWakeupTime (
|
||||
// Make sure that the time fields are valid
|
||||
//
|
||||
Status = RtcTimeFieldsValid (Time);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
//
|
||||
@ -692,7 +692,7 @@ PcRtcSetWakeupTime (
|
||||
//
|
||||
PcRtcGetTime (&RtcTime, &Capabilities, Global);
|
||||
Status = RtcTimeFieldsValid (&RtcTime);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
if (!IsWithinOneDay (&RtcTime, Time)) {
|
||||
@ -714,7 +714,7 @@ PcRtcSetWakeupTime (
|
||||
// Wait for up to 0.1 seconds for the RTC to be updated
|
||||
//
|
||||
Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
@ -751,7 +751,7 @@ PcRtcSetWakeupTime (
|
||||
sizeof (RtcTime),
|
||||
&RtcTime
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (!EfiAtRuntime ()) {
|
||||
EfiReleaseLock (&Global->RtcLock);
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ InitializePcRtc (
|
||||
EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_CALLBACK);
|
||||
|
||||
Status = PcRtcInit (&mModuleGlobal);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
gRT->GetTime = PcRtcEfiGetTime;
|
||||
gRT->SetTime = PcRtcEfiSetTime;
|
||||
@ -150,7 +150,7 @@ InitializePcRtc (
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ Returns:
|
||||
&Private->DeviceIo,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -767,7 +767,7 @@ Returns:
|
||||
Pages,
|
||||
&HostAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -475,7 +475,7 @@ CheckForRom (
|
||||
&RomBuffer
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
//
|
||||
// Copy the contents of the Option ROM to the memory buffer
|
||||
@ -617,7 +617,7 @@ ScanPciRootBridgeForRoms(
|
||||
}
|
||||
|
||||
Status = IoDev->Configuration(IoDev, (VOID **)&Descriptors);
|
||||
if (EFI_ERROR (Status) || Descriptors == NULL) {
|
||||
if (EFI_ERROR(Status) || Descriptors == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -690,7 +690,7 @@ ScanPciRootBridgeForRoms(
|
||||
(VOID **)&Context.CommandRegisterBuffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ CheckForRom (
|
||||
&RomBuffer
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
//
|
||||
// Copy the contents of the Option ROM to the memory buffer
|
||||
@ -618,7 +618,7 @@ ScanPciRootBridgeForRoms(
|
||||
}
|
||||
|
||||
Status = IoDev->Configuration(IoDev, (VOID **)&Descriptors);
|
||||
if (EFI_ERROR (Status) || Descriptors == NULL) {
|
||||
if (EFI_ERROR(Status) || Descriptors == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -691,7 +691,7 @@ ScanPciRootBridgeForRoms(
|
||||
(VOID **)&Context.CommandRegisterBuffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ Returns:
|
||||
// Initialize gCpuIo now since the chipset init code requires it.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiCpuIo2ProtocolGuid, NULL, (VOID **)&gCpuIo);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Initialize variables required to search all PCI segments for PCI devices
|
||||
@ -91,7 +91,7 @@ Returns:
|
||||
sizeof (PCAT_PCI_ROOT_BRIDGE_INSTANCE),
|
||||
(VOID **)&PrivateData
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ Returns:
|
||||
&PrivateData->PhysicalIoBase,
|
||||
&PrivateData->PhysicalMemoryBase
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ Returns:
|
||||
// Build the EFI Device Path Protocol instance for this PCI Root Bridge
|
||||
//
|
||||
Status = PcatRootBridgeDevicePathConstructor (&PrivateData->DevicePath, PciRootBridgeIndex, (BOOLEAN)((PrivateData->PciExpressBaseAddress != 0) ? TRUE : FALSE));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ Returns:
|
||||
// Build the PCI Root Bridge I/O Protocol instance for this PCI Root Bridge
|
||||
//
|
||||
Status = PcatRootBridgeIoConstructor (&PrivateData->Io, PciSegmentIndex);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ Returns:
|
||||
sizeof (VendorId) / sizeof (UINT16),
|
||||
&VendorId
|
||||
);
|
||||
if ((EFI_ERROR (Status)) || ((VendorId == 0xffff) && (Function == 0))) {
|
||||
if ((EFI_ERROR(Status)) || ((VendorId == 0xffff) && (Function == 0))) {
|
||||
//
|
||||
// If the PCI Configuration Read fails, or a PCI device does not exist, then
|
||||
// skip this entire PCI device
|
||||
@ -220,7 +220,7 @@ Returns:
|
||||
sizeof (PciConfigurationHeader) / sizeof (UINT16),
|
||||
&PciConfigurationHeader
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If the entire PCI Configuration Header can not be read, then skip this entire PCI device
|
||||
//
|
||||
@ -510,7 +510,7 @@ Returns:
|
||||
// Build ACPI descriptors for the resources on the PCI Root Bridge
|
||||
//
|
||||
Status = ConstructConfiguration(PrivateData);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Create the handle for this PCI Root Bridge
|
||||
@ -523,7 +523,7 @@ Returns:
|
||||
&PrivateData->Io,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Contruct DeviceIoProtocol
|
||||
@ -535,7 +535,7 @@ Returns:
|
||||
(UINT16)PrivateData->PrimaryBus,
|
||||
(UINT16)PrivateData->SubordinateBus
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
#if 0 //patch by nms42
|
||||
//
|
||||
// Scan this PCI Root Bridge for PCI Option ROMs and add them to the PCI Option ROM Table
|
||||
@ -584,7 +584,7 @@ Done:
|
||||
if (PrivateData->DevicePath) {
|
||||
gBS->FreePool(PrivateData->DevicePath);
|
||||
}
|
||||
gBS->FreePool (PrivateData);
|
||||
gBS->FreePool(PrivateData);
|
||||
}
|
||||
|
||||
//
|
||||
@ -652,7 +652,7 @@ Returns:
|
||||
sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR),
|
||||
(VOID **)&PrivateData->Configuration
|
||||
);
|
||||
if (EFI_ERROR (Status )) {
|
||||
if (EFI_ERROR(Status )) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -681,7 +681,7 @@ Returns:
|
||||
sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) * NumConfig + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR),
|
||||
(VOID **)&PrivateData->Configuration
|
||||
);
|
||||
if (EFI_ERROR (Status )) {
|
||||
if (EFI_ERROR(Status )) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -906,7 +906,7 @@ Returns:
|
||||
&Value
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status )) {
|
||||
if (!EFI_ERROR(Status )) {
|
||||
if ( Value & 0x01 ) {
|
||||
if (Command & 0x0001) {
|
||||
//
|
||||
|
@ -514,7 +514,7 @@ PcatRootBridgeIoCopyMem (
|
||||
1,
|
||||
&Result
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
Status = PcatRootBridgeIoMemWrite (
|
||||
@ -524,7 +524,7 @@ PcatRootBridgeIoCopyMem (
|
||||
1,
|
||||
&Result
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
if (Direction) {
|
||||
@ -639,7 +639,7 @@ PcatRootBridgeIoMap (
|
||||
sizeof(MAP_INFO),
|
||||
(VOID **)&MapInfo
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
*NumberOfBytes = 0;
|
||||
return Status;
|
||||
}
|
||||
@ -668,7 +668,7 @@ PcatRootBridgeIoMap (
|
||||
&MapInfo->MappedHostAddress
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->FreePool (MapInfo);
|
||||
gBS->FreePool(MapInfo);
|
||||
*NumberOfBytes = 0;
|
||||
return Status;
|
||||
}
|
||||
@ -694,7 +694,7 @@ PcatRootBridgeIoMap (
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->FreePages (MapInfo->MappedHostAddress,MapInfo->NumberOfPages);
|
||||
gBS->FreePool (MapInfo);
|
||||
gBS->FreePool(MapInfo);
|
||||
*NumberOfBytes = 0;
|
||||
return Status;
|
||||
}
|
||||
@ -780,7 +780,7 @@ PcatRootBridgeIoUnmap (
|
||||
// Free the mapped buffer and the MAP_INFO structure.
|
||||
//
|
||||
gBS->FreePages (MapInfo->MappedHostAddress, MapInfo->NumberOfPages);
|
||||
gBS->FreePool (Mapping);
|
||||
gBS->FreePool(Mapping);
|
||||
}
|
||||
|
||||
//
|
||||
@ -832,7 +832,7 @@ PcatRootBridgeIoAllocateBuffer (
|
||||
PhysicalAddress = (EFI_PHYSICAL_ADDRESS)(0xffffffff);
|
||||
|
||||
Status = gBS->AllocatePages (AllocateMaxAddress, MemoryType, Pages, &PhysicalAddress);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -475,7 +475,7 @@ CheckForRom (
|
||||
&RomBuffer
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
//
|
||||
// Copy the contents of the Option ROM to the memory buffer
|
||||
@ -617,7 +617,7 @@ ScanPciRootBridgeForRoms(
|
||||
}
|
||||
|
||||
Status = IoDev->Configuration(IoDev, (VOID **) &Descriptors);
|
||||
if (EFI_ERROR (Status) || Descriptors == NULL) {
|
||||
if (EFI_ERROR(Status) || Descriptors == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -690,7 +690,7 @@ ScanPciRootBridgeForRoms(
|
||||
(VOID **) &Context.CommandRegisterBuffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -846,7 +846,7 @@ SetGcdMemorySpaceAttributes (
|
||||
&StartIndex,
|
||||
&EndIndex
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -944,7 +944,7 @@ RefreshGcdMemoryAttributes (
|
||||
&NumberOfDescriptors,
|
||||
&MemorySpaceMap
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
DefaultMemoryType = (UINT8) MtrrGetDefaultMemoryType ();
|
||||
DefaultAttributes = GetMemorySpaceAttributeFromMtrrType (DefaultMemoryType);
|
||||
@ -1069,7 +1069,7 @@ RefreshGcdMemoryAttributes (
|
||||
// Free memory space map allocated by GCD service GetMemorySpaceMap ()
|
||||
//
|
||||
if (MemorySpaceMap != NULL) {
|
||||
FreePool (MemorySpaceMap);
|
||||
FreePool(MemorySpaceMap);
|
||||
}
|
||||
|
||||
mIsFlushingGCD = FALSE;
|
||||
@ -1213,14 +1213,14 @@ InitInterruptDescriptorTable (
|
||||
IdtPtr->Limit = (UINT16) (sizeof (gIdtTable) - 1);
|
||||
AsmWriteIdtr (IdtPtr);
|
||||
|
||||
FreePool (IdtPtrAlignmentBuffer);
|
||||
FreePool(IdtPtrAlignmentBuffer);
|
||||
|
||||
//
|
||||
// Initialize Exception Handlers
|
||||
//
|
||||
for (Index = OldIdtSize; Index < 32; Index++) {
|
||||
Status = CpuRegisterInterruptHandler (&gCpu, Index, CommonExceptionHandler);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
//
|
||||
@ -1301,8 +1301,8 @@ InitializeCpu (
|
||||
&gEfiCpuArchProtocolGuid, &gCpu,
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1322,7 +1322,7 @@ InitializeCpu (
|
||||
&gIdleLoopEventGuid,
|
||||
&IdleLoopEvent
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ CpuMemoryServiceRead (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (TRUE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -323,7 +323,7 @@ CpuMemoryServiceWrite (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (TRUE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ CpuIoServiceRead (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (FALSE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -485,7 +485,7 @@ CpuIoServiceWrite (
|
||||
// Make sure the parameters are valid
|
||||
//
|
||||
Status = CpuIoCheckParameter (FALSE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ CpuIo2Initialize (
|
||||
&gEfiCpuIo2ProtocolGuid, &mCpuIo2,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ CpuMemoryServiceRead (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (TRUE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ CpuMemoryServiceWrite (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (TRUE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ CpuIoServiceRead (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (FALSE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ CpuIoServiceWrite (
|
||||
// Make sure the parameters are valid
|
||||
//
|
||||
Status = CpuIoCheckParameter (FALSE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ SmmCpuIo2Initialize (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&mSmmCpuIo2
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ CpuMemoryServiceRead (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (TRUE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ CpuMemoryServiceWrite (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (TRUE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ CpuIoServiceRead (
|
||||
UINT8 *Uint8Buffer;
|
||||
|
||||
Status = CpuIoCheckParameter (FALSE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -437,7 +437,7 @@ CpuIoServiceWrite (
|
||||
// Make sure the parameters are valid
|
||||
//
|
||||
Status = CpuIoCheckParameter (FALSE, Width, Address, Count, Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -857,7 +857,7 @@ CpuIoInitialize (
|
||||
// DEBUG ((EFI_D_INFO, "CpuIO PPI has been loaded into memory. Reinstalled PPI=0x%x\n", &gCpuIoPpi));
|
||||
} else {
|
||||
Status = PeiServicesInstallPpi (&gPpiList);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@ -83,8 +83,8 @@ InitializeCpuInterruptHandlers (
|
||||
SetMem ((VOID *) mReservedVectors, sizeof (RESERVED_VECTORS_DATA) * CPU_INTERRUPT_NUM, 0xff);
|
||||
if (VectorInfo != NULL) {
|
||||
Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_INTERRUPT_NUM);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (mReservedVectors);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(mReservedVectors);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ InitializeCpuExceptionHandlersWorker (
|
||||
SetMem ((VOID *) mReservedVectors, sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM, 0xff);
|
||||
if (VectorInfo != NULL) {
|
||||
Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_EXCEPTION_NUM);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ InitializeCpuExceptionHandlers (
|
||||
if (VectorInfo != NULL) {
|
||||
SetMem ((VOID *) ReservedVectorData, sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM, 0xff);
|
||||
Status = ReadAndVerifyVectorInfo (VectorInfo, ReservedVectorData, CPU_EXCEPTION_NUM);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@ -180,4 +180,4 @@ RegisterCpuInterruptHandler (
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ WriteToOsS3PerformanceData (
|
||||
NULL,
|
||||
(VOID **) &VariableServices
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
VarSize = sizeof (EFI_PHYSICAL_ADDRESS);
|
||||
Status = VariableServices->GetVariable (
|
||||
@ -295,7 +295,7 @@ WriteToOsS3PerformanceData (
|
||||
&VarSize,
|
||||
&mAcpiLowMemoryBase
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "Fail to retrieve variable to log S3 performance data \n"));
|
||||
return;
|
||||
}
|
||||
@ -394,7 +394,7 @@ S3ResumeBootOs (
|
||||
// Install BootScriptDonePpi
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&mPpiListPostScriptTable);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Get ACPI Table Address
|
||||
@ -417,7 +417,7 @@ S3ResumeBootOs (
|
||||
// Install EndOfPeiPpi
|
||||
//
|
||||
Status = PeiServicesInstallPpi (&mPpiListEndOfPeiTable);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
PERF_CODE (
|
||||
WriteToOsS3PerformanceData ();
|
||||
@ -681,13 +681,13 @@ S3ResumeExecuteBootScript (
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "Close all SMRAM regions before executing boot script\n"));
|
||||
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR(Status); Index++) {
|
||||
Status = SmmAccess->Close ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "Lock all SMRAM regions before executing boot script\n"));
|
||||
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
|
||||
for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR(Status); Index++) {
|
||||
Status = SmmAccess->Lock ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
|
||||
}
|
||||
}
|
||||
@ -827,7 +827,7 @@ S3RestoreConfig2 (
|
||||
NULL,
|
||||
(VOID **) &SmmAccess
|
||||
);
|
||||
for (Index = 0; !EFI_ERROR (Status); Index++) {
|
||||
for (Index = 0; !EFI_ERROR(Status); Index++) {
|
||||
Status = SmmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
|
||||
}
|
||||
|
||||
@ -837,7 +837,7 @@ S3RestoreConfig2 (
|
||||
NULL,
|
||||
(VOID **) &VariableServices
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -847,7 +847,7 @@ S3RestoreConfig2 (
|
||||
&TempAcpiS3Context,
|
||||
&VarSize
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
AcpiS3Context = (ACPI_S3_CONTEXT *)(UINTN)TempAcpiS3Context;
|
||||
ASSERT (AcpiS3Context != NULL);
|
||||
@ -857,7 +857,7 @@ S3RestoreConfig2 (
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
VarSize = sizeof (TempEfiBootScriptExecutorVariable);
|
||||
Status = RestoreLockBox (
|
||||
@ -865,14 +865,14 @@ S3RestoreConfig2 (
|
||||
&TempEfiBootScriptExecutorVariable,
|
||||
&VarSize
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
Status = RestoreLockBox (
|
||||
&gEfiBootScriptExecutorContextGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
EfiBootScriptExecutorVariable = (BOOT_SCRIPT_EXECUTOR_VARIABLE *) (UINTN) TempEfiBootScriptExecutorVariable;
|
||||
|
||||
@ -889,8 +889,8 @@ S3RestoreConfig2 (
|
||||
// We just use restore all lock box in place, no need restore one by one.
|
||||
//
|
||||
Status = RestoreAllLockBoxInPlace ();
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
// Something wrong
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
@ -984,7 +984,7 @@ PeimS3ResumeEntryPoint (
|
||||
// Install S3 Resume Ppi
|
||||
//
|
||||
Status = (**PeiServices).InstallPpi (PeiServices, &mPpiList);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ AhciPioTransfer (
|
||||
&Map
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) || (DataCount != MapLength)) {
|
||||
if (EFI_ERROR(Status) || (DataCount != MapLength)) {
|
||||
return EFI_BAD_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
@ -786,7 +786,7 @@ AhciPioTransfer (
|
||||
0,
|
||||
Timeout
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -806,7 +806,7 @@ AhciPioTransfer (
|
||||
D2hFisReceived = FALSE;
|
||||
Offset = FisBaseAddr + EFI_AHCI_PIO_FIS_OFFSET;
|
||||
Status = AhciCheckMemSet (Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_PIO_SETUP, NULL);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
PioFisReceived = TRUE;
|
||||
}
|
||||
//
|
||||
@ -818,7 +818,7 @@ AhciPioTransfer (
|
||||
//
|
||||
Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET;
|
||||
Status = AhciCheckMemSet (Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, NULL);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
D2hFisReceived = TRUE;
|
||||
}
|
||||
|
||||
@ -862,7 +862,7 @@ AhciPioTransfer (
|
||||
Timeout
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -999,7 +999,7 @@ AhciDmaTransfer (
|
||||
&Map
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) || (DataCount != MapLength)) {
|
||||
if (EFI_ERROR(Status) || (DataCount != MapLength)) {
|
||||
return EFI_BAD_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
@ -1036,7 +1036,7 @@ AhciDmaTransfer (
|
||||
0,
|
||||
Timeout
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
@ -1065,7 +1065,7 @@ AhciDmaTransfer (
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -1185,7 +1185,7 @@ AhciNonDataTransfer (
|
||||
0,
|
||||
Timeout
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ AhciNonDataTransfer (
|
||||
Timeout
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -1311,7 +1311,7 @@ AhciStartCommand (
|
||||
Timeout
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1415,7 +1415,7 @@ AhciPortReset (
|
||||
Timeout
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1538,7 +1538,7 @@ AhciAtaSmartReturnStatusCheck (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
(EFI_IO_BUS_ATA_ATAPI | EFI_IOB_ATA_BUS_SMART_DISABLED)
|
||||
@ -1661,7 +1661,7 @@ AhciAtaSmartSupport (
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Send S.M.A.R.T AutoSave command to device
|
||||
//
|
||||
@ -1686,7 +1686,7 @@ AhciAtaSmartSupport (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
/*Status = */AhciAtaSmartReturnStatusCheck (
|
||||
PciIo,
|
||||
AhciRegisters,
|
||||
@ -2047,7 +2047,7 @@ AhciCreateTransferDescriptor (
|
||||
0
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -2066,7 +2066,7 @@ AhciCreateTransferDescriptor (
|
||||
&AhciRegisters->MapRFis
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) || (Bytes != MaxReceiveFisSize)) {
|
||||
if (EFI_ERROR(Status) || (Bytes != MaxReceiveFisSize)) {
|
||||
//
|
||||
// Map error or unable to map the whole RFis buffer into a contiguous region.
|
||||
//
|
||||
@ -2098,7 +2098,7 @@ AhciCreateTransferDescriptor (
|
||||
0
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Free mapped resource.
|
||||
//
|
||||
@ -2121,7 +2121,7 @@ AhciCreateTransferDescriptor (
|
||||
&AhciRegisters->MapCmdList
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) || (Bytes != MaxCommandListSize)) {
|
||||
if (EFI_ERROR(Status) || (Bytes != MaxCommandListSize)) {
|
||||
//
|
||||
// Map error or unable to map the whole cmd list buffer into a contiguous region.
|
||||
//
|
||||
@ -2154,7 +2154,7 @@ AhciCreateTransferDescriptor (
|
||||
0
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Free mapped resource.
|
||||
//
|
||||
@ -2177,7 +2177,7 @@ AhciCreateTransferDescriptor (
|
||||
&AhciRegisters->MapCommandTable
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) || (Bytes != MaxCommandTableSize)) {
|
||||
if (EFI_ERROR(Status) || (Bytes != MaxCommandTableSize)) {
|
||||
//
|
||||
// Map error or unable to map the whole cmd list buffer into a contiguous region.
|
||||
//
|
||||
@ -2277,7 +2277,7 @@ AhciModeInitialization (
|
||||
|
||||
Status = AhciReset (PciIo, EFI_AHCI_BUS_RESET_TIMEOUT);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -2317,7 +2317,7 @@ AhciModeInitialization (
|
||||
AhciRegisters = &Instance->AhciRegisters;
|
||||
Status = AhciCreateTransferDescriptor (PciIo, AhciRegisters);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
// DEBUG ((EFI_D_ERROR, "MaxPortNumber = %d\n", MaxPortNumber));
|
||||
@ -2382,7 +2382,7 @@ AhciModeInitialization (
|
||||
EFI_AHCI_PORT_CMD_FR_CLEAR_TIMEOUT
|
||||
); */
|
||||
Status = AhciEnableFisReceive( PciIo, Port, EFI_AHCI_PORT_CMD_FR_CLEAR_TIMEOUT );
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2448,7 +2448,7 @@ AhciModeInitialization (
|
||||
0x00000101,
|
||||
EFI_TIMER_PERIOD_SECONDS(16)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2456,7 +2456,7 @@ AhciModeInitialization (
|
||||
if ((Data & EFI_AHCI_ATAPI_SIG_MASK) == EFI_AHCI_ATAPI_DEVICE_SIG) {
|
||||
Status = AhciIdentifyPacket (PciIo, AhciRegisters, Port, 0, &Buffer);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2464,7 +2464,7 @@ AhciModeInitialization (
|
||||
} else if ((Data & EFI_AHCI_ATAPI_SIG_MASK) == EFI_AHCI_ATA_DEVICE_SIG) {
|
||||
Status = AhciIdentify (PciIo, AhciRegisters, Port, 0, &Buffer);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_DETECTED));
|
||||
continue;
|
||||
}
|
||||
@ -2506,7 +2506,7 @@ AhciModeInitialization (
|
||||
0,
|
||||
&SupportedModes
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Calculate Mode Fail, Status = %r\n", Status));
|
||||
// Print(L"Calculate Mode Fail, Status = %r\n", Status);
|
||||
continue;
|
||||
@ -2539,7 +2539,7 @@ AhciModeInitialization (
|
||||
FreePool(SupportedModes);
|
||||
|
||||
Status = AhciDeviceSetFeature (PciIo, AhciRegisters, Port, 0, 0x03, (UINT32)(*(UINT8 *)&TransferMode));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Set transfer Mode Fail, Status = %r\n", Status));
|
||||
// Print(L"Set transfer Mode Fail, Status = %r\n", Status);
|
||||
continue;
|
||||
|
@ -214,7 +214,7 @@ AtaPassThruPassThruExecute (
|
||||
//
|
||||
Status = GetIdeRegisterIoAddr (Instance->PciIo, Instance->IdeRegisters);
|
||||
// DBG(L"GetIdeRegisterIoAddr Status=%r\n", Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
#endif
|
||||
@ -446,7 +446,7 @@ AsyncNonBlockingTransferRoutine (
|
||||
} else {
|
||||
RemoveEntryList (&Task->Link);
|
||||
gBS->SignalEvent (Task->Event);
|
||||
FreePool (Task);
|
||||
FreePool(Task);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -481,7 +481,7 @@ InitializeAtaAtapiPassThru (
|
||||
&gAtaAtapiPassThruComponentName,
|
||||
&gAtaAtapiPassThruComponentName2
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -554,7 +554,7 @@ AtaAtapiPassThruSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// EFI_ALREADY_STARTED is also an error
|
||||
//
|
||||
@ -579,7 +579,7 @@ AtaAtapiPassThruSupported (
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// EFI_ALREADY_STARTED is also an error
|
||||
//
|
||||
@ -607,7 +607,7 @@ AtaAtapiPassThruSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -621,7 +621,7 @@ AtaAtapiPassThruSupported (
|
||||
sizeof (PciData.Hdr.ClassCode),
|
||||
PciData.Hdr.ClassCode
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -698,7 +698,7 @@ AtaAtapiPassThruStart (
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG (L"Open Ide_Controller_Init Error, Status=%r", Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -711,7 +711,7 @@ AtaAtapiPassThruStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Get Pci_Io Protocol Error, Status=%r", Status));
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -723,7 +723,7 @@ AtaAtapiPassThruStart (
|
||||
&OriginalPciAttributes
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"OriginalPciAttributes status=%r\n", Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -734,7 +734,7 @@ AtaAtapiPassThruStart (
|
||||
0,
|
||||
&Supports
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Supports &= (UINT64)EFI_PCI_DEVICE_ENABLE;
|
||||
Status = PciIo->Attributes (
|
||||
PciIo,
|
||||
@ -744,7 +744,7 @@ AtaAtapiPassThruStart (
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
@ -774,7 +774,7 @@ AtaAtapiPassThruStart (
|
||||
Instance,
|
||||
&Instance->TimerEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ AtaAtapiPassThruStart (
|
||||
// Set 1ms timer.
|
||||
//
|
||||
Status = gBS->SetTimer (Instance->TimerEvent, TimerPeriodic, 10000);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
@ -790,7 +790,7 @@ AtaAtapiPassThruStart (
|
||||
// Enumerate all inserted ATA devices.
|
||||
//
|
||||
Status = EnumerateAttachedDevice (Instance);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
@ -800,7 +800,7 @@ AtaAtapiPassThruStart (
|
||||
&gEfiExtScsiPassThruProtocolGuid, &(Instance->ExtScsiPassThru),
|
||||
NULL
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
// DBG(L"AtaPassThru success\n");
|
||||
return Status;
|
||||
@ -825,7 +825,7 @@ ErrorExit:
|
||||
DestroyDeviceInfoList(Instance);
|
||||
|
||||
if (Instance != NULL) {
|
||||
FreePool (Instance);
|
||||
FreePool(Instance);
|
||||
}
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
@ -883,7 +883,7 @@ AtaAtapiPassThruStop (
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -896,7 +896,7 @@ AtaAtapiPassThruStop (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -969,7 +969,7 @@ AtaAtapiPassThruStop (
|
||||
0,
|
||||
&Supports
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Supports &= (UINT64)EFI_PCI_DEVICE_ENABLE;
|
||||
PciIo->Attributes (
|
||||
PciIo,
|
||||
@ -988,9 +988,9 @@ AtaAtapiPassThruStop (
|
||||
Instance->OriginalPciAttributes,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
FreePool (Instance);
|
||||
FreePool(Instance);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -1078,7 +1078,7 @@ CreateNewDeviceInfo (
|
||||
// DBG(L" IdentifyData copied\n");
|
||||
DeviceInfo->IdentifyData = AllocateCopyPool (sizeof (EFI_IDENTIFY_DATA), IdentifyData);
|
||||
if (DeviceInfo->IdentifyData == NULL) {
|
||||
FreePool (DeviceInfo);
|
||||
FreePool(DeviceInfo);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
}
|
||||
@ -1111,9 +1111,9 @@ DestroyDeviceInfoList (
|
||||
|
||||
RemoveEntryList (&DeviceInfo->Link);
|
||||
if (DeviceInfo->IdentifyData != NULL) {
|
||||
FreePool (DeviceInfo->IdentifyData);
|
||||
FreePool(DeviceInfo->IdentifyData);
|
||||
}
|
||||
FreePool (DeviceInfo);
|
||||
FreePool(DeviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1154,7 +1154,7 @@ DestroyAsynTaskList (
|
||||
Task->Packet->Asb->AtaStatus = 0x01;
|
||||
gBS->SignalEvent (Task->Event);
|
||||
}
|
||||
FreePool (Task);
|
||||
FreePool(Task);
|
||||
}
|
||||
}
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
@ -1193,8 +1193,8 @@ EnumerateAttachedDevice (
|
||||
sizeof (PciData.Hdr.ClassCode),
|
||||
PciData.Hdr.ClassCode
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1210,7 +1210,7 @@ EnumerateAttachedDevice (
|
||||
Status = IdeModeInitialization (Instance);
|
||||
// DBG(L"IdeModeInitialization Status=%r\n", Status);
|
||||
//anyway goto Done
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
// goto Done;
|
||||
}
|
||||
@ -1229,7 +1229,7 @@ EnumerateAttachedDevice (
|
||||
|
||||
Status = AhciModeInitialization (Instance);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
// goto Done;
|
||||
}
|
||||
@ -2082,7 +2082,7 @@ ExtScsiPassThruPassThru (
|
||||
//
|
||||
Status = GetIdeRegisterIoAddr (Instance->PciIo, Instance->IdeRegisters);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"GetIdeRegisterIoAddr Status=%r\n", Status);
|
||||
return Status;
|
||||
}
|
||||
@ -2104,7 +2104,7 @@ ExtScsiPassThruPassThru (
|
||||
//
|
||||
// If the cmd doesn't get executed correctly, then check sense data.
|
||||
//
|
||||
if (EFI_ERROR (Status) && (Packet->SenseDataLength != 0) && (*((UINT8*)Packet->Cdb) != ATA_CMD_REQUEST_SENSE)) {
|
||||
if (EFI_ERROR(Status) && (Packet->SenseDataLength != 0) && (*((UINT8*)Packet->Cdb) != ATA_CMD_REQUEST_SENSE)) {
|
||||
PtrSenseData = AllocateAlignedPages (EFI_SIZE_TO_PAGES (sizeof (EFI_SCSI_SENSE_DATA)), This->Mode->IoAlign);
|
||||
if (PtrSenseData == NULL) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
@ -2119,7 +2119,7 @@ ExtScsiPassThruPassThru (
|
||||
sizeof (EFI_SCSI_SENSE_DATA),
|
||||
Packet->Timeout
|
||||
);
|
||||
if (EFI_ERROR (SenseStatus)) {
|
||||
if (EFI_ERROR(SenseStatus)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ AtaAtapiPassThruComponentNameGetControllerName (
|
||||
gAtaAtapiPassThruDriverBinding.DriverBindingHandle,
|
||||
&gEfiIdeControllerInitProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ AtaAtapiPassThruComponentNameGetControllerName (
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ IdeWritePortWMultiple (
|
||||
);
|
||||
|
||||
if (AlignedBuffer != Buffer) {
|
||||
gBS->FreePool (WorkingBuffer);
|
||||
gBS->FreePool(WorkingBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ IdeReadPortWMultiple (
|
||||
// Copy data to user buffer
|
||||
//
|
||||
CopyMem (Buffer, AlignedBuffer, Size);
|
||||
gBS->FreePool (WorkingBuffer);
|
||||
gBS->FreePool(WorkingBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1162,7 +1162,7 @@ GetIdeRegisterIoAddr (
|
||||
&PciData
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1335,7 +1335,7 @@ AtaIssueCommand (
|
||||
AtaCommand = AtaCommandBlock->AtaCommand;
|
||||
|
||||
Status = WaitForBSYClear (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -1355,7 +1355,7 @@ AtaIssueCommand (
|
||||
if (LBAMidReg == 0) {
|
||||
|
||||
Status = DRDYReady (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
@ -1365,7 +1365,7 @@ AtaIssueCommand (
|
||||
// Before write to all the following registers, BSY and DRQ must be 0.
|
||||
//
|
||||
Status = DRQClear2 (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -1460,7 +1460,7 @@ AtaPioDataInOut (
|
||||
// Issue ATA command
|
||||
//
|
||||
Status = AtaIssueCommand (PciIo, IdeRegisters, AtaCommandBlock, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1494,13 +1494,13 @@ AtaPioDataInOut (
|
||||
// Poll DRQ bit set, data transfer can be performed only when DRQ is ready
|
||||
//
|
||||
Status = DRQReady2 (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1533,13 +1533,13 @@ AtaPioDataInOut (
|
||||
}
|
||||
|
||||
Status = DRQClear (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Exit:
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG(L"DataInOut Status=%r WordCount=%d\n", Status, WordCount);
|
||||
}
|
||||
//
|
||||
@ -1592,7 +1592,7 @@ AtaNonDataCommandIn (
|
||||
// Issue ATA command
|
||||
//
|
||||
Status = AtaIssueCommand (PciIo, IdeRegisters, AtaCommandBlock, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1601,13 +1601,13 @@ AtaNonDataCommandIn (
|
||||
// Wait for command completion
|
||||
//
|
||||
Status = WaitForBSYClear (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
@ -1659,7 +1659,7 @@ AtaUdmStatusWait (
|
||||
|
||||
do {
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
break;
|
||||
}
|
||||
@ -1715,7 +1715,7 @@ AtaUdmStatusCheck (
|
||||
Task->RetryTimes--;
|
||||
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -1884,7 +1884,7 @@ AtaUdmaInOut (
|
||||
&PrdTableMapAddr,
|
||||
&PrdTableMap
|
||||
);
|
||||
if (EFI_ERROR (Status) || (ByteCount != EFI_PAGES_TO_SIZE (PageCount))) {
|
||||
if (EFI_ERROR(Status) || (ByteCount != EFI_PAGES_TO_SIZE (PageCount))) {
|
||||
//
|
||||
// If the data length actually mapped is not equal to the requested amount,
|
||||
// it means the DMA operation may be broken into several discontinuous smaller chunks.
|
||||
@ -1914,7 +1914,7 @@ AtaUdmaInOut (
|
||||
&BufferMapAddress,
|
||||
&BufferMap
|
||||
);
|
||||
if (EFI_ERROR (Status) || (ByteCount != DataLength)) {
|
||||
if (EFI_ERROR(Status) || (ByteCount != DataLength)) {
|
||||
PciIo->Unmap (PciIo, PrdTableMap);
|
||||
FreeAlignedPages(PrdBaseAddr, PageCount);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -2001,13 +2001,13 @@ AtaUdmaInOut (
|
||||
//
|
||||
Status = AtaIssueCommand (PciIo, IdeRegisters, AtaCommandBlock, Timeout);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
// Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
// if (EFI_ERROR (Status)) {
|
||||
// if (EFI_ERROR(Status)) {
|
||||
// Status = EFI_NOT_READY;
|
||||
// goto Exit;
|
||||
// }
|
||||
@ -2093,7 +2093,7 @@ Exit:
|
||||
DumpAllIdeRegisters (PciIo, IdeRegisters, AtaStatusBlock);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG(L"AtaUdmaInOut Status=%r", Status);
|
||||
}
|
||||
|
||||
@ -2195,12 +2195,12 @@ AtaPacketReadWrite (
|
||||
// to see whether indicates device is ready to transfer data.
|
||||
//
|
||||
Status = DRQReady2 (PciIo, IdeRegisters, Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
@ -2234,7 +2234,7 @@ AtaPacketReadWrite (
|
||||
// read status register to check whether error happens.
|
||||
//
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -2255,7 +2255,7 @@ AtaPacketReadWrite (
|
||||
// read status register to check whether error happens.
|
||||
//
|
||||
Status = CheckStatusRegister (PciIo, IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -2263,7 +2263,7 @@ AtaPacketReadWrite (
|
||||
// After data transfer is completed, normally, DRQ bit should clear.
|
||||
//
|
||||
Status = DRQClear2 (PciIo, IdeRegisters, Timeout); //or DRQClear ?
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -2337,12 +2337,12 @@ AtaPacketCommandExecute (
|
||||
// Issue ATA PACKET command firstly
|
||||
//
|
||||
Status = AtaIssueCommand (PciIo, IdeRegisters, &AtaCommandBlock, Packet->Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = DRQReady (PciIo, IdeRegisters, Packet->Timeout);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -2546,7 +2546,7 @@ IdeAtaSmartReturnStatusCheck (
|
||||
);
|
||||
|
||||
// DBG(L"Send S.M.A.R.T DeviceHead=%x Status=%r\n", AtaCommandBlock.AtaDeviceHead, Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
(EFI_IO_BUS_ATA_ATAPI | EFI_IOB_ATA_BUS_SMART_DISABLED)
|
||||
@ -2658,7 +2658,7 @@ IdeAtaSmartSupport (
|
||||
);
|
||||
|
||||
DBG(L"Send S.M.A.R.T enable DeviceHead=%x Status=%r\n", AtaCommandBlock.AtaDeviceHead, Status);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Send S.M.A.R.T AutoSave command to device
|
||||
//
|
||||
@ -2680,7 +2680,7 @@ IdeAtaSmartSupport (
|
||||
NULL
|
||||
);
|
||||
DBG(L"Send S.M.A.R.T autosave DeviceHead=%x Status=%r\n", AtaCommandBlock.AtaDeviceHead, Status);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
/*Status = */IdeAtaSmartReturnStatusCheck (
|
||||
Instance,
|
||||
Channel,
|
||||
@ -2917,7 +2917,7 @@ DetectAndConfigIdeDevice (
|
||||
IdeWritePortB (PciIo, IdeRegisters->CmdOrStatus, ATA_CMD_EXEC_DRIVE_DIAG);
|
||||
|
||||
Status = WaitForBSYClear (PciIo, IdeRegisters, 5000000); //discussable. The value from Intel/Ide.c=35000000
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG((EFI_D_ERROR, "New detecting method: Send Execute Diagnostic Command: WaitForBSYClear: Status: %d\n", Status));
|
||||
DBG(L"New detecting method: Send Execute Diagnostic Command: WaitForBSYClear: Status: %r\n", Status);
|
||||
continue;
|
||||
@ -2995,7 +2995,7 @@ DetectAndConfigIdeDevice (
|
||||
//
|
||||
// if identifying ata device is failure, then try to send identify packet cmd.
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_DETECTED));
|
||||
|
||||
DeviceType = EfiIdeCdrom;
|
||||
@ -3006,13 +3006,13 @@ DetectAndConfigIdeDevice (
|
||||
//
|
||||
// if identifying atapi device is failure, then try to send identify cmd.
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
DeviceType = EfiIdeHarddisk;
|
||||
Status = AtaIdentify (Instance, IdeChannel, IdeDevice, &Buffer, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// No device is found at this port
|
||||
//
|
||||
@ -3054,7 +3054,7 @@ DetectAndConfigIdeDevice (
|
||||
IdeDevice,
|
||||
&SupportedModes
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Calculate Mode Fail, Status = %r\n", Status));
|
||||
// DBG(L"Calculate Mode Fail, Status = %r\n", Status);
|
||||
continue;
|
||||
@ -3074,7 +3074,7 @@ DetectAndConfigIdeDevice (
|
||||
if (SupportedModes->ExtModeCount == 0){
|
||||
Status = SetDeviceTransferMode (Instance, IdeChannel, IdeDevice, &TransferMode, NULL);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Set transfer Mode Fail, Status = %r\n", Status));
|
||||
DBG(L"Set PIO transfer Mode %d Fail, Status = %r\n", TransferMode.ModeNumber, Status);
|
||||
FreePool(SupportedModes);
|
||||
@ -3093,7 +3093,7 @@ DetectAndConfigIdeDevice (
|
||||
TransferMode.ModeNumber = (UINT8) (SupportedModes->UdmaMode.Mode);
|
||||
Status = SetDeviceTransferMode (Instance, IdeChannel, IdeDevice, &TransferMode, NULL);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Set transfer Mode Fail, Status = %r\n", Status));
|
||||
DBG(L"Set DMA transfer Mode %d Fail, Status = %r\n", TransferMode.ModeNumber, Status);
|
||||
FreePool(SupportedModes);
|
||||
@ -3104,7 +3104,7 @@ DetectAndConfigIdeDevice (
|
||||
TransferMode.ModeNumber = (UINT8) SupportedModes->MultiWordDmaMode.Mode;
|
||||
Status = SetDeviceTransferMode (Instance, IdeChannel, IdeDevice, &TransferMode, NULL);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "Set transfer Mode Fail, Status = %r\n", Status));
|
||||
DBG(L"Set transfer Mode Fail, Status = %r\n", Status);
|
||||
FreePool(SupportedModes);
|
||||
@ -3139,7 +3139,7 @@ DetectAndConfigIdeDevice (
|
||||
// Now insert the device into device list.
|
||||
//
|
||||
Status = CreateNewDeviceInfo (Instance, IdeChannel, IdeDevice, DeviceType, &Buffer);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"CreateNewDeviceInfo fails Status=%r\n", Status);
|
||||
continue;
|
||||
}
|
||||
@ -3182,7 +3182,7 @@ IdeModeInitialization (
|
||||
// Obtain IDE IO port registers' base addresses
|
||||
//
|
||||
Status = GetIdeRegisterIoAddr (PciIo, Instance->IdeRegisters);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DBG(L"GetIdeRegisterIoAddr fails Status=%r\n", Status);
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -3199,7 +3199,7 @@ IdeModeInitialization (
|
||||
&ChannelEnabled,
|
||||
&MaxDevices
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_ERROR, "[GetChannel, Status=%x]", Status));
|
||||
// DBG(L"[GetChannel, Status=%r]", Status);
|
||||
continue;
|
||||
|
@ -175,7 +175,7 @@ ReleaseAtaResources (
|
||||
FreeAlignedBuffer (AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
|
||||
FreeAlignedBuffer (AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA));
|
||||
if (AtaDevice->DevicePath != NULL) {
|
||||
FreePool (AtaDevice->DevicePath);
|
||||
FreePool(AtaDevice->DevicePath);
|
||||
}
|
||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
if (!IsListEmpty (&AtaDevice->AtaSubTaskList)) {
|
||||
@ -205,7 +205,7 @@ ReleaseAtaResources (
|
||||
AtaTask = ATA_AYNS_TASK_FROM_ENTRY (DelEntry);
|
||||
|
||||
RemoveEntryList (DelEntry);
|
||||
FreePool (AtaTask);
|
||||
FreePool(AtaTask);
|
||||
}
|
||||
}
|
||||
if (AtaDevice->ExitBootServiceEvent != NULL) {
|
||||
@ -214,7 +214,7 @@ ReleaseAtaResources (
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
FreePool (AtaDevice);
|
||||
FreePool(AtaDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -249,7 +249,7 @@ ClearInterrupt (
|
||||
// Obtain IDE IO port registers' base addresses in case switch native<->legacy
|
||||
//
|
||||
/* Status = ReassignIdeResources (IdeDev);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}*/
|
||||
|
||||
@ -265,7 +265,7 @@ ClearInterrupt (
|
||||
// Status = AtaDev->BlockIo.Reset(AtaDev->BlockIo, FALSE);
|
||||
// Status = AtaPassThru->ResetPort(AtaPassThru->ResetPort, 0);
|
||||
Status = ResetAtaDevice(AtaDev);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@ -358,7 +358,7 @@ RegisterAtaDevice (
|
||||
//
|
||||
AtaPassThru = AtaBusDriverData->AtaPassThru;
|
||||
Status = AtaPassThru->BuildDevicePath (AtaPassThru, Port, PortMultiplierPort, &NewDevicePathNode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -371,9 +371,9 @@ RegisterAtaDevice (
|
||||
DeviceHandle = NULL;
|
||||
RemainingDevicePath = DevicePath;
|
||||
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &DeviceHandle);
|
||||
if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(RemainingDevicePath)) {
|
||||
if (!EFI_ERROR(Status) && (DeviceHandle != NULL) && IsDevicePathEnd(RemainingDevicePath)) {
|
||||
Status = EFI_ALREADY_STARTED;
|
||||
FreePool (DevicePath);
|
||||
FreePool(DevicePath);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ RegisterAtaDevice (
|
||||
// Try to identify the ATA device via the ATA pass through command.
|
||||
//
|
||||
Status = DiscoverAtaDevice (AtaDevice);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -430,7 +430,7 @@ RegisterAtaDevice (
|
||||
AtaDevice->ModelName,
|
||||
TRUE
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@ RegisterAtaDevice (
|
||||
AtaDevice->ModelName,
|
||||
FALSE
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ RegisterAtaDevice (
|
||||
&AtaDevice->DiskInfo,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ RegisterAtaDevice (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&AtaDevice->StorageSecurity
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "Successfully Install Storage Security Protocol on the ATA device\n"));
|
||||
@ -523,10 +523,10 @@ RegisterAtaDevice (
|
||||
|
||||
Done:
|
||||
if (NewDevicePathNode != NULL) {
|
||||
FreePool (NewDevicePathNode);
|
||||
FreePool(NewDevicePathNode);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status) && (AtaDevice != NULL)) {
|
||||
if (EFI_ERROR(Status) && (AtaDevice != NULL)) {
|
||||
ReleaseAtaResources (AtaDevice);
|
||||
// DEBUG ((EFI_D_ERROR | EFI_D_INIT, "Failed to initialize Port %x PortMultiplierPort %x, status = %r\n", Port, PortMultiplierPort, Status));
|
||||
DBG(L"Failed to initialize Port %x PortMultiplierPort %x, status = %r\n", Port, PortMultiplierPort, Status);
|
||||
@ -574,7 +574,7 @@ UnregisterAtaDevice (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Locate BlockIo2 protocol
|
||||
//
|
||||
@ -586,7 +586,7 @@ UnregisterAtaDevice (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -627,7 +627,7 @@ UnregisterAtaDevice (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiAtaPassThruProtocolGuid,
|
||||
@ -651,13 +651,13 @@ UnregisterAtaDevice (
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->UninstallProtocolInterface (
|
||||
Handle,
|
||||
&gEfiStorageSecurityCommandProtocolGuid,
|
||||
&AtaDevice->StorageSecurity
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiAtaPassThruProtocolGuid,
|
||||
@ -748,7 +748,7 @@ AtaBusDriverBindingSupported (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -757,7 +757,7 @@ AtaBusDriverBindingSupported (
|
||||
//
|
||||
if ((RemainingDevicePath != NULL) && !IsDevicePathEnd (RemainingDevicePath)) {
|
||||
Status = AtaPassThru->GetDevice (AtaPassThru, RemainingDevicePath, &Port, &PortMultiplierPort);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@ -847,7 +847,7 @@ AtaBusDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -859,7 +859,7 @@ AtaBusDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
|
||||
if ((EFI_ERROR(Status)) && (Status != EFI_ALREADY_STARTED)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
@ -884,7 +884,7 @@ AtaBusDriverBindingStart (
|
||||
AtaBusDriverData,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
@ -897,7 +897,7 @@ AtaBusDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AtaBusDriverData = NULL;
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -907,7 +907,7 @@ AtaBusDriverBindingStart (
|
||||
Port = 0xFFFF;
|
||||
while (TRUE) {
|
||||
Status = AtaPassThru->GetNextPort (AtaPassThru, &Port);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// We cannot find more legal port then we are done.
|
||||
//
|
||||
@ -917,7 +917,7 @@ AtaBusDriverBindingStart (
|
||||
PortMultiplierPort = 0xFFFF;
|
||||
while (TRUE) {
|
||||
Status = AtaPassThru->GetNextDevice (AtaPassThru, Port, &PortMultiplierPort);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// We cannot find more legal port multiplier port number for ATA device
|
||||
// on the port, then we are done.
|
||||
@ -930,7 +930,7 @@ AtaBusDriverBindingStart (
|
||||
Status = EFI_SUCCESS;
|
||||
} else if (!IsDevicePathEnd (RemainingDevicePath)) {
|
||||
Status = AtaPassThru->GetDevice (AtaPassThru, RemainingDevicePath, &Port, &PortMultiplierPort);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = RegisterAtaDevice (AtaBusDriverData,Port, PortMultiplierPort);
|
||||
}
|
||||
}
|
||||
@ -946,7 +946,7 @@ ErrorExit:
|
||||
AtaBusDriverData,
|
||||
NULL
|
||||
);
|
||||
FreePool (AtaBusDriverData);
|
||||
FreePool(AtaBusDriverData);
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (
|
||||
@ -1010,14 +1010,14 @@ AtaBusDriverBindingStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Controller,
|
||||
&gEfiCallerIdGuid,
|
||||
AtaBusDriverData,
|
||||
NULL
|
||||
);
|
||||
FreePool (AtaBusDriverData);
|
||||
FreePool(AtaBusDriverData);
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (
|
||||
@ -1035,7 +1035,7 @@ AtaBusDriverBindingStop (
|
||||
for (Index = 0; Index < NumberOfChildren; Index++) {
|
||||
|
||||
Status = UnregisterAtaDevice (This, Controller, ChildHandleBuffer[Index]);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
}
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ AtaBlockIoReset (
|
||||
|
||||
Status = ResetAtaDevice (AtaDevice);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -1299,7 +1299,7 @@ AtaBlockIoResetEx (
|
||||
|
||||
Status = ResetAtaDevice (AtaDevice);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -1798,8 +1798,8 @@ InitializeAtaBus(
|
||||
&gAtaBusComponentName,
|
||||
&gAtaBusComponentName2
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1815,7 +1815,7 @@ InitializeAtaBus(
|
||||
&mMorControl
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
// DEBUG ((EFI_D_INFO, "AtaBus:gEfiMemoryOverwriteControlDataGuid doesn't exist!!***\n"));
|
||||
mHasMor = FALSE;
|
||||
mMorControl = 0;
|
||||
@ -1891,7 +1891,7 @@ InitiateTPerReset (
|
||||
Buffer, // PayloadBuffer
|
||||
&XferSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -1928,7 +1928,7 @@ InitiateTPerReset (
|
||||
&XferSize
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
@ -1979,7 +1979,7 @@ InitiateTPerReset (
|
||||
Buffer // PayloadBuffer
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
DEBUG ((EFI_D_INFO, "Send TPer Reset Command Successfully !\n"));
|
||||
} else {
|
||||
DEBUG ((EFI_D_INFO, "Send TPer Reset Command Fail !\n"));
|
||||
|
@ -437,13 +437,13 @@ DiscoverAtaDevice (
|
||||
Retry = MAX_RETRY_TIMES;
|
||||
do {
|
||||
Status = AtaDevicePassThru (AtaDevice, NULL, NULL);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// The command is issued successfully
|
||||
//
|
||||
Status = IdentifyAtaDevice (AtaDevice);
|
||||
//Slice - this change is appeared in rev 13908
|
||||
// if (!EFI_ERROR (Status)) {
|
||||
// if (!EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
// }
|
||||
}
|
||||
@ -592,10 +592,10 @@ FreeAtaSubTask (
|
||||
FreeAlignedBuffer (Task->Packet.Asb, sizeof (EFI_ATA_STATUS_BLOCK));
|
||||
}
|
||||
if (Task->Packet.Acb != NULL) {
|
||||
FreePool (Task->Packet.Acb);
|
||||
FreePool(Task->Packet.Acb);
|
||||
}
|
||||
|
||||
FreePool (Task);
|
||||
FreePool(Task);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -660,8 +660,8 @@ AtaNonBlockingCallBack (
|
||||
// DEBUG ((EFI_D_BLKIO, "Signal the upper layer event!\n"));
|
||||
}
|
||||
|
||||
FreePool (Task->UnsignalledEventCount);
|
||||
FreePool (Task->IsError);
|
||||
FreePool(Task->UnsignalledEventCount);
|
||||
FreePool(Task->IsError);
|
||||
|
||||
|
||||
//
|
||||
@ -680,12 +680,12 @@ AtaNonBlockingCallBack (
|
||||
AtaTask->IsWrite,
|
||||
AtaTask->Token
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AtaTask->Token->TransactionStatus = Status;
|
||||
gBS->SignalEvent (AtaTask->Token->Event);
|
||||
}
|
||||
RemoveEntryList (Entry);
|
||||
FreePool (AtaTask);
|
||||
FreePool(AtaTask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -797,7 +797,7 @@ AccessAtaDevice(
|
||||
|
||||
IsError = AllocateZeroPool (sizeof (BOOLEAN));
|
||||
if (IsError == NULL) {
|
||||
FreePool (EventCount);
|
||||
FreePool(EventCount);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
*IsError = FALSE;
|
||||
@ -857,7 +857,7 @@ AccessAtaDevice(
|
||||
// If resource allocation fail, the un-signalled event count should equal to
|
||||
// the original one minus the unassigned subtasks number.
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto EXIT;
|
||||
}
|
||||
@ -870,7 +870,7 @@ AccessAtaDevice(
|
||||
Status = TransferAtaDevice (AtaDevice, NULL, Buffer, StartLba, (UINT32) TransferBlockNumber, IsWrite, NULL);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
@ -884,15 +884,15 @@ EXIT:
|
||||
//
|
||||
// Release resource at non-blocking mode.
|
||||
//
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
Token->TransactionStatus = Status;
|
||||
*EventCount = (*EventCount) - (TempCount - Index);
|
||||
*IsError = TRUE;
|
||||
|
||||
if (*EventCount == 0) {
|
||||
FreePool (EventCount);
|
||||
FreePool (IsError);
|
||||
FreePool(EventCount);
|
||||
FreePool(IsError);
|
||||
}
|
||||
|
||||
if (SubTask != NULL) {
|
||||
@ -1007,7 +1007,7 @@ TrustTransferAtaDevice (
|
||||
}
|
||||
|
||||
CopyMem (NewBuffer, Buffer, TransferLength);
|
||||
FreePool (Buffer);
|
||||
FreePool(Buffer);
|
||||
Buffer = NewBuffer;
|
||||
}
|
||||
Packet->OutDataBuffer = Buffer;
|
||||
|
@ -198,7 +198,7 @@ AtaBusComponentNameGetControllerName (
|
||||
gAtaBusDriverBinding.DriverBindingHandle,
|
||||
&gEfiAtaPassThruProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ AtaBusComponentNameGetControllerName (
|
||||
ChildHandle,
|
||||
&gEfiAtaPassThruProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -238,7 +238,7 @@ AtaBusComponentNameGetControllerName (
|
||||
ChildHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
AtaDevice = ATA_DEVICE_FROM_BLOCK_IO (BlockIo);
|
||||
|
@ -1086,7 +1086,7 @@ HdaCodecDriverBindingStart(
|
||||
// Open Device Path protocol.
|
||||
Status = gBS->OpenProtocol(ControllerHandle, &gEfiDevicePathProtocolGuid, (VOID**)&HdaCodecDevicePath,
|
||||
This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
goto CLOSE_CODEC;
|
||||
// Allocate codec device.
|
||||
HdaCodecDev = AllocateZeroPool(sizeof(HDA_CODEC_DEV));
|
||||
@ -1102,18 +1102,18 @@ HdaCodecDriverBindingStart(
|
||||
HdaCodecDev->ControllerHandle = ControllerHandle;
|
||||
// Probe codec.
|
||||
Status = HdaCodecProbeCodec(HdaCodecDev);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
goto FREE_CODEC;
|
||||
|
||||
// Get ports.
|
||||
Status = HdaCodecParsePorts(HdaCodecDev);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
goto FREE_CODEC;
|
||||
|
||||
// Publish protocols.
|
||||
Status = HdaCodecInstallProtocols(HdaCodecDev);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
goto FREE_CODEC;
|
||||
|
||||
// Success.
|
||||
|
@ -148,7 +148,7 @@ HdaControllerInitPciHw(
|
||||
|
||||
// Get vendor and device IDs of PCI device.
|
||||
Status = PciIo->Pci.Read(PciIo, EfiPciIoWidthUint32, PCI_VENDOR_ID_OFFSET, 1, &HdaControllerDev->VendorId);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
return Status;
|
||||
|
||||
// DEBUG((DEBUG_INFO, "HdaControllerInitPciHw(): controller %4X:%4X\n",
|
||||
@ -158,24 +158,24 @@ HdaControllerInitPciHw(
|
||||
if (GET_PCI_VENDOR_ID(HdaControllerDev->VendorId) == VEN_INTEL_ID) {
|
||||
// Set TC0 in TCSEL register.
|
||||
Status = PciIo->Pci.Read(PciIo, EfiPciIoWidthUint8, PCI_HDA_TCSEL_OFFSET, 1, &HdaTcSel);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
return Status;
|
||||
HdaTcSel &= PCI_HDA_TCSEL_TC0_MASK;
|
||||
Status = PciIo->Pci.Write(PciIo, EfiPciIoWidthUint8, PCI_HDA_TCSEL_OFFSET, 1, &HdaTcSel);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
return Status;
|
||||
}
|
||||
|
||||
// Get device control PCI register.
|
||||
Status = PciIo->Pci.Read(PciIo, EfiPciIoWidthUint16, PCI_HDA_DEVC_OFFSET, 1, &HdaDevC);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
return Status;
|
||||
|
||||
// If No Snoop is currently enabled, disable it.
|
||||
if (HdaDevC & PCI_HDA_DEVC_NOSNOOPEN) {
|
||||
HdaDevC &= ~PCI_HDA_DEVC_NOSNOOPEN;
|
||||
Status = PciIo->Pci.Write(PciIo, EfiPciIoWidthUint16, PCI_HDA_DEVC_OFFSET, 1, &HdaDevC);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -707,13 +707,13 @@ HdaControllerDriverBindingStart(
|
||||
// Open PCI I/O protocol.
|
||||
Status = gBS->OpenProtocol(ControllerHandle, &gEfiPciIoProtocolGuid, (VOID**)&PciIo,
|
||||
This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
return Status;
|
||||
|
||||
// Open Device Path protocol.
|
||||
Status = gBS->OpenProtocol(ControllerHandle, &gEfiDevicePathProtocolGuid, (VOID**)&HdaControllerDevicePath,
|
||||
This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER);
|
||||
if (EFI_ERROR (Status))
|
||||
if (EFI_ERROR(Status))
|
||||
goto CLOSE_PCIIO;
|
||||
|
||||
// Allocate controller device.
|
||||
|
@ -156,7 +156,7 @@ InitializeScsiBus(
|
||||
&gScsiBusComponentName,
|
||||
&gScsiBusComponentName2
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -269,7 +269,7 @@ SCSIBusDriverBindingSupported (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ SCSIBusDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (DevicePathStatus) && (DevicePathStatus != EFI_ALREADY_STARTED)) {
|
||||
if (EFI_ERROR(DevicePathStatus) && (DevicePathStatus != EFI_ALREADY_STARTED)) {
|
||||
return DevicePathStatus;
|
||||
}
|
||||
|
||||
@ -383,7 +383,7 @@ SCSIBusDriverBindingStart (
|
||||
//
|
||||
// Fail to open EFI PassThru Protocol, Close the DevicePathProtocol if it is opened by this time.
|
||||
//
|
||||
if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
|
||||
if (EFI_ERROR(Status) && (Status != EFI_ALREADY_STARTED)) {
|
||||
if (!EFI_ERROR(DevicePathStatus)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
@ -444,7 +444,7 @@ SCSIBusDriverBindingStart (
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&ScsiBusDev->BusIdentify
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
} else {
|
||||
@ -461,7 +461,7 @@ SCSIBusDriverBindingStart (
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
ScsiBusDev = SCSI_BUS_CONTROLLER_DEVICE_FROM_THIS (BusIdentify);
|
||||
@ -486,7 +486,7 @@ SCSIBusDriverBindingStart (
|
||||
Status = ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun);
|
||||
}
|
||||
DBG(L"GetTargetLun=%d status=%r\n", Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
} else {
|
||||
@ -510,7 +510,7 @@ SCSIBusDriverBindingStart (
|
||||
Status = ScsiBusDev->ScsiInterface->GetNextDevice (ScsiBusDev->ScsiInterface, &ScsiTargetId.ScsiId.Scsi, &Lun);
|
||||
}
|
||||
DBG(L"GetNextDevice=%d status=%r\n", Lun, Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// no legal Pun and Lun found any more
|
||||
//
|
||||
@ -544,7 +544,7 @@ SCSIBusDriverBindingStart (
|
||||
ErrorExit:
|
||||
|
||||
if (ScsiBusDev != NULL) {
|
||||
FreePool (ScsiBusDev);
|
||||
FreePool(ScsiBusDev);
|
||||
}
|
||||
|
||||
if (ExtScsiSupport) {
|
||||
@ -554,7 +554,7 @@ ErrorExit:
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
if (!EFI_ERROR (PassThruStatus)) {
|
||||
if (!EFI_ERROR(PassThruStatus)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiScsiPassThruProtocolGuid,
|
||||
@ -623,7 +623,7 @@ SCSIBusDriverBindingStop (
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -677,7 +677,7 @@ SCSIBusDriverBindingStop (
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
FreePool (ScsiBusDev);
|
||||
FreePool(ScsiBusDev);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -693,7 +693,7 @@ SCSIBusDriverBindingStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
continue;
|
||||
}
|
||||
@ -727,7 +727,7 @@ SCSIBusDriverBindingStop (
|
||||
&ScsiIoDevice->ScsiIo,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
if (ScsiIoDevice->ExtScsiSupport) {
|
||||
gBS->OpenProtocol (
|
||||
@ -749,7 +749,7 @@ SCSIBusDriverBindingStop (
|
||||
);
|
||||
}
|
||||
} else {
|
||||
FreePool (ScsiIoDevice);
|
||||
FreePool(ScsiIoDevice);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1139,7 +1139,7 @@ ScsiScanCreateDevice (
|
||||
DeviceHandle = NULL;
|
||||
RemainingDevicePath = DevicePath;
|
||||
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &DeviceHandle);
|
||||
if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(RemainingDevicePath)) {
|
||||
if (!EFI_ERROR(Status) && (DeviceHandle != NULL) && IsDevicePathEnd(RemainingDevicePath)) {
|
||||
//
|
||||
// The device has been started, directly return to fast boot.
|
||||
//
|
||||
@ -1192,7 +1192,7 @@ ScsiScanCreateDevice (
|
||||
&ScsiIoDevice->ScsiIo,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto ErrorExit;
|
||||
} else {
|
||||
if (ScsiBusDev->ExtScsiSupport) {
|
||||
@ -1224,14 +1224,14 @@ ErrorExit:
|
||||
// ScsiPassThru->BuildDevicePath() function; It is no longer used
|
||||
// after AppendDevicePathNode,so free the memory it occupies.
|
||||
//
|
||||
FreePool (ScsiDevicePath);
|
||||
FreePool(ScsiDevicePath);
|
||||
|
||||
if (DevicePath != NULL) {
|
||||
FreePool (DevicePath);
|
||||
FreePool(DevicePath);
|
||||
}
|
||||
|
||||
if (ScsiIoDevice != NULL) {
|
||||
FreePool (ScsiIoDevice);
|
||||
FreePool(ScsiIoDevice);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -1293,7 +1293,7 @@ DiscoverScsiDevice (
|
||||
FALSE
|
||||
);
|
||||
DBG(L"ScsiInquiryCommand Status=%r\n", Status);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
break;
|
||||
} else if ((Status == EFI_BAD_BUFFER_SIZE) ||
|
||||
(Status == EFI_INVALID_PARAMETER) ||
|
||||
|
@ -199,7 +199,7 @@ ScsiDiskComponentNameGetControllerName (
|
||||
gScsiDiskDriverBinding.DriverBindingHandle,
|
||||
&gEfiScsiIoProtocolGuid //gEfiIdeControllerInitProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@ -214,7 +214,7 @@ ScsiDiskComponentNameGetControllerName (
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ InitializeScsiDisk(
|
||||
&gScsiDiskComponentName,
|
||||
&gScsiDiskComponentName2
|
||||
);
|
||||
// ASSERT_EFI_ERROR (Status);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
|
||||
return Status;
|
||||
@ -151,12 +151,12 @@ ScsiDiskDriverBindingSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = ScsiIo->GetDeviceType (ScsiIo, &DeviceType);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if ((DeviceType == EFI_SCSI_TYPE_DISK) || (DeviceType == EFI_SCSI_TYPE_CDROM)) {
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
@ -225,8 +225,8 @@ ScsiDiskDriverBindingStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (ScsiDiskDevice);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(ScsiDiskDevice);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ ScsiDiskDriverBindingStart (
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
FreePool (ScsiDiskDevice);
|
||||
FreePool(ScsiDiskDevice);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -276,19 +276,19 @@ ScsiDiskDriverBindingStart (
|
||||
MaxRetry = 2;
|
||||
for (Index = 0; Index < MaxRetry; Index++) {
|
||||
Status = ScsiDiskInquiryDevice (ScsiDiskDevice, &NeedRetry);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!NeedRetry) {
|
||||
FreePool (ScsiDiskDevice->SenseData);
|
||||
FreePool(ScsiDiskDevice->SenseData);
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiScsiIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
FreePool (ScsiDiskDevice);
|
||||
FreePool(ScsiDiskDevice);
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
@ -297,7 +297,7 @@ ScsiDiskDriverBindingStart (
|
||||
// retrieve media capacity
|
||||
//
|
||||
Status = ScsiDiskDetectMedia (ScsiDiskDevice, MustReadCapacity, &Temp);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Determine if Block IO should be produced on this controller handle
|
||||
//
|
||||
@ -332,8 +332,8 @@ ScsiDiskDriverBindingStart (
|
||||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (ScsiDiskDevice->SenseData);
|
||||
gBS->FreePool (ScsiDiskDevice);
|
||||
gBS->FreePool(ScsiDiskDevice->SenseData);
|
||||
gBS->FreePool(ScsiDiskDevice);
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiScsiIoProtocolGuid,
|
||||
@ -385,7 +385,7 @@ ScsiDiskDriverBindingStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -398,7 +398,7 @@ ScsiDiskDriverBindingStop (
|
||||
&ScsiDiskDevice->DiskInfo,
|
||||
NULL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiScsiIoProtocolGuid,
|
||||
@ -446,7 +446,7 @@ ScsiDiskReset (
|
||||
|
||||
Status = ScsiDiskDevice->ScsiIo->ResetDevice (ScsiDiskDevice->ScsiIo);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
@ -457,7 +457,7 @@ ScsiDiskReset (
|
||||
|
||||
Status = ScsiDiskDevice->ScsiIo->ResetBus (ScsiDiskDevice->ScsiIo);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
@ -509,7 +509,7 @@ ScsiDiskReadBlocks (
|
||||
if (!IS_DEVICE_FIXED(ScsiDiskDevice)) {
|
||||
|
||||
Status = ScsiDiskDetectMedia (ScsiDiskDevice, FALSE, &MediaChange);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
@ -627,7 +627,7 @@ ScsiDiskWriteBlocks (
|
||||
if (!IS_DEVICE_FIXED(ScsiDiskDevice)) {
|
||||
|
||||
Status = ScsiDiskDetectMedia (ScsiDiskDevice, FALSE, &MediaChange);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
@ -772,12 +772,12 @@ ScsiDiskDetectMedia (
|
||||
NULL,
|
||||
&TimeoutEvt
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = gBS->SetTimer (TimeoutEvt, TimerRelative, EFI_TIMER_PERIOD_SECONDS(120));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
@ -786,21 +786,21 @@ ScsiDiskDetectMedia (
|
||||
// If the sense data shows the drive is not ready or reset before, we need poll the device status again.
|
||||
// We limit the upper boundary to 120 seconds.
|
||||
//
|
||||
while (EFI_ERROR (gBS->CheckEvent (TimeoutEvt))) {
|
||||
while (EFI_ERROR(gBS->CheckEvent (TimeoutEvt))) {
|
||||
Status = ScsiDiskTestUnitReady (
|
||||
ScsiDiskDevice,
|
||||
&NeedRetry,
|
||||
&SenseData,
|
||||
&NumberOfSenseKeys
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = DetectMediaParsingSenseKeys (
|
||||
ScsiDiskDevice,
|
||||
SenseData,
|
||||
NumberOfSenseKeys,
|
||||
&Action
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto EXIT;
|
||||
} else if (Action == ACTION_RETRY_COMMAND_LATER) {
|
||||
continue;
|
||||
@ -815,7 +815,7 @@ ScsiDiskDetectMedia (
|
||||
}
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
@ -842,7 +842,7 @@ ScsiDiskDetectMedia (
|
||||
&SenseData,
|
||||
&NumberOfSenseKeys
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// analyze sense key to action
|
||||
//
|
||||
@ -852,7 +852,7 @@ ScsiDiskDetectMedia (
|
||||
NumberOfSenseKeys,
|
||||
&Action
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// if Status is error, it may indicate crisis error,
|
||||
// so return without retry.
|
||||
@ -872,7 +872,7 @@ ScsiDiskDetectMedia (
|
||||
}
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto EXIT;
|
||||
}
|
||||
}
|
||||
@ -996,7 +996,7 @@ ScsiDiskInquiryDevice (
|
||||
TRUE,
|
||||
EFI_SCSI_PAGE_CODE_SUPPORTED_VPD
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
PageLength = (SupportedVpdPages->PageLength2 << 8)
|
||||
| SupportedVpdPages->PageLength1;
|
||||
for (Index = 0; Index < PageLength; Index++) {
|
||||
@ -1030,7 +1030,7 @@ ScsiDiskInquiryDevice (
|
||||
TRUE,
|
||||
EFI_SCSI_PAGE_CODE_BLOCK_LIMITS_VPD
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ScsiDiskDevice->BlkIo.Media->OptimalTransferLengthGranularity =
|
||||
(BlockLimits->OptimalTransferLengthGranularity2 << 8) |
|
||||
BlockLimits->OptimalTransferLengthGranularity1;
|
||||
@ -1044,7 +1044,7 @@ ScsiDiskInquiryDevice (
|
||||
}
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return EFI_SUCCESS;
|
||||
|
||||
} else if (Status == EFI_NOT_READY) {
|
||||
@ -1101,7 +1101,7 @@ ScsiDiskInquiryDevice (
|
||||
&NumberOfSenseKeys,
|
||||
TRUE
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
*NeedRetry = TRUE;
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
@ -1215,7 +1215,7 @@ ScsiDiskTestUnitReady (
|
||||
NumberOfSenseKeys,
|
||||
FALSE
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1389,7 +1389,7 @@ ScsiDiskReadCapacity (
|
||||
);
|
||||
|
||||
ScsiDiskDevice->Cdb16Byte = FALSE;
|
||||
if ((!EFI_ERROR (CommandStatus)) && (CapacityData10->LastLba3 == 0xff) && (CapacityData10->LastLba2 == 0xff) &&
|
||||
if ((!EFI_ERROR(CommandStatus)) && (CapacityData10->LastLba3 == 0xff) && (CapacityData10->LastLba2 == 0xff) &&
|
||||
(CapacityData10->LastLba1 == 0xff) && (CapacityData10->LastLba0 == 0xff)) {
|
||||
//
|
||||
// use Read Capacity (16), Read (16) and Write (16) next when hard disk size > 2TB
|
||||
@ -1481,7 +1481,7 @@ ScsiDiskReadCapacity (
|
||||
NumberOfSenseKeys,
|
||||
TRUE
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1655,7 +1655,7 @@ ScsiDiskRequestSenseKeys (
|
||||
FallStatus = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (FallStatus)) {
|
||||
if (EFI_ERROR(FallStatus)) {
|
||||
if (*NumberOfSenseKeys != 0) {
|
||||
*NeedRetry = FALSE;
|
||||
Status = EFI_SUCCESS;
|
||||
@ -1879,7 +1879,7 @@ ScsiDiskReadSectors (
|
||||
SectorCount
|
||||
);
|
||||
}
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2023,7 +2023,7 @@ ScsiDiskWriteSectors (
|
||||
SectorCount
|
||||
);
|
||||
}
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2143,7 +2143,7 @@ BackOff:
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR (ReturnStatus))) {
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR(ReturnStatus))) {
|
||||
// DEBUG ((EFI_D_ERROR, "ScsiDiskRead10: Check Condition happened!\n"));
|
||||
Status = DetectMediaParsingSenseKeys (ScsiDiskDevice, ScsiDiskDevice->SenseData, SenseDataLength / sizeof (EFI_SCSI_SENSE_DATA), &Action);
|
||||
if (Action == ACTION_RETRY_COMMAND_LATER) {
|
||||
@ -2267,7 +2267,7 @@ BackOff:
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR (ReturnStatus))) {
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR(ReturnStatus))) {
|
||||
DEBUG ((EFI_D_ERROR, "ScsiDiskWrite10: Check Condition happened!\n"));
|
||||
Status = DetectMediaParsingSenseKeys (ScsiDiskDevice, ScsiDiskDevice->SenseData, SenseDataLength / sizeof (EFI_SCSI_SENSE_DATA), &Action);
|
||||
if (Action == ACTION_RETRY_COMMAND_LATER) {
|
||||
@ -2390,7 +2390,7 @@ BackOff:
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR (ReturnStatus))) {
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR(ReturnStatus))) {
|
||||
DEBUG ((EFI_D_ERROR, "ScsiDiskRead16: Check Condition happened!\n"));
|
||||
Status = DetectMediaParsingSenseKeys (ScsiDiskDevice, ScsiDiskDevice->SenseData, SenseDataLength / sizeof (EFI_SCSI_SENSE_DATA), &Action);
|
||||
if (Action == ACTION_RETRY_COMMAND_LATER) {
|
||||
@ -2514,7 +2514,7 @@ BackOff:
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR (ReturnStatus))) {
|
||||
if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) || (EFI_ERROR(ReturnStatus))) {
|
||||
DEBUG ((EFI_D_ERROR, "ScsiDiskWrite16: Check Condition happened!\n"));
|
||||
Status = DetectMediaParsingSenseKeys (ScsiDiskDevice, ScsiDiskDevice->SenseData, SenseDataLength / sizeof (EFI_SCSI_SENSE_DATA), &Action);
|
||||
if (Action == ACTION_RETRY_COMMAND_LATER) {
|
||||
@ -2915,7 +2915,7 @@ ReleaseScsiDiskDeviceResources (
|
||||
}
|
||||
|
||||
if (ScsiDiskDevice->SenseData != NULL) {
|
||||
FreePool (ScsiDiskDevice->SenseData);
|
||||
FreePool(ScsiDiskDevice->SenseData);
|
||||
ScsiDiskDevice->SenseData = NULL;
|
||||
}
|
||||
|
||||
@ -2924,7 +2924,7 @@ ReleaseScsiDiskDeviceResources (
|
||||
ScsiDiskDevice->ControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
FreePool (ScsiDiskDevice);
|
||||
FreePool(ScsiDiskDevice);
|
||||
|
||||
// ScsiDiskDevice = NULL;
|
||||
}
|
||||
@ -3008,7 +3008,7 @@ GetParentProtocol (
|
||||
&HandleBuffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -3017,16 +3017,16 @@ GetParentProtocol (
|
||||
//
|
||||
for (Index = 0; Index < HandleCount; Index++) {
|
||||
Status = EfiTestChildHandle (HandleBuffer[Index], ChildHandle, ProtocolGuid);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->HandleProtocol (HandleBuffer[Index], ProtocolGuid, (VOID **)&Interface);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
gBS->FreePool (HandleBuffer);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gBS->FreePool(HandleBuffer);
|
||||
return Interface;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (HandleBuffer);
|
||||
gBS->FreePool(HandleBuffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -3249,7 +3249,7 @@ InitializeInstallDiskInfo (
|
||||
//
|
||||
// Device Path protocol must be installed on the device handle.
|
||||
//
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
//
|
||||
// Copy the DiskInfo protocol template.
|
||||
//
|
||||
@ -3270,7 +3270,7 @@ InitializeInstallDiskInfo (
|
||||
// with IDE/AHCI interface GUID.
|
||||
//
|
||||
Status = AtapiIdentifyDevice (ScsiDiskDevice);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if (DevicePathSubType(ChildDevicePathNode) == MSG_ATAPI_DP) {
|
||||
//
|
||||
// We find the valid ATAPI device path
|
||||
|
@ -60,7 +60,7 @@ InitializeIsaBus(
|
||||
&gIsaBusComponentName,
|
||||
&gIsaBusComponentName2
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -135,7 +135,7 @@ IsaBusControllerDriverSupported (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ IsaBusControllerDriverSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ IsaBusControllerDriverSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ IsaBusControllerDriverStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ IsaBusControllerDriverStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
|
||||
if (EFI_ERROR(Status) && Status != EFI_ALREADY_STARTED) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ IsaBusControllerDriverStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
|
||||
if (EFI_ERROR(Status) && Status != EFI_ALREADY_STARTED) {
|
||||
//
|
||||
// Close opened protocol
|
||||
//
|
||||
@ -306,7 +306,7 @@ IsaBusControllerDriverStart (
|
||||
(VOID **) &GenMemoryTest
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = GenMemoryTest->CompatibleRangeTest (
|
||||
GenMemoryTest,
|
||||
0x100000,
|
||||
@ -342,7 +342,7 @@ IsaBusControllerDriverStart (
|
||||
IsaDevice = NULL;
|
||||
do {
|
||||
Status = IsaAcpi->DeviceEnumerate (IsaAcpi, &IsaDevice);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
break;
|
||||
}
|
||||
//
|
||||
@ -350,7 +350,7 @@ IsaBusControllerDriverStart (
|
||||
//
|
||||
ResourceList = NULL;
|
||||
Status = IsaAcpi->GetCurResource (IsaAcpi, IsaDevice, &ResourceList);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ IsaBusControllerDriverStart (
|
||||
&DevicePathData
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@ -386,7 +386,7 @@ IsaBusControllerDriverStart (
|
||||
//
|
||||
// Report Status Code here when failed to resource conflicts
|
||||
//
|
||||
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
|
||||
if (EFI_ERROR(Status) && (Status != EFI_UNSUPPORTED)) {
|
||||
//
|
||||
// It's hard to tell which resource conflicts
|
||||
//
|
||||
@ -463,7 +463,7 @@ IsaBusControllerDriverStop (
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ IsaBusControllerDriverStop (
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ IsaBusControllerDriverStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
||||
IsaIoDevice = ISA_IO_DEVICE_FROM_ISA_IO_THIS (IsaIo);
|
||||
|
||||
@ -523,9 +523,9 @@ IsaBusControllerDriverStop (
|
||||
NULL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
FreePool (IsaIoDevice->DevicePath);
|
||||
FreePool (IsaIoDevice);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
FreePool(IsaIoDevice->DevicePath);
|
||||
FreePool(IsaIoDevice);
|
||||
} else {
|
||||
//
|
||||
// Re-open PCI IO Protocol on behalf of the child device
|
||||
@ -542,7 +542,7 @@ IsaBusControllerDriverStop (
|
||||
}
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
}
|
||||
}
|
||||
@ -635,7 +635,7 @@ IsaCreateDevice (
|
||||
&IsaIoDevice->IsaIo,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ IsaCreateDevice (
|
||||
IsaIoDevice->Handle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
IsaIoDevice->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
@ -660,12 +660,12 @@ IsaCreateDevice (
|
||||
|
||||
Done:
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (IsaIoDevice->DevicePath != NULL) {
|
||||
FreePool (IsaIoDevice->DevicePath);
|
||||
FreePool(IsaIoDevice->DevicePath);
|
||||
}
|
||||
|
||||
FreePool (IsaIoDevice);
|
||||
FreePool(IsaIoDevice);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -144,7 +144,7 @@ IsaIoIoRead (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ IsaIoIoRead (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -206,7 +206,7 @@ IsaIoIoWrite (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ IsaIoIoWrite (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -261,7 +261,7 @@ WritePort (
|
||||
1,
|
||||
&Value
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -302,22 +302,22 @@ WriteDmaPort (
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = WritePort (This, AddrOffset, (UINT8) (BaseAddress & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, AddrOffset, (UINT8) ((BaseAddress >> 8) & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, PageOffset, (UINT8) ((BaseAddress >> 16) & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, CountOffset, (UINT8) (Count & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ IsaIoUnmap (
|
||||
// Free the mapped buffer and the MAP_INFO structure.
|
||||
//
|
||||
gBS->FreePages (IsaMapInfo->MappedHostAddress, IsaMapInfo->NumberOfPages);
|
||||
FreePool (IsaMapInfo);
|
||||
FreePool(IsaMapInfo);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@ -404,7 +404,7 @@ IsaIoFlush (
|
||||
|
||||
Status = IsaIoDevice->PciIo->Flush (IsaIoDevice->PciIo);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -523,7 +523,7 @@ IsaIoMemRead (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ IsaIoMemRead (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -592,7 +592,7 @@ IsaIoMemWrite (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ IsaIoMemWrite (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -661,7 +661,7 @@ IsaIoCopyMem (
|
||||
Count,
|
||||
DestOffset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -672,7 +672,7 @@ IsaIoCopyMem (
|
||||
Count,
|
||||
SrcOffset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -686,7 +686,7 @@ IsaIoCopyMem (
|
||||
Count
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -819,8 +819,8 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
IsaMapInfo->NumberOfPages,
|
||||
&IsaMapInfo->MappedHostAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (IsaMapInfo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(IsaMapInfo);
|
||||
*NumberOfBytes = 0;
|
||||
*Mapping = NULL;
|
||||
return Status;
|
||||
@ -890,7 +890,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
DmaMask,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -899,12 +899,12 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
DmaClear,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, DmaChannelMode, DmaMode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -916,7 +916,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
BaseAddress,
|
||||
Count
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -925,7 +925,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
DmaMask,
|
||||
(UINT8) (ChannelNumber & 0x03)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1122,8 +1122,8 @@ IsaIoMapFullSupport (
|
||||
IsaMapInfo->NumberOfPages,
|
||||
&IsaMapInfo->MappedHostAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (IsaMapInfo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(IsaMapInfo);
|
||||
*NumberOfBytes = 0;
|
||||
*Mapping = NULL;
|
||||
return Status;
|
||||
@ -1216,7 +1216,7 @@ IsaIoMapFullSupport (
|
||||
DmaMask,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1225,12 +1225,12 @@ IsaIoMapFullSupport (
|
||||
DmaClear,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, DmaChannelMode, DmaMode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1242,7 +1242,7 @@ IsaIoMapFullSupport (
|
||||
BaseAddress,
|
||||
Count
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1251,7 +1251,7 @@ IsaIoMapFullSupport (
|
||||
DmaMask,
|
||||
(UINT8) (ChannelNumber & 0x03)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1405,7 +1405,7 @@ IsaIoAllocateBuffer (
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePages (Type, MemoryType, Pages, &PhysicalAddress);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -1451,7 +1451,7 @@ IsaIoFreeBuffer (
|
||||
(EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress,
|
||||
Pages
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
|
@ -57,7 +57,7 @@ InitializeIsaIo (
|
||||
&gIsaIoComponentName,
|
||||
&gIsaIoComponentName2
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@ -101,14 +101,14 @@ IsaIoDriverSupported (
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Get the PciIo protocol from its parent controller.
|
||||
//
|
||||
Status = gBS->LocateDevicePath (&gEfiPciIoProtocolGuid, &DevicePath, &PciHandle);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ IsaIoDriverSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiSioProtocolGuid,
|
||||
@ -192,7 +192,7 @@ IsaIoDriverStart (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -201,9 +201,9 @@ IsaIoDriverStart (
|
||||
//
|
||||
TempDevicePath = DevicePath;
|
||||
Status = gBS->LocateDevicePath (&gEfiPciIoProtocolGuid, &TempDevicePath, &PciHandle);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->HandleProtocol (PciHandle, &gEfiPciIoProtocolGuid, (VOID **) &PciIo);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
// Open Super IO Protocol
|
||||
@ -218,7 +218,7 @@ IsaIoDriverStart (
|
||||
);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// Fail due to LocateDevicePath(...) or OpenProtocol(Sio, BY_DRIVER)
|
||||
//
|
||||
@ -226,7 +226,7 @@ IsaIoDriverStart (
|
||||
}
|
||||
|
||||
Status = Sio->GetResources (Sio, &Resources);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
IsaIoDevice = AllocatePool (sizeof (ISA_IO_DEVICE));
|
||||
ASSERT (IsaIoDevice != NULL);
|
||||
@ -248,7 +248,7 @@ IsaIoDriverStart (
|
||||
&IsaIoDevice->IsaIo,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -299,7 +299,7 @@ IsaIoDriverStop (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@ -311,15 +311,15 @@ IsaIoDriverStop (
|
||||
&IsaIoDevice->IsaIo,
|
||||
NULL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiSioProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
FreePool (IsaIoDevice->IsaIo.ResourceList);
|
||||
FreePool (IsaIoDevice);
|
||||
FreePool(IsaIoDevice->IsaIo.ResourceList);
|
||||
FreePool(IsaIoDevice);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -544,7 +544,7 @@ IsaIoIoRead (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -557,7 +557,7 @@ IsaIoIoRead (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -606,7 +606,7 @@ IsaIoIoWrite (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -619,7 +619,7 @@ IsaIoIoWrite (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -661,7 +661,7 @@ WritePort (
|
||||
1,
|
||||
&Value
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -705,22 +705,22 @@ WriteDmaPort (
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = WritePort (This, AddrOffset, (UINT8) (BaseAddress & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, AddrOffset, (UINT8) ((BaseAddress >> 8) & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, PageOffset, (UINT8) ((BaseAddress >> 16) & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, CountOffset, (UINT8) (Count & 0xff));
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -780,7 +780,7 @@ IsaIoUnmap (
|
||||
// Free the mapped buffer and the MAP_INFO structure.
|
||||
//
|
||||
gBS->FreePages (IsaMapInfo->MappedHostAddress, IsaMapInfo->NumberOfPages);
|
||||
FreePool (IsaMapInfo);
|
||||
FreePool(IsaMapInfo);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@ -807,7 +807,7 @@ IsaIoFlush (
|
||||
|
||||
Status = IsaIoDevice->PciIo->Flush (IsaIoDevice->PciIo);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -863,7 +863,7 @@ IsaIoMemRead (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -876,7 +876,7 @@ IsaIoMemRead (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -932,7 +932,7 @@ IsaIoMemWrite (
|
||||
Count,
|
||||
Offset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -945,7 +945,7 @@ IsaIoMemWrite (
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -1001,7 +1001,7 @@ IsaIoCopyMem (
|
||||
Count,
|
||||
DestOffset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1012,7 +1012,7 @@ IsaIoCopyMem (
|
||||
Count,
|
||||
SrcOffset
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1026,7 +1026,7 @@ IsaIoCopyMem (
|
||||
Count
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -1159,8 +1159,8 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
IsaMapInfo->NumberOfPages,
|
||||
&IsaMapInfo->MappedHostAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (IsaMapInfo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(IsaMapInfo);
|
||||
*NumberOfBytes = 0;
|
||||
*Mapping = NULL;
|
||||
return Status;
|
||||
@ -1230,7 +1230,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
DmaMask,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1239,12 +1239,12 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
DmaClear,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, DmaChannelMode, DmaMode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1256,7 +1256,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
BaseAddress,
|
||||
Count
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1265,7 +1265,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
DmaMask,
|
||||
(UINT8) (ChannelNumber & 0x03)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1462,8 +1462,8 @@ IsaIoMapFullSupport (
|
||||
IsaMapInfo->NumberOfPages,
|
||||
&IsaMapInfo->MappedHostAddress
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (IsaMapInfo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(IsaMapInfo);
|
||||
*NumberOfBytes = 0;
|
||||
*Mapping = NULL;
|
||||
return Status;
|
||||
@ -1556,7 +1556,7 @@ IsaIoMapFullSupport (
|
||||
DmaMask,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1565,12 +1565,12 @@ IsaIoMapFullSupport (
|
||||
DmaClear,
|
||||
(UINT8) (B_8237_DMA_WRSMSK_CMS | (ChannelNumber & 0x03))
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = WritePort (This, DmaChannelMode, DmaMode);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1582,7 +1582,7 @@ IsaIoMapFullSupport (
|
||||
BaseAddress,
|
||||
Count
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1591,7 +1591,7 @@ IsaIoMapFullSupport (
|
||||
DmaMask,
|
||||
(UINT8) (ChannelNumber & 0x03)
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1745,7 +1745,7 @@ IsaIoAllocateBuffer (
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePages (Type, MemoryType, Pages, &PhysicalAddress);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
@ -1791,7 +1791,7 @@ IsaIoFreeBuffer (
|
||||
(EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress,
|
||||
Pages
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR
|
||||
|
@ -193,7 +193,7 @@ IsaSerialComponentNameGetControllerName (
|
||||
gSerialControllerDriver.DriverBindingHandle,
|
||||
&gEfiIsaIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ IsaSerialComponentNameGetControllerName (
|
||||
ChildHandle,
|
||||
&gEfiIsaIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ IsaSerialComponentNameGetControllerName (
|
||||
ChildHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user