Changes to includes for VM, IOPL, logging. Increased _NR_PROCS, CLICK_SIZE is

now 4096.
This commit is contained in:
Philip Homburg
2005-09-30 12:47:03 +00:00
parent 5f7b803dcd
commit 31c1d6bf0d
6 changed files with 45 additions and 4 deletions

View File

@@ -10,5 +10,7 @@
#include <minix/ioctl.h>
#define MIOCRAMSIZE _IOW('m', 3, u32_t)
#define MIOCMAP _IOR('m', 4, struct mapreq)
#define MIOCUNMAP _IOR('m', 5, struct mapreq)
#endif /* _S_I_MEMORY_H */

28
include/sys/vm.h Normal file
View File

@@ -0,0 +1,28 @@
/*
sys/vm.h
*/
#define PAGE_SIZE 4096
/* MIOCMAP */
struct mapreq
{
void *base;
size_t size;
off_t offset;
int readonly;
};
/* i386 paging constants */
#define I386_VM_PRESENT 0x001 /* Page is present */
#define I386_VM_WRITE 0x002 /* Read/write access allowed */
#define I386_VM_USER 0x004 /* User access allowed */
#define I386_VM_ADDR_MASK 0xFFFFF000 /* physical address */
#define I386_VM_PT_ENT_SIZE 4 /* Size of a page table entry */
#define I386_VM_DIR_ENTRIES 1024 /* Number of entries in a page dir */
#define I386_VM_DIR_ENT_SHIFT 22 /* Shift to get entry in page dir. */
#define I386_VM_PT_ENT_SHIFT 12 /* Shift to get entry in page table */
#define I386_VM_PT_ENT_MASK 0x3FF /* Mask to get entry in page table */
#define I386_CR0_PG 0x80000000 /* Enable paging */