21270a3cc8
- Implement custom 'HOT!' binary format and Rust-based elf2hot converter. - Upgrade kernel loader with segment-based loading and BSS zeroing. - Refactor scheduler for Ring 3 IRET frames and fix CS/SS selector swap. - Add user stack allocation (0x70000000) and linker scripts for binary cleanup.
24 lines
473 B
C
24 lines
473 B
C
typedef unsigned char u8;
|
|
typedef unsigned short u16;
|
|
typedef unsigned int u32;
|
|
typedef unsigned long long u64;
|
|
|
|
#define HOT_MAGIC 0x21544F48
|
|
|
|
typedef struct hot_segment {
|
|
u64 type; // 1 = rx 2 = rw
|
|
u64 vaddr;
|
|
u64 offset;
|
|
u64 filesz;
|
|
u64 memsz;
|
|
} hot_segment;
|
|
|
|
typedef struct hot_header {
|
|
u32 magic; // "HOT!"
|
|
u8 version; // 1
|
|
u8 reserved_pad[3];
|
|
u64 entry_point;
|
|
u64 segments_count;
|
|
u64 reserved;
|
|
} hot_header;
|