1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00

Kernel: Make contiguous VM objects use "user physical pages" by default

If someone specifically wants contiguous memory in the low-physical-
address-for-DMA range ("super pages"), they can use the
allocate_dma_buffer_pages() helper.
This commit is contained in:
Andreas Kling 2022-02-11 12:20:26 +01:00
parent 5ff816abbf
commit 2ff9db0245
3 changed files with 24 additions and 1 deletions

View file

@ -82,7 +82,7 @@ ErrorOr<NonnullRefPtr<AnonymousVMObject>> AnonymousVMObject::try_create_with_siz
ErrorOr<NonnullRefPtr<AnonymousVMObject>> AnonymousVMObject::try_create_physically_contiguous_with_size(size_t size)
{
auto contiguous_physical_pages = TRY(MM.allocate_contiguous_supervisor_physical_pages(size));
auto contiguous_physical_pages = TRY(MM.allocate_contiguous_user_physical_pages(size));
auto new_physical_pages = TRY(FixedArray<RefPtr<PhysicalPage>>::try_create(contiguous_physical_pages.span()));