Hi Yuxin,

The most common way of loading a kernel into gem5 is to use gem5's
internal boot loader that implements the boot protocol expected by Linux
(grub should be implementing the same protocol). This is probably what
you depend on in your OS already.

Kernels loaded by gem5 are typically normal ELF files. Unlike
traditional ELF files, these are loaded into physical memory rather than
virtual memory (i.e., the addresses in the ELF are all PAs). I have used
this functionality to run bare-metal tests in the past.

The usual Linux on gem5 tutorials should give you a good starting point.
Once you get started, you might find the remote gdb functionality
useful. This lets you attach gdb to the running system and debug your
kernel.

Cheers,
Andreas

On 27/08/2017 19:49, Yuxin Ren wrote:
Hi all,

I have a research operating system, which can be booted from qemu and
baremetal using grub.
Now I am asked to port it to gem5.
But I know nothing about gem5.
Could anyone give me some hints about how to port OS to gem5 and how to
boot OS from gem5?
Is there any example OSes that can boot from gem5?

Thank you so much!
Yuxin
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to