pgtable-hwdef.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * linux/arch/unicore32/include/asm/pgtable-hwdef.h
  3. *
  4. * Code specific to PKUnity SoC and UniCore ISA
  5. *
  6. * Copyright (C) 2001-2010 GUAN Xue-tao
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __UNICORE_PGTABLE_HWDEF_H__
  13. #define __UNICORE_PGTABLE_HWDEF_H__
  14. /*
  15. * Hardware page table definitions.
  16. *
  17. * + Level 1 descriptor (PMD)
  18. * - common
  19. */
  20. #define PMD_TYPE_MASK (3 << 0)
  21. #define PMD_TYPE_TABLE (0 << 0)
  22. /*#define PMD_TYPE_LARGE (1 << 0) */
  23. #define PMD_TYPE_INVALID (2 << 0)
  24. #define PMD_TYPE_SECT (3 << 0)
  25. #define PMD_PRESENT (1 << 2)
  26. #define PMD_YOUNG (1 << 3)
  27. /*#define PMD_SECT_DIRTY (1 << 4) */
  28. #define PMD_SECT_CACHEABLE (1 << 5)
  29. #define PMD_SECT_EXEC (1 << 6)
  30. #define PMD_SECT_WRITE (1 << 7)
  31. #define PMD_SECT_READ (1 << 8)
  32. /*
  33. * + Level 2 descriptor (PTE)
  34. * - common
  35. */
  36. #define PTE_TYPE_MASK (3 << 0)
  37. #define PTE_TYPE_SMALL (0 << 0)
  38. #define PTE_TYPE_MIDDLE (1 << 0)
  39. #define PTE_TYPE_LARGE (2 << 0)
  40. #define PTE_TYPE_INVALID (3 << 0)
  41. #define PTE_PRESENT (1 << 2)
  42. #define PTE_YOUNG (1 << 3)
  43. #define PTE_DIRTY (1 << 4)
  44. #define PTE_CACHEABLE (1 << 5)
  45. #define PTE_EXEC (1 << 6)
  46. #define PTE_WRITE (1 << 7)
  47. #define PTE_READ (1 << 8)
  48. #endif