/[hurd]/hurd-l4/libhurd-mm/physmem-user.c
ViewVC logotype

Diff of /hurd-l4/libhurd-mm/physmem-user.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by neal, Tue Mar 8 17:47:50 2005 UTC revision 1.3 by neal, Wed Mar 9 10:33:28 2005 UTC
# Line 141  hurd_pm_container_deallocate (hurd_pm_co Line 141  hurd_pm_container_deallocate (hurd_pm_co
141  }  }
142                                                                                            
143    
144  /* Map the memory at offset OFFSET with size SIZE at address VADDR  /* Map the COUNT bytes of physical memory in container CONTAINER
145     from the container CONT in the physical memory server PHYSMEM.  */     starting at byte INDEX at virtual memory address VADDR of the
146       calling task according to the flags FLAGS.  */
147  error_t  error_t
148  hurd_pm_container_map (hurd_pm_container_t container,  hurd_pm_container_map (hurd_pm_container_t container,
149                         l4_word_t offset, size_t size,                         l4_word_t index, size_t count,
150                         uintptr_t vaddr, l4_word_t rights)                         uintptr_t vaddr, l4_word_t flags)
151  {  {
152    l4_msg_t msg;    l4_msg_t msg;
153    l4_msg_tag_t tag;    l4_msg_tag_t tag;
# Line 157  hurd_pm_container_map (hurd_pm_container Line 158  hurd_pm_container_map (hurd_pm_container
158    l4_msg_clear (msg);    l4_msg_clear (msg);
159    l4_set_msg_label (msg, container_map_id);    l4_set_msg_label (msg, container_map_id);
160    l4_msg_append_word (msg, container);    l4_msg_append_word (msg, container);
161    l4_msg_append_word (msg, offset | rights);    l4_msg_append_word (msg, flags);
   l4_msg_append_word (msg, size);  
162    l4_msg_append_word (msg, vaddr);    l4_msg_append_word (msg, vaddr);
163      l4_msg_append_word (msg, index);
164      l4_msg_append_word (msg, count);
165    l4_msg_load (msg);    l4_msg_load (msg);
166    
167    tag = l4_call (physmem);    tag = l4_call (physmem);
168    l4_msg_store (tag, msg);    l4_msg_store (tag, msg);
169    
170      printf ("%s(%x,%xk,%xk,%xk,%x)->", __FUNCTION__,
171              container, index >> 10, count >> 10, vaddr >> 10, flags);
172    for (int i = 0;    for (int i = 0;
173         i < l4_typed_words (tag);         i < l4_typed_words (tag);
174         i += sizeof (l4_map_item_t) / sizeof (l4_word_t))         i += sizeof (l4_map_item_t) / sizeof (l4_word_t))
# Line 172  hurd_pm_container_map (hurd_pm_container Line 176  hurd_pm_container_map (hurd_pm_container
176        l4_map_item_t mi;        l4_map_item_t mi;
177        l4_msg_get_map_item (msg, i, &mi);        l4_msg_get_map_item (msg, i, &mi);
178        assert (l4_is_map_item (mi));        assert (l4_is_map_item (mi));
179        printf ("fpage(%x,%x)@%x ", l4_address (l4_map_item_snd_fpage (mi)),        printf ("(%xk,%xk)@%xk ",
180                l4_size (l4_map_item_snd_fpage (mi)),                l4_address (l4_map_item_snd_fpage (mi)) >> 10,
181                l4_map_item_snd_base (mi));                l4_size (l4_map_item_snd_fpage (mi)) >> 10,
182                  l4_map_item_snd_base (mi) >> 10);
183      }      }
184    printf ("\n");    printf ("\n");
185    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26