git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restructure the interrupt vector distribution for better matching of their inherit...
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
mm
/
page.h
diff --git
a/lunaix-os/includes/lunaix/mm/page.h
b/lunaix-os/includes/lunaix/mm/page.h
index 935909cbbeb17f401dc49a38b1c3c57865dae5fe..415ea9e09847c1d4177c0f2d8eadd9b328820880 100644
(file)
--- a/
lunaix-os/includes/lunaix/mm/page.h
+++ b/
lunaix-os/includes/lunaix/mm/page.h
@@
-1,7
+1,7
@@
#ifndef __LUNAIX_PAGE_H
#define __LUNAIX_PAGE_H
#include <stdint.h>
#ifndef __LUNAIX_PAGE_H
#define __LUNAIX_PAGE_H
#include <stdint.h>
-#include <lunaix/co
nstants
.h>
+#include <lunaix/co
mmon
.h>
#define PG_SIZE_BITS 12
#define PG_SIZE (1 << PG_SIZE_BITS)
#define PG_SIZE_BITS 12
#define PG_SIZE (1 << PG_SIZE_BITS)
@@
-46,6
+46,9
@@
#define PG_ENTRY_FLAGS(entry) (entry & 0xFFFU)
#define PG_ENTRY_ADDR(entry) (entry & ~0xFFFU)
#define PG_ENTRY_FLAGS(entry) (entry & 0xFFFU)
#define PG_ENTRY_ADDR(entry) (entry & ~0xFFFU)
+#define HAS_FLAGS(entry, flags) ((PG_ENTRY_FLAGS(entry) & (flags)) == flags)
+#define CONTAINS_FLAGS(entry, flags) (PG_ENTRY_FLAGS(entry) & (flags))
+
#define PG_PREM_R PG_PRESENT
#define PG_PREM_RW PG_PRESENT | PG_WRITE
#define PG_PREM_UR PG_PRESENT | PG_ALLOW_USER
#define PG_PREM_R PG_PRESENT
#define PG_PREM_RW PG_PRESENT | PG_WRITE
#define PG_PREM_UR PG_PRESENT | PG_ALLOW_USER