arch, base, dev, kern, sym: FreeBSD support
Review Request #2741 - Created April 17, 2015 and submitted
| Information | |
|---|---|
| Ruslan Bukin | |
| gem5 | |
| Reviewers | |
| Default | |
This adds support for FreeBSD/aarch64 FS and SE mode (basic set of syscalls only)
Tested on FreeBSD/amd64 host simulating FreeBSD/aarch64 (FS, SE) and Linux/aarch64 (FS)
Testing Done: |
|
|---|
-
src/arch/arm/ArmSystem.py (Diff revision 1) -
Could you create a new intermediate class for both FreeBSD and Linux? Right now this is all duplicated and I'd really prefer to not have the duplication
-
src/arch/arm/freebsd/freebsd.hh (Diff revision 1) -
I'd be surprised if these these are the same for Linux and FreeBSD. Similarly for the data structures below. Have you had a chance to compare them with the FreeBSD versions to check. They can be the source of odd and very difficult to find bugs in SE mode
-
src/arch/arm/freebsd/process.cc (Diff revision 1) -
no tabs please
-
src/arch/arm/freebsd/process.cc (Diff revision 1) -
Done FreeBSD use these "private" syscalls like ARM AArch32 Linux does?
-
src/arch/arm/freebsd/process.cc (Diff revision 1) -
Is there any way some of this code could be put in the base class and shared between Linux and FreeBSD. Is it purely a subset of the Linux setup? If so, prehaps a function in the base class with an additional parameter specifying Linux (in which case nothing is done) or FreeBSD which if(!FreeBSD) is added to a few of the lines?
Thanks Ruslan. This is getting a lot closer, and it will be great to have FreeBSD support in gem5. I have a couple questions above about code duplication between FreeBSD/Linux. Thanks again, Ali
Thanks a lot for the changes. I have a few other minor comments and then I think it's good to go.
-
src/arch/arm/freebsd/system.cc (Diff revision 8) -
I'm guessing that FreeBSD doesn't have these? This code is used to not cache certain structures that will be cacheable on one cpu, but uncachebale on another during boot. I think it's probably fine to retrun false here and be done with it (along with deleting the member variables).
-
src/arch/arm/freebsd/system.cc (Diff revision 8) -
Does FreeBSD use a flattened devicetree for hardware identification or something else?
If it doesn't then this could can be removed. -
src/arch/generic/freebsd/threadinfo.hh (Diff revision 8) -
is this called the same as it is in linux? (for all the functions above). This code isn't needed and it can all just panic() with unimplmented if there isn't a good corallary in FreeBSD
Some minor bits. For the rest it looks great. Thanks for the contribution!
-
src/arch/arm/freebsd/freebsd.hh (Diff revision 9) -
Should we stick to the "normal" format, or is there a good reason to keep this as is?
-
src/arch/arm/freebsd/process.hh (Diff revision 9) -
I guess these should technically be __ARCH_ARM...
-
src/arch/arm/freebsd/system.cc (Diff revision 9) -
whitespace
-
src/arch/arm/process.cc (Diff revision 9) -
I guess there is no way or merging the "if linux" blocks?
-
src/arch/arm/system.hh (Diff revision 9) -
virtual
-
src/arch/arm/system.cc (Diff revision 9) -
I'd even suggest to leave these in the header for now and make them one-liners.
,
Ship It!
Ship It!
