| // Copyright 2016 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| #ifndef PAGETABLE_H | |
| #define PAGETABLE_H | |
| #include <bit> | |
| #include <cstddef> | |
| inline size_t PageShift() { return std::countr_zero(zx_system_get_page_size()); } | |
| #define PAGE_PRESENT (1 << 0) | |
| #define PAGE_RW (1 << 1) | |
| #define PAGE_USER (1 << 2) | |
| #define PAGE_PWT (1 << 3) | |
| #define PAGE_PCD (1 << 4) | |
| #define PAGE_PAT (1 << 7) | |
| #endif // PAGETABLE_H |