[srv.init] Load initial programs in srv.init
Add a simple ELF loader to srv.init to load and start any module_program parameters passed from the bootloader. Also creates stacks for newly created threads. Also update thread creation in testapp to create stacks.
This commit is contained in:
@@ -54,11 +54,18 @@ struct file_header
|
||||
|
||||
|
||||
enum class segment_type : uint32_t { null, load, dynamic, interpreter, note };
|
||||
enum class segment_flags : uint32_t
|
||||
{
|
||||
none = 0x00,
|
||||
exec = 0x01,
|
||||
write = 0x02,
|
||||
read = 0x04,
|
||||
};
|
||||
|
||||
struct program_header
|
||||
{
|
||||
segment_type type;
|
||||
uint32_t flags;
|
||||
segment_flags flags;
|
||||
uint64_t offset;
|
||||
|
||||
uint64_t vaddr;
|
||||
|
||||
Reference in New Issue
Block a user