]> Zhao Yanbai Git Server - minix.git/commitdiff
GET_IRQACTIDS, allow SELF in do_vm_map.
authorPhilip Homburg <philip@cs.vu.nl>
Thu, 12 Jan 2006 14:38:51 +0000 (14:38 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Thu, 12 Jan 2006 14:38:51 +0000 (14:38 +0000)
kernel/system/do_getinfo.c
kernel/system/do_vm.c

index 33b7bb7a3a2f6e902904963c3da6cd5c2baaee63..a5791abbf2b53b00878282d215121f0bd5622e10 100644 (file)
@@ -133,6 +133,12 @@ register message *m_ptr;   /* pointer to request message */
        src_phys = vir2phys(&bios_buf_vir);
        break;
 
+    case GET_IRQACTIDS: {
+        length = sizeof(irq_actids);
+        src_phys = vir2phys(irq_actids);
+        break;
+    }
+
     default:
         return(EINVAL);
   }
index 1f77f20a851506dd56c6156b6db2fcd7bebbbbd7..4d2690bd89c8eb1e49f3d50ecb440b003ceeb7b2 100644 (file)
@@ -25,7 +25,7 @@ FORWARD _PROTOTYPE( void map_range, (u32_t base, u32_t size,
                                                        u32_t offset)   );
 
 /*===========================================================================*
- *                             do_vm_setbuf                                 *
+ *                             do_vm_map                                    *
  *===========================================================================*/
 PUBLIC int do_vm_map(m_ptr)
 message *m_ptr;                        /* pointer to request message */
@@ -43,6 +43,8 @@ message *m_ptr;                       /* pointer to request message */
        }
 
        proc_nr= m_ptr->m4_l1;
+       if (proc_nr == SELF)
+               proc_nr= m_ptr->m_source;
        do_map= m_ptr->m4_l2;
        base= m_ptr->m4_l3;
        size= m_ptr->m4_l4;
@@ -207,6 +209,9 @@ u32_t offset;
                }
                entry= offset | I386_VM_USER | I386_VM_WRITE |
                        I386_VM_PRESENT;
+#if 0  /* Do we need this for memory mapped I/O? */
+               entry |= I386_VM_PCD | I386_VM_PWT;
+#endif
                phys_put32(curr_pt_addr + pt_ent * I386_VM_PT_ENT_SIZE, entry);
                offset += PAGE_SIZE;
                base += PAGE_SIZE;