Re: edd breaking vesafb

From: H. Peter Anvin
Date: Thu Sep 18 2008 - 12:26:22 EST


Pascal Terjan wrote:
Hello

I got a report of vesafb no longer working since edd is used on a
machine (Shuttle FN41SP).
It's a BIOS bug that was easily workarounded by calling set_video before
query_edd.
Does someone see some issue in doing that ?


Yes, it means that we won't get the status and error messages from query_edd. In fact, we changed the ordering specifically for this reason.

The VESA code and EDD code both use the boot code heap. One could guess that the problem is data left on the heap by the EDD code causing a failure when combined with a bad BIOS.

Does this patch work for you?

-hpa diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index cc0ef13..f087238 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -205,7 +205,13 @@ static inline int isdigit(int ch)
extern char _end[];
extern char *HEAP;
extern char *heap_end;
-#define RESET_HEAP() ((void *)( HEAP = _end ))
+
+static inline void *RESET_HEAP(void)
+{
+ HEAP = _end;
+ memset(HEAP, 0, heap_end-HEAP);
+ return HEAP;
+}
static inline char *__get_heap(size_t s, size_t a, size_t n)
{
char *tmp;