Skip to content

arm64: added memory layout representation #991

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

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

dianpopa
Copy link
Contributor

@dianpopa dianpopa commented Mar 8, 2019

The code follows the memory address mapping of a 64-bit guest.
Link to documentation can be found in the following diff.

Issue #, if available: #757

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dianpopa dianpopa self-assigned this Mar 8, 2019
@dianpopa dianpopa requested a review from a team March 8, 2019 15:51
@serban300 serban300 self-requested a review March 12, 2019 13:19
serban300
serban300 previously approved these changes Mar 12, 2019
@serban300 serban300 requested a review from a team March 12, 2019 13:22
alxiord
alxiord previously approved these changes Mar 12, 2019
@alexandruag alexandruag self-requested a review March 12, 2019 16:25
pub fn arch_memory_regions(size: usize) -> Vec<(GuestAddress, usize)> {
vec![(GuestAddress(0), size)]
let dram_size = min(size, layout::DRAM_MEM_END);
vec![(GuestAddress(layout::DRAM_MEM_START), dram_size)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Judging from the ASCII art above, it seems there are multiple gaps from DRAM_START to DRAM_END, and some of them are even "Hole or DRAM". Does this warrant having multiple memory regions, instead of just one big region from DRAM_START to DRAM_END? Can setting things up with a single region lead to issues because we or the guest accidentally think we can use some memory area that's actually a gap, reserved or some other non-DRAM type of zone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reserved/gap space is a space that exists but reserved for some hidden component. Reserved space does not necessarily mean that it is not available. Let s say that the firmware will need 2 MiB of RAM and then mark them as reserved. Reserved regions were really introduced to tell you that someone stole something from your DRAM. One thing that we could worry about is if the kernel entry point that we are using supports starting a kernel that is loaded at > 16 GiB but we should not have this problem since we are placing the kernel at the start of the RAM.

The code follows the memory address mapping of a 64-bit guest.

Signed-off-by: Diana Popa <[email protected]>
@dianpopa
Copy link
Contributor Author

@aghecenco addressed suggestions. Let me know.

@acatangiu acatangiu merged commit 2e8bfdc into firecracker-microvm:master Mar 13, 2019
@dianpopa dianpopa deleted the i757c branch March 14, 2019 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants