Page 2 of 2

Re: Out of Range Pointer Error

Posted: Mon Jan 05, 2015 7:45 pm
by eryjus
Can you share your source for the .multiboot section? I assume you were trying to use GRUB2 with a GRUB Legacy header/signature?

Re: Out of Range Pointer Error

Posted: Mon Jan 05, 2015 7:55 pm
by jvc
Yes, I am using a multiboot 1 header.

Here is the header:

Code: Select all

[BITS 32]


MBALIGN equ 1<<0
MEMINFO equ 1<<1
GRAPHICSINFO equ 1<<2
FLAGS equ MBALIGN | MEMINFO | GRAPHICSINFO
MAGIC equ 0x1BADB002
CHECKSUM equ -(MAGIC + FLAGS)

KERNEL_VIRTUAL_BASE equ 0xC0000000
KERNEL_PAGE_NUMBER equ (KERNEL_VIRTUAL_BASE >> 22)

[section .multiboot]
MultiBootHeader:
align 4
	dd MAGIC
	dd FLAGS
	dd CHECKSUM
	dd 0
	dd 0
	dd 0
	dd 0
	dd 0

	dd 1
	dd 0
	dd 0
	dd 0


Re: Out of Range Pointer Error

Posted: Mon Jan 05, 2015 8:29 pm
by eryjus
Thank you.

The only thing I can think of is that GRUB2 likes the MB2 header to be 8-byte aligned. I know you are using MB Legacy header, but you might try aligning it to 8 bytes to see.

Also, it shouldn't matter, but I have my video information specified in the header (not left as 0) and I can boot an MB1 header with GRUB2.

Re: Out of Range Pointer Error

Posted: Mon Jan 05, 2015 8:50 pm
by jvc
Tried changing both of those things but no difference, grub2 fails while grub legacy has no issues.

The upside is that this bug disappears as soon as I make any real change. I have managed, while booting with grub2, to do a fair amount of development since this bug first appeared without any issues. I'm hoping it doesn't reappear though.