Add support to run SMM handler in TSEG instead of ASEG
[coreboot.git] / src / include / stdlib.h
index 63a316f1866734200ab9ea896cd5dc69beb9cb25..5465c14f925be86ecd16fbcb0499d704b3674749 100644 (file)
@@ -5,13 +5,13 @@
 
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
-#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
+#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1UL)
 #define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
 
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
 
-#ifndef __ROMCC__
+#if !defined(__PRE_RAM__)
 void *malloc(size_t size);
 void free(void *ptr);
 #endif