mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
ManageabilityPkg: refactor SsifWriteRequest #1
Separate input validation from argument marshalling. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
This commit is contained in:
parent
be62f3ded5
commit
e8cbfab461
1 changed files with 4 additions and 1 deletions
|
|
@ -68,7 +68,6 @@ SsifWriteRequest (
|
|||
}
|
||||
|
||||
MiddleCount = 0;
|
||||
IsMultiPartWrite = FALSE;
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
if (RequestDataSize > IPMI_SSIF_MAXIMUM_PACKET_SIZE_IN_BYTES) {
|
||||
|
|
@ -80,7 +79,11 @@ SsifWriteRequest (
|
|||
DEBUG ((DEBUG_ERROR, "%a: The request data size exceeds the maximum transfer blocks: RequestDataSize = %d, maximum transfer blocks = %d.\n", __func__, RequestDataSize, (1 << 8) - 1 + 2));
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
IsMultiPartWrite = FALSE;
|
||||
}
|
||||
|
||||
if (IsMultiPartWrite) {
|
||||
MiddleCount = ((RequestDataSize - 1) / IPMI_SSIF_MAXIMUM_PACKET_SIZE_IN_BYTES) - 1;
|
||||
|
||||
if ( ((MiddleCount == 0) && (mTransactionSupport == IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_SINGLE_PARTITION_RW))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue