Grub , setting flag[6] : error: unsupported flag 0x43

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
matan
Posts: 13
Joined: Sat May 02, 2015 4:15 am
Libera.chat IRC: matan

Grub , setting flag[6] : error: unsupported flag 0x43

Post by matan »

I want to retreive some info abbout what memory is available for me. so I tweaked the example from bare bones to include flag[6] in the multiboot header

Code: Select all

.set ALIGN,             1<<0                    # align loaded modules on page boundaries
.set MEMINFO,           1<<1                    # provide memory map
.set MEMORY_MAP,        1<<6                    # provide memory map
.set FLAGS,    ALIGN | MEMINFO | MEMORY_MAP 
booting the iso using qemu gives me the error above. :evil:

this is some basic info i can't continue without.
what's going on & how do I fix it ?
User avatar
beyondsociety
Member
Member
Posts: 39
Joined: Tue Oct 17, 2006 10:35 pm
Location: Eagle, ID (USA)
Contact:

Re: Grub , setting flag[6] : error: unsupported flag 0x43

Post by beyondsociety »

What does the rest of your code show for the multiboot header as I'm not sure why qemu is throwing that error? I use qemu from time to time to test but mainly use bochs, I'd try running it in bochs and see what it gives you.
As stated in multiboot under section 3.3 Boot Information Format

Code: Select all

 If bit 6 in the ‘flags’ word is set, then the ‘mmap_*’ fields are valid, and indicate the address and length of a buffer containing a memory map of the machine provided by the bios. ‘mmap_addr’ is the address, and ‘mmap_length’ is the total size of the buffer. The buffer consists of one or more of the following size/structure pairs (‘size’ is really used for skipping to the next pair): 
             +-------------------+
     -4      | size              |
             +-------------------+
     0       | base_addr         |
     8       | length            |
     16      | type              |
             +-------------------+


where ‘size’ is the size of the associated structure in bytes, which can be greater than the minimum of 20 bytes. ‘base_addr’ is the starting address. ‘length’ is the size of the memory region in bytes. ‘type’ is the variety of address range represented, where a value of 1 indicates available ram, and all other values currently indicated a reserved area. 

The map provided is guaranteed to list all standard ram that should be available for normal use.
"I think it may be time for some guru meditation"
"Barbarians don't do advanced wizardry"
ExeTwezz
Member
Member
Posts: 104
Joined: Sun Sep 21, 2014 7:16 am
Libera.chat IRC: exetwezz

Re: Grub , setting flag[6] : error: unsupported flag 0x43

Post by ExeTwezz »

matan wrote:

Code: Select all

.set ALIGN,             1<<0                    # align loaded modules on page boundaries
.set MEMINFO,           1<<1                    # provide memory map
.set MEMORY_MAP,        1<<6                    # provide memory map
.set FLAGS,    ALIGN | MEMINFO | MEMORY_MAP 
You don't need to set the 6th flag, as it's unsupported (and GRUB says that to you). For a memory map, you need to set only the MEMINFO flag. And in the structure provided by GRUB (and other Multiboot-compliant bootloaders) there's the `flags' entry. And in this entry the 6th bit is set when a memory map is provided.
Post Reply