summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/core/emalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/i386/core/emalloc.c')
-rw-r--r--src/arch/i386/core/emalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arch/i386/core/emalloc.c b/src/arch/i386/core/emalloc.c
index 550e686b..09f2beb4 100644
--- a/src/arch/i386/core/emalloc.c
+++ b/src/arch/i386/core/emalloc.c
@@ -33,8 +33,11 @@
/** Equivalent of NOWHERE for user pointers */
#define UNOWHERE ( ~UNULL )
+/** Start of Etherboot text, as defined by the linker */
+extern char _text[];
+
/** Top of allocatable memory */
-#define TOP ( virt_to_user ( NULL ) )
+#define TOP ( virt_to_user ( _text ) )
/** An external memory block */
struct external_memory {