Changes to includes for VM, IOPL, logging. Increased _NR_PROCS, CLICK_SIZE is
now 4096.
This commit is contained in:
parent
5f7b803dcd
commit
31c1d6bf0d
6 changed files with 45 additions and 4 deletions
|
@ -216,8 +216,11 @@
|
|||
# define SYS_TIMES (KERNEL_CALL + 25) /* sys_times() */
|
||||
# define SYS_GETINFO (KERNEL_CALL + 26) /* sys_getinfo() */
|
||||
# define SYS_ABORT (KERNEL_CALL + 27) /* sys_abort() */
|
||||
# define SYS_IOPENABLE (KERNEL_CALL + 28) /* sys_enable_iop() */
|
||||
# define SYS_VM_SETBUF (KERNEL_CALL + 29) /* sys_vm_setbuf() */
|
||||
# define SYS_VM_MAP (KERNEL_CALL + 30) /* sys_vm_map() */
|
||||
|
||||
#define NR_SYS_CALLS 28 /* number of system calls */
|
||||
#define NR_SYS_CALLS 31 /* number of system calls */
|
||||
|
||||
/* Field names for SYS_MEMSET, SYS_SEGCTL. */
|
||||
#define MEM_PTR m2_p1 /* base */
|
||||
|
@ -408,5 +411,8 @@
|
|||
# define DIAG_PRINT_BUF m1_p1
|
||||
# define DIAG_BUF_COUNT m1_i1
|
||||
# define DIAG_PROC_NR m1_i2
|
||||
#define GET_KMESS 101 /* get kmess from TTY */
|
||||
# define GETKM_PTR m1_p1
|
||||
|
||||
|
||||
#endif /* _MINIX_COM_H */
|
||||
|
|
|
@ -72,8 +72,8 @@
|
|||
|
||||
/* Memory is allocated in clicks. */
|
||||
#if (CHIP == INTEL)
|
||||
#define CLICK_SIZE 1024 /* unit in which memory is allocated */
|
||||
#define CLICK_SHIFT 10 /* log2 of CLICK_SIZE */
|
||||
#define CLICK_SIZE 4096 /* unit in which memory is allocated */
|
||||
#define CLICK_SHIFT 12 /* log2 of CLICK_SIZE */
|
||||
#endif
|
||||
|
||||
#if (CHIP == SPARC) || (CHIP == M68000)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define _PTR_SIZE _EM_WSIZE
|
||||
#endif
|
||||
|
||||
#define _NR_PROCS 64
|
||||
#define _NR_PROCS 100
|
||||
#define _NR_SYS_PROCS 32
|
||||
|
||||
/* Set the CHIP type based on the machine selected. The symbol CHIP is actually
|
||||
|
|
|
@ -26,6 +26,7 @@ struct reg86u;
|
|||
_PROTOTYPE( int _taskcall, (int who, int syscallnr, message *msgptr));
|
||||
|
||||
_PROTOTYPE( int sys_abort, (int how, ...));
|
||||
_PROTOTYPE( int sys_enable_iop, (int proc));
|
||||
_PROTOTYPE( int sys_exec, (int proc, char *ptr,
|
||||
char *aout, vir_bytes initpc));
|
||||
_PROTOTYPE( int sys_fork, (int parent, int child));
|
||||
|
@ -37,6 +38,10 @@ _PROTOTYPE( int sys_svrctl, (int proc, int req, int priv,vir_bytes argp));
|
|||
_PROTOTYPE( int sys_nice, (int proc, int priority));
|
||||
|
||||
_PROTOTYPE( int sys_int86, (struct reg86u *reg86p));
|
||||
_PROTOTYPE( int sys_vm_setbuf, (phys_bytes base, phys_bytes size,
|
||||
phys_bytes high));
|
||||
_PROTOTYPE( int sys_vm_map, (int proc_nr, int do_map,
|
||||
phys_bytes base, phys_bytes size, phys_bytes offset));
|
||||
|
||||
/* Shorthands for sys_sdevio() system call. */
|
||||
#define sys_insb(port, proc_nr, buffer, count) \
|
||||
|
|
|
@ -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
28
include/sys/vm.h
Normal 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 */
|
Loading…
Reference in a new issue