|
15 | 15 | // See the License for the specific language governing permissions and |
16 | 16 | // limitations under the License. |
17 | 17 |
|
18 | | -#include <os> |
19 | | -#include <cstdint> |
| 18 | +#include <kernel/os.hpp> |
| 19 | +#include <kernel/syscalls.hpp> |
20 | 20 | #include <util/elf_binary.hpp> |
| 21 | +#include <service> |
| 22 | +#include <cstdint> |
21 | 23 |
|
22 | | -bool verb = true; |
23 | | -#define MYINFO(X,...) INFO("chainload", X, ##__VA_ARGS__) |
| 24 | +static const bool verb = false; |
| 25 | +#define MYINFO(X,...) \ |
| 26 | + if (verb) { INFO("chainload", X, ##__VA_ARGS__); } |
24 | 27 |
|
25 | 28 | extern "C" void hotswap(const char* base, int len, char* dest, void* start, |
26 | 29 | uintptr_t magic, uintptr_t bootinfo); |
@@ -53,7 +56,7 @@ void Service::start() |
53 | 56 | sizeof(void*) * 8, mods.size()); |
54 | 57 |
|
55 | 58 | if (mods.size() <= 0) { |
56 | | - MYINFO("Nothing to do. Exiting."); |
| 59 | + MYINFO("No modules passed to multiboot. Exiting."); |
57 | 60 | exit(1); |
58 | 61 | } |
59 | 62 | multiboot_module_t binary = mods[0]; |
@@ -87,4 +90,5 @@ void Service::start() |
87 | 90 | ((decltype(&hotswap))hotswap_addr)(base, len, dest, start, __multiboot_magic, __multiboot_addr); |
88 | 91 |
|
89 | 92 | panic("Should have jumped\n"); |
| 93 | + __builtin_unreachable(); |
90 | 94 | } |
0 commit comments