Bug#419994: Missing memory in Xen due to wrong detection of e820 memory map in grub

2008-01-15 Thread Robert Millan
On Fri, Dec 07, 2007 at 12:18:21PM +0100, Markus Hochholdinger wrote:
 Hi,
 
 i had the same problem and found a bug report on 
 https://bugzilla.redhat.com/show_bug.cgi?id=250299 . My solution for Debian 
 4.0, for others who hit this problem:

Can you reproduce with GRUB 2?

-- 
Robert Millan

GPLv2 I know my rights; I want my phone call!
DRM What use is a phone call, if you are unable to speak?
(as seen on /.)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#419994: Missing memory in Xen due to wrong detection of e820 memory map in grub

2007-12-07 Thread Markus Hochholdinger
Hi,

i had the same problem and found a bug report on 
https://bugzilla.redhat.com/show_bug.cgi?id=250299 . My solution for Debian 
4.0, for others who hit this problem:

apt-get source grub
apt-get build-dep grub
cd grub-0.97/
cp -a stage2/common.c stage2/common.c.original
vi stage2/common.c
diff stage2/common.c.original stage2/common.c
145c145,146
   unsigned long cont, memtmp, addr;
---
   unsigned long memtmp, addr;
   volatile unsigned long cont;
debian/rules binary
dpkg -i ../grub_0.97-27_i386.deb
grub-install /dev/sda
grub-install /dev/sdb

After reboot all memory is seen by the xen hypervisor.


-- 
greetings

eMHa


pgpvU11WHCHAG.pgp
Description: PGP signature


Bug#419994: Missing memory in Xen due to wrong detection of e820 memory map in grub

2007-05-03 Thread Robert Millan
On Thu, Apr 19, 2007 at 02:26:43PM +0200, Rafał Kupka wrote:
 Dnia 19-04-2007, czw o godzinie 12:10 +0200, Rafal Kupka napisał:
 Hello,
 
  I think that problem is located in do { } while (cont) loop at file
  stage2/common.c around line 181.
  It looks like while loop is optimized away (gone) during compilation.
 
 I was wrong, on another motherboard grub (same iso image) works
 correctly. So, it's not missing code but something more machine/BIOS
 specific. I'll try to get some more information.

Please, could you direct your debugging effort into grub2 ?  grub legacy is
deprecated now, and I'm afraid you might be wasting your time since it's
probably going to be completely replaced soon.

Thanks

-- 
Robert Millan

My spam trap is [EMAIL PROTECTED]  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#419994: Missing memory in Xen due to wrong detection of e820 memory map in grub

2007-04-19 Thread Rafal Kupka
Package: grub
Version: 0.97-27
Severity: normal
Tags: patch

Hello,

On my system grub don't properly detect E820 memory map.
Without it Xen hypervisor cannot use memory above 4G range.

Output from grub command displaymem:
grub displaymem
 EISA Memory BIOS Interface is present
 Address Map BIOS Interface is present
 Lower memory: 639K, Upper memory (to first chipset hole): 3406656K

grub

I think that problem is located in do { } while (cont) loop at file
stage2/common.c around line 181.
It looks like while loop is optimized away (gone) during compilation.

Don't know if it's bug in grub or toolchain and unfortunately I haven't
necessary knowledge to verify that.

Patch below fixes problem:
--- ../common.c 2007-04-19 11:36:19.0 +0200
+++ stage2/common.c 2007-04-19 11:36:55.0 +0200
@@ -142,7 +142,8 @@
 init_bios_info (void)
 {
 #ifndef STAGE1_5
-  unsigned long cont, memtmp, addr;
+  unsigned long memtmp, addr;
+  volatile unsigned long cont;
   int drive;
 #endif
 
displaymem after patch:
grub displaymem   
 EISA Memory BIOS Interface is present
 Address Map BIOS Interface is present
 Lower memory: 639K, Upper memory (to first chipset hole): 3406656K
 [Address Range Descriptor entries immediately follow (values are 64-bit)]
   Usable RAM:  Base Address:  0x0 X 4GB + 0x0,
  Length:   0x0 X 4GB + 0x9fc00 bytes
 [ more ranges ] ...
   Usable RAM:  Base Address:  0x1 X 4GB + 0x0,
  Length:   0x0 X 4GB + 0x3000 bytes

grub

Regards
Kupson

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (900, 'stable'), (700, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.20-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#419994: Missing memory in Xen due to wrong detection of e820 memory map in grub

2007-04-19 Thread Rafał Kupka
Dnia 19-04-2007, czw o godzinie 12:10 +0200, Rafal Kupka napisał:
Hello,

 I think that problem is located in do { } while (cont) loop at file
 stage2/common.c around line 181.
 It looks like while loop is optimized away (gone) during compilation.

I was wrong, on another motherboard grub (same iso image) works
correctly. So, it's not missing code but something more machine/BIOS
specific. I'll try to get some more information.

Kupson