HExSA-Lab / nautilus

Nautilus Aerokernel
Other
44 stars 60 forks source link

WLLVM support and Buddy Bug Fix #25

Closed PeterDinda closed 5 years ago

PeterDinda commented 5 years ago

This enhancement adds the ability to optionally build with the WLLVM tool. The result of doing this is a nautilus.bin with an embedded copy of all bitcode. If you do "make bitcode" it will give you this as a separate file.

This also adds a new target that builds on this support for optimization. If you do "make whole_opt", a second compilation pass will happen that will collectively optimize everything, producing a new nautilus.bin.

These enhancements are invisible unless the user enables them in the configuration.

Also included here is a bug fix for the buddy allocator (an incorrect assertion). This avoids an incorrect panic when assertions are enabled, and a free happens for a block whose size is larger than the maximum possible alignment the pool can support. For example, if the memory pool starts at 0x100000 (1 MB), then it cannot provide alignment >1MB. If asked to allocate 2MB (a thread stack, say), it will return a 2 MB block aligned to 1 MB. When we free this block, it is not an error that it is not aligned to 2 MB.