|
|
|
|
@@ -43,7 +43,7 @@
|
|
|
|
|
#define MULTIBOOT_TAG_TYPE_EFI_BS 18
|
|
|
|
|
#define MULTIBOOT_TAG_TYPE_EFI32_IH 19
|
|
|
|
|
#define MULTIBOOT_TAG_TYPE_EFI64_IH 20
|
|
|
|
|
#define MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDRESS 21
|
|
|
|
|
#define MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR 21
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
u32 type;
|
|
|
|
|
@@ -87,7 +87,7 @@ typedef struct {
|
|
|
|
|
#define MULTIBOOT_MEMORY_BADRAM 5
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
u64 base_address;
|
|
|
|
|
u64 base_addr;
|
|
|
|
|
u64 length;
|
|
|
|
|
u32 type;
|
|
|
|
|
u32 reserved;
|
|
|
|
|
@@ -127,7 +127,7 @@ typedef struct {
|
|
|
|
|
typedef struct {
|
|
|
|
|
u32 type;
|
|
|
|
|
u32 size;
|
|
|
|
|
u64 framebuffer_address;
|
|
|
|
|
u64 framebuffer_addr;
|
|
|
|
|
u32 framebuffer_pitch;
|
|
|
|
|
u32 framebuffer_width;
|
|
|
|
|
u32 framebuffer_height;
|
|
|
|
|
@@ -236,91 +236,91 @@ typedef struct {
|
|
|
|
|
typedef struct {
|
|
|
|
|
u32 type;
|
|
|
|
|
u32 size;
|
|
|
|
|
u32 load_base_address;
|
|
|
|
|
} multiboot_tag_load_base_address;
|
|
|
|
|
u32 load_base_addr;
|
|
|
|
|
} multiboot_tag_load_base_addr;
|
|
|
|
|
|
|
|
|
|
void *multiboot_get_tag(uptr multiboot_info, u32 type);
|
|
|
|
|
void *multiboot_get_tag(u32 type);
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_cmdline *multiboot_get_cmdline(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_CMDLINE);
|
|
|
|
|
static inline multiboot_tag_cmdline *multiboot_get_cmdline() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_CMDLINE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_bootloader_name *multiboot_get_bootloader_name(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME);
|
|
|
|
|
static inline multiboot_tag_bootloader_name *multiboot_get_bootloader_name() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_module *multiboot_get_module(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_MODULE);
|
|
|
|
|
static inline multiboot_tag_module *multiboot_get_module() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_MODULE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_basic_meminfo *multiboot_get_basic_meminfo(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_BASIC_MEMINFO);
|
|
|
|
|
static inline multiboot_tag_basic_meminfo *multiboot_get_basic_meminfo() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_BASIC_MEMINFO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_bootdev *multiboot_get_bootdev(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_BOOTDEV);
|
|
|
|
|
static inline multiboot_tag_bootdev *multiboot_get_bootdev() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_BOOTDEV);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_mmap *multiboot_get_mmap(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_MMAP);
|
|
|
|
|
static inline multiboot_tag_mmap *multiboot_get_mmap() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_MMAP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_vbe *multiboot_get_vbe(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_VBE);
|
|
|
|
|
static inline multiboot_tag_vbe *multiboot_get_vbe() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_VBE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_framebuffer *multiboot_get_framebuffer(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_FRAMEBUFFER);
|
|
|
|
|
static inline multiboot_tag_framebuffer *multiboot_get_framebuffer() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_FRAMEBUFFER);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_elf_sections *multiboot_get_elf_sections(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_ELF_SECTIONS);
|
|
|
|
|
static inline multiboot_tag_elf_sections *multiboot_get_elf_sections() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_ELF_SECTIONS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_apm *multiboot_get_apm(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_APM);
|
|
|
|
|
static inline multiboot_tag_apm *multiboot_get_apm() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_APM);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_efi32 *multiboot_get_efi32(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_EFI32);
|
|
|
|
|
static inline multiboot_tag_efi32 *multiboot_get_efi32() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_EFI32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_efi64 *multiboot_get_efi64(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_EFI64);
|
|
|
|
|
static inline multiboot_tag_efi64 *multiboot_get_efi64() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_EFI64);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_smbios *multiboot_get_smbios(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_SMBIOS);
|
|
|
|
|
static inline multiboot_tag_smbios *multiboot_get_smbios() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_SMBIOS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_acpi_old *multiboot_get_acpi_old(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_ACPI_OLD);
|
|
|
|
|
static inline multiboot_tag_acpi_old *multiboot_get_acpi_old() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_ACPI_OLD);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_acpi_new *multiboot_get_acpi_new(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_ACPI_NEW);
|
|
|
|
|
static inline multiboot_tag_acpi_new *multiboot_get_acpi_new() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_ACPI_NEW);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_network *multiboot_get_network(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_NETWORK);
|
|
|
|
|
static inline multiboot_tag_network *multiboot_get_network() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_NETWORK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_efi_mmap *multiboot_get_efi_mmap(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_EFI_MMAP);
|
|
|
|
|
static inline multiboot_tag_efi_mmap *multiboot_get_efi_mmap() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_EFI_MMAP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline bool multiboot_get_efi_bs(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_EFI_BS) != NULL;
|
|
|
|
|
static inline bool multiboot_get_efi_bs() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_EFI_BS) != NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_efi32_ih *multiboot_get_efi32_ih(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_EFI32_IH);
|
|
|
|
|
static inline multiboot_tag_efi32_ih *multiboot_get_efi32_ih() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_EFI32_IH);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_efi64_ih *multiboot_get_efi64_ih(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_EFI64_IH);
|
|
|
|
|
static inline multiboot_tag_efi64_ih *multiboot_get_efi64_ih() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_EFI64_IH);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline multiboot_tag_load_base_address *multiboot_get_load_base_address(uptr multiboot_info) {
|
|
|
|
|
return multiboot_get_tag(multiboot_info, MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDRESS);
|
|
|
|
|
static inline multiboot_tag_load_base_addr *multiboot_get_load_base_addr() {
|
|
|
|
|
return multiboot_get_tag(MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR);
|
|
|
|
|
}
|
|
|
|
|
|