Out of Range Pointer Error

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.
User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Re: Out of Range Pointer Error

Post 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?
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
jvc
Posts: 20
Joined: Wed Dec 31, 2014 9:34 pm

Re: Out of Range Pointer Error

Post 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

User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Re: Out of Range Pointer Error

Post 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.
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
jvc
Posts: 20
Joined: Wed Dec 31, 2014 9:34 pm

Re: Out of Range Pointer Error

Post 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.
Post Reply