after the launch of QEMU, initializing the ram:
Code: Select all
qemu -kernel build/boot -initrd build/sistema
Which field of the multiboot_info structure contains this address?
Code: Select all
qemu -kernel build/boot -initrd build/sistema
Do you have any specific problems with it? Depending on how hard it turns out I might take a look at fixing it.XenOS wrote:I'm not quite sure about QEMU's multiboot implementation (it seems to be a bit faulty, so I recommend GRUB instead of the (albeit convenient) -kernel option)
I hadn't tried it for a while. One thing I remember is that the "upper memory" field in the multiboot info shows the total memory instead of the upper one, i.e., 1 MB too much - at least that's what I thought. But now I tried it again and just saw that it's not 1 MB more, but instead it included the memory used by ACPI in the "upper memory" value (in this case 8 kB more). Instead, GRUB only shows the size of the first free memory block. I don't know which behavior is correct, or whether both are correct. It seems that the spec is not very clear about this, it only mentions the "first memory hole". The problem I encountered with my kernel is that it assumes that the region indicated by the "upper memory" field is completely usable, and uses this a a scratch area before making use of the complete memory map - thereby trashing the ACPI tables.Kevin wrote:Do you have any specific problems with it? Depending on how hard it turns out I might take a look at fixing it.
Code: Select all
Memory map of length 0x00000090 at address 0x000100c0
Mem: 0x0000000000000000-0x000000000009fbff, Type: 0x01
Mem: 0x000000000009fc00-0x000000000009ffff, Type: 0x02
Mem: 0x00000000000f0000-0x00000000000fffff, Type: 0x02
Mem: 0x0000000000100000-0x0000000003ffdfff, Type: 0x01
Mem: 0x0000000003ffe000-0x0000000003ffffff, Type: 0x02
Mem: 0x00000000fffc0000-0x00000000ffffffff, Type: 0x02
Base contiguous memory: 65528 kB
Code: Select all
Memory map of length 0x00000078 at address 0x00009000
Mem: 0x0000000000000000-0x000000000009fbff, Type: 0x01
Mem: 0x000000000009fc00-0x000000000009ffff, Type: 0x02
Mem: 0x00000000000f0000-0x00000000000fffff, Type: 0x02
Mem: 0x0000000000100000-0x0000000003ffdfff, Type: 0x01
Mem: 0x0000000003ffe000-0x0000000003ffffff, Type: 0x02
Base contiguous memory: 65536 kB
Do your own homework?boot module
Other auxiliary files that a boot loader loads into memory along with an OS image, but does not interpret in any way other than passing their locations to the operating system when it is invoked.
You may solve it by actually reading the multiboot spec.costa90sm wrote:And what about my problem?
Yes, I did it, but I don't understand which field I need if "sistema" is loaded with -initrd settingdozniak wrote:You may solve it by actually reading the multiboot spec.costa90sm wrote:And what about my problem?
Thanks for the detailed explanation. I sent patches [1] for both problems, so hopefully qemu 1.6 will get it right.XenOS wrote:Just for comparison, the output from my kernel when I boot it with GRUB (or GRUB2, "Base contiguous memory" means upper memory + 1 MB)
Great, thanks a lot!Kevin wrote:Thanks for the detailed explanation. I sent patches [1] for both problems, so hopefully qemu 1.6 will get it right.
[1] http://lists.nongnu.org/archive/html/qe ... 03997.html