| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /* Copyright (C) 2021 Rain */
- /* This file is part of XNIX. */
- /*
- XNIX is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) and later version.
- */
- /*
- XNIX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- */
- /*
- You should have received a copy of the GNU General Public License
- along with XNIX. If not, see <https://www.gnu.org/licenses/>.
- */
- #ifndef _PAGING_H
- #define _PAGING_H
- #define PAGE_PRESENT 0x0001
- #define PAGE_RDWR 0x0002
- #define PAGE_USER 0x0004
- #define PAGE_WTHROUGH 0x0008
- #define PAGE_CACHEDIS 0x0010
- #define PAGE_ACCESSED 0x0020
- #define PAGE_DIRTY 0x0040
- #define PAGE_PAT 0x0080
- #define PAGE_GLOBAL 0x0100
- /* 0x83 */
- #define PATT_KERNEL (PAGE_PRESENT | PAGE_RDWR | PAGE_PAT)
- /* 0x07 */
- #define PATT_USER (PAGE_PRESENT | PAGE_RDWR | PAGE_USER | PAGE_PAT)
- #define PATT_DEVMM (PAGE_PRESENT | PAGE_RDWR | PAGE_WTHROUGH | PAGE_CACHEDIS | PAGE_PAT)
- #define PAGE_TABLE_BASE 0
- #endif
|