/[hurd]/hurd-l4/laden/loader.c
ViewVC logotype

Diff of /hurd-l4/laden/loader.c

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

revision 1.2 by marcus, Thu Sep 4 01:29:35 2003 UTC revision 1.3 by marcus, Sun Sep 7 23:35:44 2003 UTC
# Line 107  check_region (char *name, l4_word_t star Line 107  check_region (char *name, l4_word_t star
107    
108  /* Add the region with the name NAME from START to END to the table of  /* Add the region with the name NAME from START to END to the table of
109     regions to check against.  Before doing that, check for overlaps     regions to check against.  Before doing that, check for overlaps
110     with existing regions.  */     with existing regions, unless FORCE is true.  */
111  static void  void
112  add_region (char *name, l4_word_t start, l4_word_t end)  loader_add_region (char *name, l4_word_t start, l4_word_t end, int force)
113  {  {
114    if (nr_regions == MAX_REGIONS)    if (nr_regions == MAX_REGIONS)
115      panic ("Too many memory regions, region %s doesn't fit", name);      panic ("Too many memory regions, region %s doesn't fit", name);
116    
117    check_region (name, start, end);    if (!force)
118        check_region (name, start, end);
119    
120    used_regions[nr_regions].name = name;    used_regions[nr_regions].name = name;
121    used_regions[nr_regions].start = start;    used_regions[nr_regions].start = start;
# Line 204  elf_load (char *name, l4_word_t start, l Line 205  elf_load (char *name, l4_word_t start, l
205    
206    /* FIXME: Add this as a bootloader specific memory type to L4's    /* FIXME: Add this as a bootloader specific memory type to L4's
207       memdesc list instead.  */       memdesc list instead.  */
208    add_region (name, new_start, new_end);    loader_add_region (name, new_start, new_end, 0);
209    
210    if (new_start_p)    if (new_start_p)
211      *new_start_p = new_start;      *new_start_p = new_start;
# Line 224  load_components (void) Line 225  load_components (void)
225  {  {
226    if (!kernel.low)    if (!kernel.low)
227      panic ("No L4 kernel found");      panic ("No L4 kernel found");
228    add_region ("kernel-mod", kernel.low, kernel.high);    loader_add_region ("kernel-mod", kernel.low, kernel.high, 0);
229    
230    if (!sigma0.low)    if (!sigma0.low)
231      panic ("No sigma0 server found");      panic ("No sigma0 server found");
232    add_region ("sigma0-mod", sigma0.low, sigma0.high);    loader_add_region ("sigma0-mod", sigma0.low, sigma0.high, 0);
233    
234    if (sigma1.low)    if (sigma1.low)
235      add_region ("sigma1-mod", sigma1.low, sigma1.high);      loader_add_region ("sigma1-mod", sigma1.low, sigma1.high, 0);
236    
237    if (!rootserver.low)    if (!rootserver.low)
238      panic ("No rootserver server found");      panic ("No rootserver server found");
239    add_region ("rootserver-mod", rootserver.low, rootserver.high);    loader_add_region ("rootserver-mod", rootserver.low, rootserver.high, 0);
240    
241    elf_load ("kernel", kernel.low, kernel.high,    elf_load ("kernel", kernel.low, kernel.high,
242              &kernel.low, &kernel.high, &kernel.ip);              &kernel.low, &kernel.high, &kernel.ip);

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