Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel'
[palacios.git] / kitten / include / arch-x86_64 / page_table.h
1 #ifndef _ARCH_X86_64_PAGE_TABLE_H
2 #define _ARCH_X86_64_PAGE_TABLE_H
3
4 typedef struct {
5         uint64_t
6                 present    :1,  /* Is there a physical page? */
7                 write      :1,  /* Is the page writable? */
8                 user       :1,  /* Is the page accessible to user-space? */
9                 pwt        :1,  /* Is the page write-through cached? */
10                 pcd        :1,  /* Is the page uncached? */
11                 accessed   :1,  /* Has the page been read? */
12                 dirty      :1,  /* Has the page been written to? */
13                 pagesize   :1,  /* 0 == 4KB, 1 == (2 MB || 1 GB) */
14                 global     :1,  /* Is the page mapped in all address spaces? */
15                 os_bits_1  :3,  /* Available for us! */
16                 base_paddr :40, /* Bits [51,12] of base address. */
17                 os_bits_2  :11, /* Available for us! */
18                 no_exec    :1;  /* Is the page executable? */
19 } xpte_t;
20
21 typedef struct {
22         uint64_t
23                 present    :1,  /* Is there a physical page? */
24                 write      :1,  /* Is the page writable? */
25                 user       :1,  /* Is the page accessible to user-space? */
26                 pwt        :1,  /* Is the page write-through cached? */
27                 pcd        :1,  /* Is the page uncached? */
28                 accessed   :1,  /* Has the page been read? */
29                 dirty      :1,  /* Has the page been written to? */
30                 pat        :1,  /* Page attribute table bit. */
31                 global     :1,  /* Is the page mapped in all address spaces? */
32                 os_bits_1  :3,  /* Available for us! */
33                 base_paddr :40, /* Bits [51,12] of page's base physical addr. */
34                 os_bits_2  :11, /* Available for us! */
35                 no_exec    :1;  /* Is the page executable? */
36 } xpte_4KB_t;
37
38 typedef struct {
39         uint64_t
40                 present    :1,  /* Is there a physical page? */
41                 write      :1,  /* Is the page writable? */
42                 user       :1,  /* Is the page accessible to user-space? */
43                 pwt        :1,  /* Is the page write-through cached? */
44                 pcd        :1,  /* Is the page uncached? */
45                 accessed   :1,  /* Has the page been read? */
46                 dirty      :1,  /* Has the page been written to? */
47                 must_be_1  :1,  /* Must be 1 to indicate a 2 MB page. */
48                 global     :1,  /* Is the page mapped in all address spaces? */
49                 os_bits_1  :3,  /* Available for us! */
50                 pat        :1,  /* Page attribute table bit. */
51                 must_be_0  :8,  /* Reserved, must be zero. */
52                 base_paddr :31, /* Bits [51,21] of page's base physical addr. */
53                 os_bits_2  :11, /* Available for us! */
54                 no_exec    :1;  /* Is the page executable? */
55 } xpte_2MB_t;
56
57 typedef struct {
58         uint64_t
59                 present    :1,  /* Is there a physical page? */
60                 write      :1,  /* Is the page writable? */
61                 user       :1,  /* Is the page accessible to user-space? */
62                 pwt        :1,  /* Is the page write-through cached? */
63                 pcd        :1,  /* Is the page uncached? */
64                 accessed   :1,  /* Has the page been read? */
65                 dirty      :1,  /* Has the page been written to? */
66                 must_be_1  :1,  /* Must be 1 to indicate a 1GB page. */
67                 global     :1,  /* Is the page mapped in all address spaces? */
68                 os_bits_1  :3,  /* Available for us! */
69                 pat        :1,  /* Page attribute table bit. */
70                 must_be_0  :17, /* Reserved, must be zero. */
71                 base_paddr :22, /* Bits [51,30] of page's base physical addr. */
72                 os_bits_2  :11, /* Available for us! */
73                 no_exec    :1;  /* Is the page executable? */
74 } xpte_1GB_t;
75
76 #endif