-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RW memory layout TE #36
Add RW memory layout TE #36
Conversation
3223615
to
bb388c7
Compare
source/transfer_list.rst
Outdated
|
||
This type defines the layout of a region of read-write memory that a client can | ||
allocate into its memory map. If other memory types are required (i.e. | ||
read-only memory), separate TE's should be defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds very specific to a single project (TF-A?), so it should probably go in the TE section for that. At least I wouldn't know from this description what to do with this entry if I encountered it in my firmware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right. The structure this TE represents is fairly simple:
typedef struct meminfo {
uintptr_t total_base;
size_t total_size;
} meminfo_t;
This to me seems adaptable to other contexts, although i'm yet to find any concrete examples. In any case, I've moved it to TF-A's namespace. If a more general use case materialises then we can consider adding it back.
74d5f48
to
925354b
Compare
XFERLIST_RW_MEM_LAYOUT64 is used to specify an extent of read-write memory that a client can use. The TE pertains to TF-A and is relevant only for 64-bit architectures. Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
925354b
to
9d7c7e7
Compare
source/transfer_list.rst
Outdated
extent of memory it has available to perform read-write operations on. BL2 maps | ||
the memory described by the layout into its memory map during platform setup. If | ||
other memory types are required (i.e. read-only memory) separate TE's should be | ||
defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to generalise this to include any 'next phase'??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? I refer to its usage in BL2 here only as a concrete example, but it very well could be used in other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then please put 'For example, ...' in a separate paragraph so it is clear
source/transfer_list.rst
Outdated
**Read-Write Memory Layout Entry Layout (XFERLIST_RW_MEM_LAYOUT64)** | ||
|
||
This entry type holds a structure that describes the layout of a read-write | ||
memory region. TF-A defines this structure and uses it to convey to BL2 the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the sentences after the first be written as an example? It seems that this information could be used elsewhere
source/transfer_list.rst
Outdated
extent of memory it has available to perform read-write operations on. BL2 maps | ||
the memory described by the layout into its memory map during platform setup. If | ||
other memory types are required (i.e. read-only memory) separate TE's should be | ||
defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then please put 'For example, ...' in a separate paragraph so it is clear
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
0781106
to
bac06ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good. Just minor comments.
source/transfer_list.rst
Outdated
|
||
* - size | ||
- 8 | ||
- hdr_size + 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same again. use 0x8.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (with nit)
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
`TL_TAG_RW_MEM_LAYOUT64` encapsulates a structure used to represent the layout of a region of memory on 64-bit platforms [2]. In TF-A this is used to represent the `meminfo_t` structure passed between BL1 and BL2, which provides BL2 with information about the space it has available in BL2. The `TL_TAG_TB_FW_CONFIG` entry type encapsulates the trusted bootloader firmware configuration [1]. [1] FirmwareHandoff/firmware_handoff#37 [2] FirmwareHandoff/firmware_handoff#36 Change-Id: I1e0eeec2ec204e469896490d42a9dce9b1b2f209 Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
XFERLIST_RW_MEM_LAYOUT64 is used to specify an extent of read-write memory that a client can use. Note, in future if other memory types need representation seperate TE's should be defined (left in the layout description as a point of discussion).