Hi all, I’m trying to understand the code a little bit more. This is kind of a random question. I’m wondering that in a case where we call to allocate a frame using allocman library, where is the physical address of a certain region is stored? In allocman_t there are multiple fields: size_t num_utspace_chunks; struct allocman_utspace_chunk *utspace_chunk; size_t *utspace_chunk_count; struct allocman_utspace_allocation **utspace_chunks; struct allocman_utspace_chunk { size_t size_bits; seL4_Word type; size_t count; }; struct allocman_utspace_allocation { seL4_Word cookie; cspacepath_t slot; }; I didn’t find struct that hold the paddr, also after we create a frame where is that paddr stored? It is stored in slot.capPtr? Also What does the field cookie for? Best Regards -Daniel Wang
Hi Daniel, The physical address is not necessarily stored anywhere, as this is dependent on the specific untyped manager. There is an interface function `allocman_utspace_paddr` (https://github.com/seL4/seL4_libs/blob/master/libsel4allocman/include/allocm...) that will call into the attached untyped manager and ask it for the physical address. This relies on allocman having been told about the physical addresses of untypeds to begin with. Adrian On Wed 07-Mar-2018 6:36 AM, Daniel Wang wrote:
Hi all,
I’m trying to understand the code a little bit more. This is kind of a random question. I’m wondering that in a case where we call to allocate a frame using allocman library, where is the physical address of a certain region is stored?
In allocman_t there are multiple fields:
size_t num_utspace_chunks; struct allocman_utspace_chunk *utspace_chunk; size_t *utspace_chunk_count; struct allocman_utspace_allocation **utspace_chunks;
struct allocman_utspace_chunk { size_t size_bits; seL4_Word type; size_t count; };
struct allocman_utspace_allocation { seL4_Word cookie; cspacepath_t slot; };
I didn’t find struct that hold the paddr, also after we create a frame where is that paddr stored? It is stored in slot.capPtr? Also What does the field cookie for?
Best Regards -Daniel Wang
_______________________________________________ Devel mailing list Devel@sel4.systems https://sel4.systems/lists/listinfo/devel
Hello
The physical address is not necessarily stored anywhere, as this is dependent on the specific untyped manager. There is an interface function `allocman_utspace_paddr` (https://github.com/seL4/seL4_libs/blob/master/libsel4allocman/include/allocm...) that will call into the attached untyped manager and ask it for the physical address. This relies on allocman having been told about the physical addresses of untypeds to begin with.
A time ago, I had several problems with a debugging of memory allocation, and, while most of them are fixed, still do not have the clear understanding how this stuff works. do you have any structured documentation about allocman?
Sorry aside from the comments scattered through various files there is no other documentation. Adrian On Sat 10-Mar-2018 7:06 AM, Vasily A. Sartakov wrote:
Hello
The physical address is not necessarily stored anywhere, as this is dependent on the specific untyped manager. There is an interface function `allocman_utspace_paddr` (https://github.com/seL4/seL4_libs/blob/master/libsel4allocman/include/allocm...) that will call into the attached untyped manager and ask it for the physical address. This relies on allocman having been told about the physical addresses of untypeds to begin with.
A time ago, I had several problems with a debugging of memory allocation, and, while most of them are fixed, still do not have the clear understanding how this stuff works. do you have any structured documentation about allocman?
participants (3)
-
Adrian.Danis@data61.csiro.au
-
Daniel Wang
-
Vasily A. Sartakov