/* 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 . */ #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_PAT | PAGE_WTHROUGH) #define PAGE_TABLE_BASE 0 #endif