2020-03-25 23:05:14 +03:00
|
|
|
#ifndef __PROTOS__STIVALE_H__
|
|
|
|
#define __PROTOS__STIVALE_H__
|
|
|
|
|
2020-09-02 10:55:56 +03:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
2020-09-18 21:02:10 +03:00
|
|
|
#include <sys/e820.h>
|
2020-09-21 13:15:55 +03:00
|
|
|
#include <mm/vmm.h>
|
2020-03-25 23:05:14 +03:00
|
|
|
|
2020-11-17 01:31:03 +03:00
|
|
|
void stivale_load(char *config, char *cmdline);
|
2020-09-18 15:39:29 +03:00
|
|
|
|
2021-07-05 09:04:17 +03:00
|
|
|
struct stivale_anchor {
|
|
|
|
uint8_t anchor[16];
|
|
|
|
uint64_t phys_load_addr;
|
|
|
|
uint64_t phys_bss_start;
|
|
|
|
uint64_t phys_bss_end;
|
|
|
|
uint64_t phys_stivalehdr;
|
|
|
|
uint64_t bits;
|
|
|
|
};
|
|
|
|
|
|
|
|
bool stivale_load_by_anchor(struct stivale_anchor **_anchor, const char *magic,
|
|
|
|
uint8_t *file, uint64_t filesize);
|
2021-04-14 12:06:14 +03:00
|
|
|
pagemap_t stivale_build_pagemap(bool level5pg, bool unmap_null);
|
2020-09-18 15:39:29 +03:00
|
|
|
__attribute__((noreturn)) void stivale_spinup(
|
2021-03-07 02:52:25 +03:00
|
|
|
int bits, bool level5pg, pagemap_t *pagemap,
|
2021-05-04 16:17:36 +03:00
|
|
|
uint64_t entry_point, uint64_t stivale_struct, uint64_t stack);
|
2020-03-25 23:05:14 +03:00
|
|
|
|
|
|
|
#endif
|