From ea7d0e304775e81c07269e22b4412d328c3fb2fa Mon Sep 17 00:00:00 2001 From: Yang Zhong Date: Thu, 30 Mar 2017 18:20:50 +0800 Subject: qboot: modified the malloc for fseg and high momory. The fseg and high memory malloc all use the up align mode in do_alloc(),which will result in qboot hang issue.The high memory use the down align mode and fseg memory use the up align mode. With those changes,the qemu can boot up the image with qboot. Signed-off-by: Yang Zhong Message-Id: <1490869250-4357-1-git-send-email-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini --- include/string.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/string.h b/include/string.h index c939cd0..d1bb037 100644 --- a/include/string.h +++ b/include/string.h @@ -23,7 +23,16 @@ static inline void *memcpy(void *dest, const void *src, size_t n) return __builtin_memcpy(dest, src, n); } -void *malloc(int n); -void *malloc_fseg(int n); +void *malloc_align(int n, int align); +void *malloc_fseg_align(int n, int align); +static inline void *malloc(int n) +{ + return malloc_align(n, 16); +} + +static inline void *malloc_fseg(int n) +{ + return malloc_fseg_align(n, 16); +} #endif -- cgit v1.1