bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gfxboot patch and grub memory map


From: adrian15
Subject: gfxboot patch and grub memory map
Date: Mon, 05 Jun 2006 12:37:15 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Please help!

I've managed to make smaller a grub with a lot of features (Super Grub
Disk one again :) ) so that it could load gfxboot thing from suse.

The problem comes when I want to use my call and back commands. What is
the problem? Both gfxboot and call and back commands use memory that
goes from menu_entries+menu_len to 416K-1 (As noted in Internals Grub-
A.1 The memory map of various components ).

The thing is that I don't want to loose these net features I've removed.

Question 1 ) Can I use memory directions bigger than 1 MB for storing
gfxboot stuff? Can you give an example?

Question 2 ) This is part of gfxboot code and checks some memory. I
understand that the & must be some sort of binary AND operator but I do
not understand yet the ~ simbol and the more strange the double use that
it makes of buf as &buf and as buf.

Can you please translate into words this?

  /* get memory area to be used by graphics functions */

  buf = (unsigned char *) (((unsigned) heap + 0xf) & ~0xf);

  buf_size = (unsigned char *) &buf - buf - MIN_HEAP_SIZE;
  buf_size &= ~0xf;

  /* too small */
  if(buf_size < 0x10000) return;

If you want to know it the heap is char pointer that before was pointing
to menu_entries+menu_len but that now has been incremented some bytes.

Question 3) What would you remove from grub that normal user do not use
and makes stage2 bigger?

Thank you very much for your help.

adrian15





reply via email to

[Prev in Thread] Current Thread [Next in Thread]