Skip to content
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

plat/common: Increase granularity of hardcoded legacy high memory #1051

Closed

Conversation

mogasergiu
Copy link
Member

@mogasergiu mogasergiu commented Aug 14, 2023

To ensure compatibility with boot protocols that do report the BIOS System Memory region as a reserved region, split the memory region inserted by ukplat_memregion_list_insert_legacy_hi_mem into two memory region descriptors: one to contain known memory holes (e.g. VGA Text Mode framebuffer) and one to contain the previously mentioned BIOS System Memory region. The former will have read/write permissions to ensure that zones like the VGA framebuffer or certain PCI BARs mapped by the BIOS are writable, while the latter will only have read permissions to ensure compatibility with other boot protocols.

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): [e.g. x86_64 or N/A]
  • Platform(s): [e.g. kvm, xen or N/A]
  • Application(s): [e.g. app-python3 or N/A]

Additional configuration

Description of changes

@mogasergiu mogasergiu requested a review from a team as a code owner August 14, 2023 15:49
@unikraft-bot unikraft-bot added area/plat Unikraft Patform plat/common Common to all platforms labels Aug 14, 2023
@razvand razvand requested review from mschlumpp and michpappas and removed request for a team and dragosargint August 14, 2023 16:28
@razvand razvand added this to the v0.14.0 (Prometheus) milestone Aug 14, 2023
@razvand razvand assigned razvand and unassigned nderjung Aug 14, 2023
mogasergiu added a commit to mogasergiu/unikraft that referenced this pull request Aug 15, 2023
Copy link
Member

@mschlumpp mschlumpp left a comment

Choose a reason for hiding this comment

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

Seems to work in all configurations I tested (QEMU/Firecracker).

Reviewed-by: Marco Schlumpp marco@unikraft.io

To ensure compatibility with boot protocols that do report the
BIOS System Memory region as a reserved region, split the memory
region inserted by `ukplat_memregion_list_insert_legacy_hi_mem`
into two memory region descriptors: one to contain known memory
holes (e.g. VGA Text Mode framebuffer) and one to contain the
previously mentioned BIOS System Memory region. The former will
have read/write permissions to ensure that zones like the VGA
framebuffer or certain PCI BARs mapped by the BIOS are writable,
while the latter will only have read permissions to ensure
compatibility with other boot protocols.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
@unikraft-bot
Copy link
Member

Checkpatch passed

Beep boop! I ran Unikraft's checkpatch.pl support script on your pull request and it all looks good!

SHA commit checkpatch
b77dbd9 plat/common: Increase granularity of hardcoded legacy high memory

Copy link
Member

@michpappas michpappas left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Michalis Pappas michalis@unikraft.io

Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Approved-by: Razvan Deaconescu razvand@unikraft.io

@unikraft-bot unikraft-bot added the ci/merged Merged by CI label Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch/x86_64 area/plat Unikraft Patform ci/merged Merged by CI plat/common Common to all platforms
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

6 participants