Physical Memory Manipulation #206
Replies: 3 comments 1 reply
-
IIUC, you want to allocate only physical addresses with that format. This is non-trivial as Bao always allocates physical memory contigously for a given regions. Even when coloring is enabled Bao allocates that region contigously in the allowed colors. What you can do is add another allocator for that pattern, add that information to Let me know if this helps in any way. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. I tried this in two ways, the first one I only modify de pp_alloc and bao inicializes with the correct address in many cases, but yet theres a lot of address that doesn't follow the pattern and the guests doesn't start, so I modified the mem_alloc also. Nonetheless now bao freezes in #starting application on 0x200000. Is it possible that I change the address that bao and the VMs uses to initialize? Is there a way to know these addresses? |
Beta Was this translation helpful? Give feedback.
-
Here is the pp_alloc modified, I only modify add a loop to only accept the address in the pattern that i am interested (the paddr_t candidate_addr). the idea is to reallocate the page until the pattern fits, but after this the guests doesn't inicialize. I tried to modify the mem_map too, but no matter what i tried it always crashes bao, so i just made a simple printk to debug in it.
this is a part of the output that i've got: the ones with the five as the after the three zeros in the end come form the pp_alloc. can you tell me if you that see something is missing or maybe wrong in the logic? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to manipulates de physical memory address inside bao to a certain pattern, is there a way to do this?
The entire address of a given guest (freeRTOS) or a task within a guest is in the format 0xXXXX1XXX;
I tried modify the functions pp_alloc in the core/mem.c and mem_map in core/mmu/mem.c, but bao freezes.
Platform: Raspberry Pi 4b
Demo: Dual-guest Linux+FreeRTOS
Beta Was this translation helpful? Give feedback.
All reactions