Skip to contentSkip to conversation

edd breaking vesafb

DISCUSSION Pascal Terjan 2 participants 5 messages Sep 18, 2008 – Sep 19, 2008 x86

lore
Share & tools
lore
#0 lore raw

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 ?

#1 lore raw
Quoted 8 lines · Pascal Terjan

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

arch/x86/boot/boot.h +7 -1
index cc0ef13..f087238 100644
@@ -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;
#2 lore raw
Quoted 10 lines · H. Peter Anvin
Quoted 8 lines · Pascal Terjan

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 ?

Quoted 2 lines

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.

Indeed

Quoted 6 lines

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?

No it does not help

#3 lore raw
Quoted 3 lines · Pascal Terjan

No it does not help

What happens with edd=off or edd=skipmbr?

-hpa

#4 lore raw
Quoted 7 lines · H. Peter Anvin
Quoted 3 lines · Pascal Terjan

No it does not help

What happens with edd=off or edd=skipmbr?

Here is the answer from original reporter, adding him in Cc

edd=off : vesafb works properly
edd=skipmbr : vesafb is not initialized (just like edd=on) edd=on : vesafb is not initialized