mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-11 07:04:22 +00:00
refactor(handoff): downgrade error messages
Some APIs, like `transfer_list_check_header`, are used preemptively to determine if a new TL needs to be initialized. If we validate a TL and anticipate its contents to be invalid or corrupted, logging these as error message isn't helpful. Change-Id: Ic22378828548d48f73aa74d494f110fbd11857f4 Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
This commit is contained in:
parent
037b8b905e
commit
e13d027b70
1 changed files with 6 additions and 9 deletions
|
@ -176,35 +176,32 @@ transfer_list_check_header(const struct transfer_list_header *tl)
|
|||
}
|
||||
|
||||
if (tl->signature != TRANSFER_LIST_SIGNATURE) {
|
||||
ERROR("Bad transfer list signature 0x%x\n", tl->signature);
|
||||
VERBOSE("Bad transfer list signature 0x%x\n", tl->signature);
|
||||
return TL_OPS_NON;
|
||||
}
|
||||
|
||||
if (!tl->max_size) {
|
||||
ERROR("Bad transfer list max size 0x%x\n",
|
||||
tl->max_size);
|
||||
VERBOSE("Bad transfer list max size 0x%x\n", tl->max_size);
|
||||
return TL_OPS_NON;
|
||||
}
|
||||
|
||||
if (tl->size > tl->max_size) {
|
||||
ERROR("Bad transfer list size 0x%x\n", tl->size);
|
||||
VERBOSE("Bad transfer list size 0x%x\n", tl->size);
|
||||
return TL_OPS_NON;
|
||||
}
|
||||
|
||||
if (tl->hdr_size != sizeof(struct transfer_list_header)) {
|
||||
ERROR("Bad transfer list header size 0x%x\n",
|
||||
tl->hdr_size);
|
||||
VERBOSE("Bad transfer list header size 0x%x\n", tl->hdr_size);
|
||||
return TL_OPS_NON;
|
||||
}
|
||||
|
||||
if (!transfer_list_verify_checksum(tl)) {
|
||||
ERROR("Bad transfer list checksum 0x%x\n",
|
||||
tl->checksum);
|
||||
VERBOSE("Bad transfer list checksum 0x%x\n", tl->checksum);
|
||||
return TL_OPS_NON;
|
||||
}
|
||||
|
||||
if (tl->version == 0) {
|
||||
ERROR("Transfer list version is invalid\n");
|
||||
VERBOSE("Transfer list version is invalid\n");
|
||||
return TL_OPS_NON;
|
||||
} else if (tl->version == TRANSFER_LIST_VERSION) {
|
||||
INFO("Transfer list version is valid for all operations\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue