Hi Gabe, I see your point and I agree: that's not how it should be done. I wasn't aware anymore that the code in X86System switches to long mode (despite the source code comment). So I propose to extend X86System by a constructor argument that specifies whether the system should boot up in long mode or compatibility mode. This way LinuxX86System could build on the long mode setup, and MultibootX86System on the compatibility mode. Would that be a better approach?
Cheers, Christian Gabe Black <[email protected]> writes: > I reviewed a part of this earlier which splits out part of the x86 system > class into a helper class, and I've explained why that's not what I think > should be done. The page table initialization is not specific to Linux, and > is replaced by the Linux kernel when it starts up. I'm not opposed to > adding multiboot support, but this (or at least that aspect of it) isn't > how it should be done. > > Gabe > > On Mon, Jan 22, 2018 at 9:46 AM, Christian Menard < > [email protected]> wrote: > >> Hi everybody, >> >> I have some old patches lying around that extend the x86 system by >> support for the Multiboot boot sequence standard [1]. Maximilian (CC) >> currently uses these patches for his work and recently rebased them to >> the current gem5. He uploaded them to gerrit as a single patch for >> review [2]. Probably it makes sense to split the patch up in smaller >> hunks before merging. >> >> Is there a general interest in supporting Multiboot in gem5? If so, >> could you please look at the patch and give some feedback what needs to >> be done before merging? >> >> The patch not only adds support for Multiboot, but also moves some code >> around. The X86System class does some work that is actually Linux >> specific. Therefore, the patch moves parts of the X86System code to >> Linux86System and also creates a MultibootX86System class. Does this >> sound reasonable to you? >> >> [1] https://www.gnu.org/software/grub/manual/multiboot/multiboot.html >> [2] https://gem5-review.googlesource.com/c/public/gem5/+/7501 >> _______________________________________________ >> gem5-dev mailing list >> [email protected] >> http://m5sim.org/mailman/listinfo/gem5-dev > _______________________________________________ > gem5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
