Clean up interface
This commit is contained in:
parent
79ca4681ff
commit
e4e891bb86
@ -4,11 +4,25 @@
|
|||||||
|
|
||||||
#define MBOOT_REPLY 0x36D76289
|
#define MBOOT_REPLY 0x36D76289
|
||||||
|
|
||||||
|
struct taglist{
|
||||||
|
uint32_t total_size;
|
||||||
|
uint32_t reserved;
|
||||||
|
}__attribute__((packed));
|
||||||
|
|
||||||
|
struct tag {
|
||||||
|
uint32_t type;
|
||||||
|
uint32_t size;
|
||||||
|
uint8_t data[];
|
||||||
|
}__attribute__((packed));
|
||||||
|
|
||||||
|
#define MBOOT2_COMMANDLINE 1
|
||||||
|
#define MBOOT2_BOOTLOADER 2
|
||||||
|
|
||||||
struct kernel_boot_data_st kernel_boot_data;
|
struct kernel_boot_data_st kernel_boot_data;
|
||||||
|
|
||||||
int parse_multiboot2(struct mboot2_taglist *tags)
|
int parse_multiboot2(struct taglist *tags)
|
||||||
{
|
{
|
||||||
struct mboot2_tag *tag = incptr(tags, sizeof(struct mboot2_taglist));
|
struct tag *tag = incptr(tags, sizeof(struct taglist));
|
||||||
while(tag->type)
|
while(tag->type)
|
||||||
{
|
{
|
||||||
switch(tag->type)
|
switch(tag->type)
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
// vim: ft=c
|
// vim: ft=c
|
||||||
#include <ttest.h>
|
#include <ttest.h>
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
#undef debug
|
|
||||||
#define debug(...)
|
|
||||||
#include "multiboot.c"
|
#include "multiboot.c"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -7,19 +7,6 @@ struct kernel_boot_data_st
|
|||||||
char *commandline;
|
char *commandline;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct kernel_boot_data_st kernel_boot_data;
|
extern struct kernel_boot_data_st kernel_boot_data;
|
||||||
|
|
||||||
struct mboot2_taglist{
|
|
||||||
uint32_t total_size;
|
|
||||||
uint32_t reserved;
|
|
||||||
}__attribute__((packed));
|
|
||||||
struct mboot2_tag {
|
|
||||||
uint32_t type;
|
|
||||||
uint32_t size;
|
|
||||||
uint8_t data[];
|
|
||||||
}__attribute__((packed));
|
|
||||||
|
|
||||||
#define MBOOT2_COMMANDLINE 1
|
|
||||||
#define MBOOT2_BOOTLOADER 2
|
|
||||||
|
|
||||||
int multiboot_init(uint64_t magic, void *mboot_info);
|
int multiboot_init(uint64_t magic, void *mboot_info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user