memory_present(0, first_usable_pfn, max_low_pfn);  
static inline void bootmem_init(void){	unsigned long start_pfn;	unsigned long reserved_end = (unsigned long)&_end;#ifndef CONFIG_SGI_IP27	unsigned long first_usable_pfn;	unsigned long bootmap_size;	int i;#endif#ifdef CONFIG_BLK_DEV_INITRD	int initrd_reserve_bootmem = 0;	/* Board specific code should have set up initrd_start and initrd_end */ 	ROOT_DEV = Root_RAM0;	if (parse_rd_cmdline(&initrd_start, &initrd_end)) {		reserved_end = max(reserved_end, initrd_end);		initrd_reserve_bootmem = 1;	} else {		unsigned long tmp;		u32 *initrd_header;		tmp = ((reserved_end + PAGE_SIZE-1) & PAGE_MASK) - sizeof(u32) * 2;		if (tmp < reserved_end)			tmp += PAGE_SIZE;		initrd_header = (u32 *)tmp;		if (initrd_header[0] == 0x494E5244) {			initrd_start = (unsigned long)&initrd_header[2];			initrd_end = initrd_start + initrd_header[1];			reserved_end = max(reserved_end, initrd_end);			initrd_reserve_bootmem = 1;		}	}#endif	/* CONFIG_BLK_DEV_INITRD */	/*	 * Partially used pages are not usable - thus	 * we are rounding upwards.	 */	start_pfn = PFN_UP(CPHYSADDR(reserved_end));#ifndef CONFIG_SGI_IP27	/* Find the highest page frame number we have available.  */	max_pfn = 0;	first_usable_pfn = -1UL;	for (i = 0; i < boot_mem_map.nr_map; i++) {		unsigned long start, end;		if (boot_mem_map.map[i].type != BOOT_MEM_RAM)			continue;		start = PFN_UP(boot_mem_map.map[i].addr);		end = PFN_DOWN(boot_mem_map.map[i].addr		      + boot_mem_map.map[i].size);		if (start >= end)			continue;		if (end > max_pfn)			max_pfn = end;		if (start < first_usable_pfn) {			if (start > start_pfn) {				first_usable_pfn = start;			} else if (end > start_pfn) {				first_usable_pfn = start_pfn;			}		}	}	/*	 * Determine low and high memory ranges	 */	max_low_pfn = max_pfn;	if (max_low_pfn > MAXMEM_PFN) {		max_low_pfn = MAXMEM_PFN;#ifndef CONFIG_HIGHMEM		/* Maximum memory usable is what is directly addressable */		printk(KERN_WARNING "Warning only %ldMB will be used.\n",		       MAXMEM >> 20);		printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");#endif	}#ifdef CONFIG_HIGHMEM	/*	 * Crude, we really should make a better attempt at detecting	 * highstart_pfn	 */	highstart_pfn = highend_pfn = max_pfn;	if (max_pfn > MAXMEM_PFN) {		highstart_pfn = MAXMEM_PFN;		printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",		       (highend_pfn - highstart_pfn) >> (20 - PAGE_SHIFT));	}#endif	/* Initialize the boot-time allocator with low memory only.  */	bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn);	/*	 * Register fully available low RAM pages with the bootmem allocator.	 */	for (i = 0; i < boot_mem_map.nr_map; i++) {		unsigned long curr_pfn, last_pfn, size;		/*		 * Reserve usable memory.		 */		if (boot_mem_map.map[i].type != BOOT_MEM_RAM)			continue;		/*		 * We are rounding up the start address of usable memory:		 */		curr_pfn = PFN_UP(boot_mem_map.map[i].addr);		if (curr_pfn >= max_low_pfn)			continue;		if (curr_pfn < start_pfn)			curr_pfn = start_pfn;		/*		 * ... and at the end of the usable range downwards:		 */		last_pfn = PFN_DOWN(boot_mem_map.map[i].addr				    + boot_mem_map.map[i].size);		if (last_pfn > max_low_pfn)			last_pfn = max_low_pfn;		/*		 * Only register lowmem part of lowmem segment with bootmem.		 */		size = last_pfn - curr_pfn;		if (curr_pfn > PFN_DOWN(HIGHMEM_START))			continue;		if (curr_pfn + size - 1 > PFN_DOWN(HIGHMEM_START))			size = PFN_DOWN(HIGHMEM_START) - curr_pfn;		if (!size)			continue;		/*		 * ... finally, did all the rounding and playing		 * around just make the area go away?		 */		if (last_pfn <= curr_pfn)			continue;		/* Register lowmem ranges */		free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size));	}	/* Reserve the bootmap memory.  */	reserve_bootmem(PFN_PHYS(first_usable_pfn), bootmap_size);#endif /* CONFIG_SGI_IP27 */#ifdef CONFIG_BLK_DEV_INITRD	initrd_below_start_ok = 1;	if (initrd_start) {		unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start);		printk("Initial ramdisk at: 0x%p (%lu bytes)\n",		       (void *)initrd_start, initrd_size);		if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) {			printk("initrd extends beyond end of memory "			       "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n",			       sizeof(long) * 2,			       (unsigned long long)CPHYSADDR(initrd_end),			       sizeof(long) * 2,			       (unsigned long long)PFN_PHYS(max_low_pfn));			initrd_start = initrd_end = 0;			initrd_reserve_bootmem = 0;		}		if (initrd_reserve_bootmem)			reserve_bootmem(CPHYSADDR(initrd_start), initrd_size);	}#endif /* CONFIG_BLK_DEV_INITRD  */}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b4819b593740a6d11db07b52e0fe35975b29a185/setup.c/clean/arch/mips/kernel/setup.c