[init] Load uart and logger from initrd

Load drv.uart.elf and srv.logger.elf from the initrd and start them.
It's extremely manual and hard-coded at the moment, but it works and
they run, getting us back to where we were pre-initrd branch.
This commit is contained in:
Justin C. Miller
2023-01-29 21:35:12 -08:00
parent 933e4e8040
commit 8b29680850
9 changed files with 235 additions and 114 deletions

View File

@@ -35,7 +35,14 @@ public:
module_iterator end() const { return {nullptr, 0}; }
private:
inline const module * deref() const { return m_page ? &m_page->modules[m_idx] : nullptr; }
inline const module * deref() const {
if (m_page) {
const module &m = m_page->modules[m_idx];
if (m.type != type::none)
return &m;
}
return nullptr;
}
unsigned m_idx;
bootproto::modules_page const *m_page;