]> Zhao Yanbai Git Server - minix.git/commitdiff
Rename sys_vmctl_get_cr3_i386
authorArun Thomas <arun@minix3.org>
Sat, 11 Aug 2012 15:45:35 +0000 (17:45 +0200)
committerArun Thomas <arun@minix3.org>
Sun, 12 Aug 2012 21:30:54 +0000 (23:30 +0200)
include/minix/com.h
include/minix/syslib.h
kernel/arch/i386/arch_do_vmctl.c
lib/libsys/sys_vmctl.c
servers/vm/arch/i386/pagetable.c

index 2e99f10682564bb067a5206ddb266094aeb7910c..9bf3a411db0f0c2867732d909cfc2bdce5a0a7fc 100644 (file)
 
 /* Values for SVMCTL_PARAM. */
 #define VMCTL_CLEAR_PAGEFAULT  12
-#define VMCTL_I386_GETCR3      13
-#define VMCTL_MEMREQ_GET       14
+#define VMCTL_GET_PDBR         13
+#define VMCTL_MEMREQ_GET       14
 #define VMCTL_MEMREQ_REPLY     15
 #define VMCTL_NOPAGEZERO       18
 #define VMCTL_I386_KERNELLIMIT 19
index 8aaf287153e5cac1dbf296051909501891e84e91..7614a0259c7e8d53f32051e543e9428d5e994a2f 100644 (file)
@@ -66,7 +66,7 @@ int sys_vm_setbuf(phys_bytes base, phys_bytes size, phys_bytes high);
 int sys_vm_map(endpoint_t proc_ep, int do_map, phys_bytes base,
        phys_bytes size, phys_bytes offset);
 int sys_vmctl(endpoint_t who, int param, u32_t value);
-int sys_vmctl_get_cr3_i386(endpoint_t who, u32_t *cr3);
+int sys_vmctl_get_pdbr(endpoint_t who, u32_t *pdbr);
 int sys_vmctl_get_memreq(endpoint_t *who, vir_bytes *mem, vir_bytes
        *len, int *wrflag, endpoint_t *who_s, vir_bytes *mem_s, endpoint_t *);
 int sys_vmctl_enable_paging(void * data);
index bb134c680a2eb3b1696e348df9a1ceba6eab1967..c6f36ec46ba28e37ea3fefe8941ddbcca70053b5 100644 (file)
@@ -41,8 +41,8 @@ register message *m_ptr;      /* pointer to request message */
 struct proc *p;
 {
   switch(m_ptr->SVMCTL_PARAM) {
-       case VMCTL_I386_GETCR3:
-               /* Get process CR3. */
+       case VMCTL_GET_PDBR:
+               /* Get process page directory base reg (CR3). */
                m_ptr->SVMCTL_VALUE = p->p_seg.p_cr3;
                return OK;
        case VMCTL_SETADDRSPACE:
index 08951f65cfed344f06de912637e18cb08147a207..f7472ece0db522ac3523ef18d2467cbb2dc612c3 100644 (file)
@@ -12,16 +12,17 @@ int sys_vmctl(endpoint_t who, int param, u32_t value)
   return(r);
 }
 
-int sys_vmctl_get_cr3_i386(endpoint_t who, u32_t *cr3)
+/* Get page directory base register */
+int sys_vmctl_get_pdbr(endpoint_t who, u32_t *pdbr)
 {
   message m;
   int r;
 
   m.SVMCTL_WHO = who;
-  m.SVMCTL_PARAM = VMCTL_I386_GETCR3;
+  m.SVMCTL_PARAM = VMCTL_GET_PDBR;
   r = _kernel_call(SYS_VMCTL, &m);
   if(r == OK) {
-       *cr3 = m.SVMCTL_VALUE;
+       *pdbr = m.SVMCTL_VALUE;
   }
   return(r);
 }
index 6831ec3c2278a1861ad1f4f84a9ddc068ee82481..67a99d2f2e975a7baff74207b6db4c5518170459 100644 (file)
@@ -859,7 +859,7 @@ void pt_init(void)
        vir_bytes sparepages_mem;
        static u32_t currentpagedir[I386_VM_DIR_ENTRIES];
        int m = kernel_boot_info.kern_mod;
-       u32_t mycr3;
+       u32_t mypdbr; /* Page Directory Base Register (cr3) value */
 
        /* Find what the physical location of the kernel is. */
        assert(m >= 0);
@@ -978,9 +978,9 @@ void pt_init(void)
                panic("vm pt_new failed");
 
        /* Get our current pagedir so we can see it. */
-       if(sys_vmctl_get_cr3_i386(SELF, &mycr3) != OK)
-               panic("VM: sys_vmctl_get_cr3_i386 failed");
-       if(sys_vircopy(NONE, mycr3, SELF, 
+       if(sys_vmctl_get_pdbr(SELF, &mypdbr) != OK)
+               panic("VM: sys_vmctl_get_pdbr failed");
+       if(sys_vircopy(NONE, mypdbr, SELF,
                (vir_bytes) currentpagedir, I386_PAGE_SIZE) != OK)
                panic("VM: sys_vircopy failed");