/* Map in all of physical memory starting at CONFIG_KERNEL_START.  */
void __init mapin_ram(void)
/* Map in all of physical memory starting at CONFIG_KERNEL_START.  */
void __init mapin_ram(void)
{
	unsigned long v, p, s, f;
	v = CONFIG_KERNEL_START;
	p = memory_start;
	for (s = 0; s < memory_size; s += PAGE_SIZE) {
		f = _PAGE_PRESENT | _PAGE_ACCESSED |
				_PAGE_SHARED | _PAGE_HWEXEC;
		if ((char *) v < _stext || (char *) v >= _etext)
			f |= _PAGE_WRENABLE;
		else
			f |= _PAGE_USER;
		map_page(v, p, f);
		v += PAGE_SIZE;
		p += PAGE_SIZE;
	}
}