Skip to contentSkip to conversation

UML - Allow UML to load in the normal location

PATCH New Jeff Dike 1 participant 1 message Sep 23, 2004 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/1 UML - Allow UML to load in the normal location

This makes UML load at 0x8048000 rather than 0xa0000000 when CONFIG_MODE_SKAS is on and CONFIG_MODE_TT is off. This will make it more valgrind-friendly, and also allow much greater physical memory sizes without needing to use highmem.

arch/um/Makefile +5 -1
Index: linux-2.6.9-rc2-mm1-orig/arch/um/Makefile
===================================================================
@@ -109,8 +109,12 @@
 CONFIG_KERNEL_STACK_ORDER ?= 2
 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
 
+ifndef START
+  START = $$(($(TOP_ADDR) - $(SIZE)))
+endif
+
 CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \
-	-DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \
+	-DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \
 	-DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
 	-DKERNEL_STACK_SIZE=$(STACK_SIZE))
 
arch/um/Makefile-i386 +6 -0
Index: linux-2.6.9-rc2-mm1-orig/arch/um/Makefile-i386
===================================================================
@@ -4,6 +4,12 @@
 TOP_ADDR = 0xc0000000
 endif
 
+ifeq ($(CONFIG_MODE_SKAS),y)
+  ifneq ($(CONFIG_MODE_TT),y)
+     START = 0x8048000
+  endif
+endif
+
 CFLAGS += -U__$(SUBARCH)__ -U$(SUBARCH)
 
 ifneq ($(CONFIG_GPROF),y)