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

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

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

revision 1.3 by marcus, Mon Sep 15 19:24:01 2003 UTC revision 1.4 by marcus, Tue Sep 16 00:42:17 2003 UTC
# Line 18  Line 18 
18     along with this program; if not, write to the Free Software     along with this program; if not, write to the Free Software
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */
20    
21    #include <string.h>
22    
23  #include "loader.h"  #include "loader.h"
24  #include "output.h"  #include "output.h"
25  #include "shutdown.h"  #include "shutdown.h"
# Line 28  Line 30 
30    
31  /* Verify that the memory region START to END (exclusive) is valid.  */  /* Verify that the memory region START to END (exclusive) is valid.  */
32  static void  static void
33  mem_check (const char *name, unsigned long start, unsigned long end)  mem_check (const char *name, unsigned long long start, unsigned long long end)
34  {  {
35    l4_memory_desc_t memdesc;    l4_memory_desc_t memdesc = 0;
36    int nr;    int nr;
37    int fits = 0;    int fits = 0;
38    int conflicts = 0;    int conflicts = 0;
# Line 66  mem_check (const char *name, unsigned lo Line 68  mem_check (const char *name, unsigned lo
68          }          }
69      }      }
70    if (conflicts)    if (conflicts)
71      panic ("%s (0x%x - 0x%x) conflicts with memory of "      panic ("%s (0x%llx - 0x%llx) conflicts with memory of "
72             "type %i/%i (0x%x - 0x%x)", name, start, end,             "type %i/%i (0x%x - 0x%x)", name, start, end,
73             memdesc->type, memdesc->subtype,             memdesc->type, memdesc->subtype,
74             memdesc->low << 10, memdesc->high << 10);             memdesc->low << 10, memdesc->high << 10);
75    if (!fits)    if (!fits)
76      panic ("%s (0x%x - 0x%x) does not fit into memory",      panic ("%s (0x%llx - 0x%llx) does not fit into memory",
77             name, start, end);             name, start, end);
78  }  }
79    
# Line 122  loader_add_region (const char *name, l4_ Line 124  loader_add_region (const char *name, l4_
124    if (nr_regions == MAX_REGIONS)    if (nr_regions == MAX_REGIONS)
125      panic ("Too many memory regions, region %s doesn't fit", name);      panic ("Too many memory regions, region %s doesn't fit", name);
126    
127      if (start >= end)
128        panic ("Region %s has a start address following the end address", name);
129    
130    check_region (name, start, end);    check_region (name, start, end);
131    
132    used_regions[nr_regions].name = name;    used_regions[nr_regions].name = name;

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

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