|Subject:||Re: [PATCH] ELF64 and changelog and 4Gb|
|Date:||Tue, 19 Jul 2005 18:01:22 -0500|
> I agree. This is more readable.
I can change it of course... But it is not so bad:
1. if elf class == 64 => using ELF64 validate & loading code
- validate header by grub_dl_check_header(). Function grub_dl_check_header() also will check that elf class is 32-bit.
and so on...
I'm very busy now, but if you want I can update code... As for me I think that is no need to check elf class twice (small optimization).
> Could you provide us detailed information? What information is passed
Ok... But first I have a question about grub2. Does it really provide "mmap" information for OS as multiboot defined or memory size only?
As for 4Gb limit:
1. Memory size variable is a 32-bit. It measures in bytes => max 4Gb. When it passes to OS it converts to KB measuring but it's still truncated to 4Gb.
2. You can see the following code in file "init.c":
/* Ignore >4GB. */
if (entry->addr <= 0xFFFFFFFF && entry->type == 1)
addr = (grub_addr_t) entry->addr;
len = ((addr + entry->len > 0xFFFFFFFF)
? 0xFFFFFFFF - addr
: (grub_size_t) entry->len);
add_mem_region (addr, len);
Memory regions addr and len also is a 32-bit when BIOS provides it as a 64-bit numbers.
Of course I can be wrong because I don't know grub code very well.
2005-07-17 Ruslan Nikolaev <address@hidden>
* multiboot.c (grub_rescue_cmd_multiboot): using ELF64 loading code if ELF CLASS is a 64-bit and CPU CLASS is X86_64
Sign-up for Ads Free at Mail.com
|[Prev in Thread]||Current Thread||[Next in Thread]|