From affb4ef01bcd3b8ac316c95738fb5baaf6b17963 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 5 Dec 2020 22:49:24 -0700 Subject: Kernel: Allow specifying a physical alignment when allocating Some drivers may require allocating contiguous physical pages with a specific alignment for the physical address. --- Kernel/VM/ContiguousVMObject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/VM/ContiguousVMObject.h') diff --git a/Kernel/VM/ContiguousVMObject.h b/Kernel/VM/ContiguousVMObject.h index 3c273b6e7b..0cac59d269 100644 --- a/Kernel/VM/ContiguousVMObject.h +++ b/Kernel/VM/ContiguousVMObject.h @@ -35,10 +35,10 @@ class ContiguousVMObject final : public VMObject { public: virtual ~ContiguousVMObject() override; - static NonnullRefPtr create_with_size(size_t); + static NonnullRefPtr create_with_size(size_t, size_t physical_alignment = PAGE_SIZE); private: - explicit ContiguousVMObject(size_t); + explicit ContiguousVMObject(size_t, size_t physical_alignment); explicit ContiguousVMObject(const ContiguousVMObject&); virtual const char* class_name() const override { return "ContiguousVMObject"; } -- cgit v1.2.3