fix [ARL] Check EC device existence on board (#2258)

Check EC device existence before sending command.
The patch prevents waiting for timeout when reading BoardId.

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
This commit is contained in:
tsaikevin 2024-08-15 20:47:03 -07:00 committed by GitHub
parent 13a07c93f5
commit 0db19df9b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ SendEcCommandTimeout (
// Wait for EC to be ready (with a timeout)
//
ReceiveEcStatus (&EcStatus);
if (EcStatus == 0xFF) {
return EFI_DEVICE_ERROR;
}
//
// Check if output buffer bit(OBF) is set.
// Read and discard the output buffer data so that next BIOS-EC cmd is in sync