Hi!
How can I set the ramdrive's memory address?
Using QEMU without grub or grub on an actual machine.
Ramdrive address
Re: Ramdrive address
What ramdrive are you talking about?
Re: Ramdrive address
I'm developing my own OS and it is an initrd-like ramdrive.iansjack wrote:What ramdrive are you talking about?
Re: Ramdrive address
If I'm guessing right, you're using GRUB's module feature to load the ramdisk. In that case you cannot set the address, you must query it dynamically from GRUB's structures. First, get mods_addr from multiboot_info, and use it as a pointer to multiboot_module_t. Then from that struct, get mod_start, that will be your ramdisk's address (assuming your have only one module and that's your ramdisk).Robert wrote:Hi!
How can I set the ramdrive's memory address?
Using QEMU without grub or grub on an actual machine.
Code: Select all
uint32_t ramdisk_addr = ((multiboot_module_t*)multiboot_info.mods_addr)->mod_start;
Cheers,
bzt
Re: Ramdrive address
Set the address, not get. I wanted to load the image to a fixed address, no matter how large is the kernel image. But I solved the issue another way (memory reordering).
Re: Ramdrive address
Then simply map the ramdrive addresses to a specific address in virtual address space.Robert wrote:Set the address, not get. I wanted to load the image to a fixed address, no matter how large is the kernel image. But I solved the issue another way (memory reordering).
Skylight: https://github.com/austanss/skylight
I make stupid mistakes and my vision is terrible. Not a good combination.
NOTE: Never respond to my posts with "it's too hard".
I make stupid mistakes and my vision is terrible. Not a good combination.
NOTE: Never respond to my posts with "it's too hard".