mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
Merge "fix(handoff): correct representation of tag_id" into integration
This commit is contained in:
commit
0cf4fda900
2 changed files with 11 additions and 13 deletions
|
@ -75,9 +75,8 @@ struct transfer_list_header {
|
|||
*/
|
||||
};
|
||||
|
||||
struct transfer_list_entry {
|
||||
uint16_t tag_id;
|
||||
uint8_t reserved0; /* place holder */
|
||||
struct __attribute__((packed)) transfer_list_entry {
|
||||
uint32_t tag_id : 24;
|
||||
uint8_t hdr_size;
|
||||
uint32_t data_size;
|
||||
/*
|
||||
|
@ -91,6 +90,8 @@ struct transfer_list_entry {
|
|||
*/
|
||||
};
|
||||
|
||||
CASSERT(sizeof(struct transfer_list_entry) == U(0x8), assert_transfer_list_entry_size);
|
||||
|
||||
void transfer_list_dump(struct transfer_list_header *tl);
|
||||
entry_point_info_t *
|
||||
transfer_list_set_handoff_args(struct transfer_list_header *tl,
|
||||
|
@ -115,12 +116,12 @@ bool transfer_list_rem(struct transfer_list_header *tl,
|
|||
struct transfer_list_entry *entry);
|
||||
|
||||
struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl,
|
||||
uint16_t tag_id,
|
||||
uint32_t tag_id,
|
||||
uint32_t data_size,
|
||||
const void *data);
|
||||
|
||||
struct transfer_list_entry *
|
||||
transfer_list_add_with_align(struct transfer_list_header *tl, uint16_t tag_id,
|
||||
transfer_list_add_with_align(struct transfer_list_header *tl, uint32_t tag_id,
|
||||
uint32_t data_size, const void *data,
|
||||
uint8_t alignment);
|
||||
|
||||
|
@ -129,7 +130,7 @@ transfer_list_next(struct transfer_list_header *tl,
|
|||
struct transfer_list_entry *last);
|
||||
|
||||
struct transfer_list_entry *transfer_list_find(struct transfer_list_header *tl,
|
||||
uint16_t tag_id);
|
||||
uint32_t tag_id);
|
||||
|
||||
#endif /*__ASSEMBLER__*/
|
||||
#endif /*__TRANSFER_LIST_H*/
|
||||
|
|
|
@ -366,7 +366,6 @@ bool transfer_list_set_data_size(struct transfer_list_header *tl,
|
|||
/* create a dummy TE to fill up the gap */
|
||||
dummy_te = (struct transfer_list_entry *)new_ev;
|
||||
dummy_te->tag_id = TL_TAG_EMPTY;
|
||||
dummy_te->reserved0 = 0;
|
||||
dummy_te->hdr_size = sizeof(*dummy_te);
|
||||
dummy_te->data_size = gap - sizeof(*dummy_te);
|
||||
}
|
||||
|
@ -388,7 +387,6 @@ bool transfer_list_rem(struct transfer_list_header *tl,
|
|||
return false;
|
||||
}
|
||||
te->tag_id = TL_TAG_EMPTY;
|
||||
te->reserved0 = 0;
|
||||
transfer_list_update_checksum(tl);
|
||||
return true;
|
||||
}
|
||||
|
@ -399,7 +397,7 @@ bool transfer_list_rem(struct transfer_list_header *tl,
|
|||
* Return pointer to the added transfer entry or NULL on error
|
||||
******************************************************************************/
|
||||
struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl,
|
||||
uint16_t tag_id,
|
||||
uint32_t tag_id,
|
||||
uint32_t data_size,
|
||||
const void *data)
|
||||
{
|
||||
|
@ -428,7 +426,6 @@ struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl,
|
|||
|
||||
te = (struct transfer_list_entry *)tl_ev;
|
||||
te->tag_id = tag_id;
|
||||
te->reserved0 = 0;
|
||||
te->hdr_size = sizeof(*te);
|
||||
te->data_size = data_size;
|
||||
tl->size += ev - tl_ev;
|
||||
|
@ -454,7 +451,7 @@ struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl,
|
|||
* Return pointer to the added transfer entry or NULL on error
|
||||
******************************************************************************/
|
||||
struct transfer_list_entry *
|
||||
transfer_list_add_with_align(struct transfer_list_header *tl, uint16_t tag_id,
|
||||
transfer_list_add_with_align(struct transfer_list_header *tl, uint32_t tag_id,
|
||||
uint32_t data_size, const void *data,
|
||||
uint8_t alignment)
|
||||
{
|
||||
|
@ -501,13 +498,13 @@ transfer_list_add_with_align(struct transfer_list_header *tl, uint16_t tag_id,
|
|||
* Return pointer to the found transfer entry or NULL on error
|
||||
******************************************************************************/
|
||||
struct transfer_list_entry *transfer_list_find(struct transfer_list_header *tl,
|
||||
uint16_t tag_id)
|
||||
uint32_t tag_id)
|
||||
{
|
||||
struct transfer_list_entry *te = NULL;
|
||||
|
||||
do {
|
||||
te = transfer_list_next(tl, te);
|
||||
} while (te && (te->tag_id != tag_id || te->reserved0 != 0));
|
||||
} while (te && (te->tag_id != tag_id));
|
||||
|
||||
return te;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue