lib: heap: Fix heap length

As part of x86 support heap len calculation has changed, which
introduces a bug for arm arch devices. Fix the heap length calculation.

CRs-Fixed: 399208
Change-Id: Ieb58a2bba7d6ad5efbb79c4fa7ca962c2129ee87
diff --git a/arch/arm/crt0.S b/arch/arm/crt0.S
index ce823c1..7f1ad16 100644
--- a/arch/arm/crt0.S
+++ b/arch/arm/crt0.S
@@ -187,14 +187,3 @@
 abort_stack:
 	.skip 1024
 abort_stack_top:
-
-.rodata:
-.align 2
-
-/* define the heap end as read-only data containing the end defined in the
- * linker script. other archs that use dynamic memory length discovery can make
- * this read-write and update it during init.
- */
-.global _heap_end
-_heap_end:
-	.int _end_of_ram
diff --git a/lib/heap/heap.c b/lib/heap/heap.c
index 71b6fa4..a3a35fb 100644
--- a/lib/heap/heap.c
+++ b/lib/heap/heap.c
@@ -52,10 +52,10 @@
 extern int _end;
 
 // end of memory
-extern int _heap_end;
+extern int _end_of_ram;
 
 #define HEAP_START ((unsigned long)&_end)
-#define HEAP_LEN ((size_t)_heap_end - (size_t)&_end)
+#define HEAP_LEN ((size_t)&_end_of_ram - (size_t)&_end)
 #endif
 
 struct free_heap_chunk {