mirror of
https://github.com/tailix/kernel.git
synced 2024-10-30 12:03:52 -04:00
27 lines
732 B
C
27 lines
732 B
C
#ifndef KERNELMQ_INCLUDED_PAGE_DIR
|
|
#define KERNELMQ_INCLUDED_PAGE_DIR 1
|
|
|
|
#include "config.h"
|
|
|
|
#define PAGE_DIR_ALIGN 4096
|
|
|
|
#define PAGE_DIR_ADDR(base) ((base) >> 12)
|
|
|
|
struct PageDir_Entry {
|
|
unsigned int present : 1;
|
|
unsigned int writable : 1;
|
|
unsigned int user : 1;
|
|
unsigned int write_through : 1;
|
|
unsigned int cache_disabled : 1;
|
|
unsigned int accessed : 1;
|
|
unsigned int always_0 : 1;
|
|
unsigned int page_size : 1;
|
|
unsigned int ignored : 1;
|
|
unsigned int unused : 3;
|
|
unsigned int addr : 20;
|
|
}
|
|
__attribute__((packed));
|
|
|
|
typedef struct PageDir_Entry PageDir[PAGE_DIR_LENGTH] __attribute__((aligned((PAGE_DIR_ALIGN))));
|
|
|
|
#endif
|