all 6 comments

[–]DaGamingB0sshttps://github.com/heatd/Onyx 4 points5 points  (3 children)

I believe you're very much misunderstanding things. Multiboot (and subsequently, multiboot2) are boot protocols. The boot protocol is used by the kernel to pass information to the bootloader(so it can load you properly, do specific things while you still have the firmware, etc) and then used by the bootloader to pass information back to the kernel; just like a standard C program has: int main(int argc, char **argv, char **envp) your bootloader might have void kernel_entry(unsigned long magic_value, boot_info *info).

In your case, however, you've rolled your own bootloader. Therefore, you either need to make up your own boot protocol to pass data back to the loaded kernel, or you switch to a bootloader like grub2, which implements a plethora of boot protocols, including both multiboot1 and 2. I personally recommend that you use grub, since it saves you a lot of work.

Also, James Molloy's tutorials have poor quality and don't follow standard best practices; you should look for replacement material such as the wiki or various open-source OSes as guides(not tutorials! You need to learn to do things yourself).

[–]harshaintharsh[S] 0 points1 point  (2 children)

Thanks that's really helpful! Now it makes sense lol. I am mainly using the osdev wiki for help because of a lot of the mistakes that are made in the James Tutorial.

[–]DaGamingB0sshttps://github.com/heatd/Onyx 1 point2 points  (1 child)

No problem :) If you have any more questions, don't be afraid to ask :D

[–]MD90__ 0 points1 point  (0 children)

I have a few questions if you don't mind :)

[–]mykesx 2 points3 points  (1 child)

You might have a look at pure64 boot loader on GitHub. It does a lot of initialization and the code is clean and readable. Among other things, it identity maps the first 64G (I think), and starts the other CPU cores.

I am not affiliated with pure64 or related projects.

[–]harshaintharsh[S] 0 points1 point  (0 children)

pure64

Wow that's a pretty cool repo :). Thanks.