paging.asm 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ; Copyright (C) 2021 Rain
  2. ; This file is part of XNIX.
  3. ; XNIX is free software: you can redistribute it and/or modify
  4. ; it under the terms of the GNU General Public License as published by
  5. ; the Free Software Foundation, either version 3 of the License, or
  6. ; (at your option) and later version.
  7. ; XNIX is distributed in the hope that it will be useful,
  8. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ; GNU General Public License for more details.
  11. ; You should have received a copy of the GNU General Public License
  12. ; along with XNIX. If not, see <https://www.gnu.org/licenses/>.
  13. PATT_PRESENT equ 0x0001
  14. PATT_RDWR equ 0x0002
  15. PATT_USER equ 0x0004
  16. PATT_CACHEMEM equ 0x0008
  17. PATT_NOCACHE equ 0x0010
  18. PATT_ACCESSED equ 0x0020
  19. PATT_DIRTY equ 0x0040
  20. PATT_BIGPAGE equ 0x0080
  21. PATT_GLOBAL equ 0x0100
  22. PATT_PAT equ 0x1000
  23. ; 0x83 it is.
  24. PAGE_KERNEL equ PATT_PRESENT + PATT_RDWR + PATT_BIGPAGE
  25. ; this is linux's 007. (8-based 007)
  26. PAGE_USER equ PATT_PRESENT + PATT_RDWR + PATT_USER + PATT_BIGPAGE
  27. ; yeah, I lost this so will error in loader. :-(
  28. PAGE_DIR equ PATT_PRESENT + PATT_RDWR + PATT_USER