2020-12-06 23:47:53 -05:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2022-06-24 19:07:10 -04:00
|
|
|
#include <kernaux/macro.h>
|
2020-11-27 16:48:50 -05:00
|
|
|
#include <kernaux/multiboot2.h>
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
2022-01-12 23:05:34 -05:00
|
|
|
#include "multiboot2_info_example1.h"
|
|
|
|
#include "multiboot2_info_example2.h"
|
2020-11-29 15:08:44 -05:00
|
|
|
|
2022-06-24 19:07:10 -04:00
|
|
|
#include <kernaux/macro/packing_start.run>
|
2022-06-12 06:25:10 -04:00
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
/************
|
|
|
|
* Tag_None *
|
|
|
|
************/
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_None tag_none_valid = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_None tag_none_invalid_type = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_None tag_none_invalid_size = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 9,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
/*******************
|
|
|
|
* Tag_BootCmdLine *
|
|
|
|
*******************/
|
|
|
|
|
2020-11-27 16:48:50 -05:00
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
2020-11-27 16:48:50 -05:00
|
|
|
char cmdline[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_cmd_line_with_empty_cmdline_valid = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 9,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.cmdline = "\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
2020-11-27 16:48:50 -05:00
|
|
|
char cmdline[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_cmd_line_with_some_cmdline_valid = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 22,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.cmdline = "Hello, World!\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
2020-11-27 16:48:50 -05:00
|
|
|
char cmdline[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_cmd_line_invalid_type = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 9,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.cmdline = "\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
2020-11-27 16:48:50 -05:00
|
|
|
char cmdline[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_cmd_line_with_empty_cmdline_invalid_size = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 10,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.cmdline = "\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
2020-11-27 16:48:50 -05:00
|
|
|
char cmdline[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_cmd_line_with_some_cmdline_invalid_size = {
|
2020-11-27 16:48:50 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE,
|
2020-11-27 16:48:50 -05:00
|
|
|
.size = 23,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.cmdline = "Hello, World!\0",
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
/**********************
|
|
|
|
* Tag_BootLoaderName *
|
|
|
|
**********************/
|
|
|
|
|
2020-11-27 17:01:49 -05:00
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
2020-11-27 17:30:43 -05:00
|
|
|
char name[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_loader_name_with_empty_name_valid = {
|
2020-11-27 17:01:49 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME,
|
2020-11-27 17:01:49 -05:00
|
|
|
.size = 9,
|
|
|
|
},
|
|
|
|
},
|
2020-11-27 17:30:43 -05:00
|
|
|
.name = "\0",
|
2020-11-27 17:01:49 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
2020-11-27 17:30:43 -05:00
|
|
|
char name[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_loader_name_with_some_name_valid = {
|
2020-11-27 17:01:49 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME,
|
2020-11-27 17:01:49 -05:00
|
|
|
.size = 22,
|
|
|
|
},
|
|
|
|
},
|
2020-11-27 17:30:43 -05:00
|
|
|
.name = "Hello, World!\0",
|
2020-11-27 17:01:49 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
2020-11-27 17:30:43 -05:00
|
|
|
char name[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_loader_name_invalid_type = {
|
2020-11-27 17:01:49 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 17:01:49 -05:00
|
|
|
.size = 9,
|
|
|
|
},
|
|
|
|
},
|
2020-11-27 17:30:43 -05:00
|
|
|
.name = "\0",
|
2020-11-27 17:01:49 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
2020-11-27 17:30:43 -05:00
|
|
|
char name[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_loader_name_with_empty_name_invalid_size = {
|
2020-11-27 17:01:49 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME,
|
2020-11-27 17:01:49 -05:00
|
|
|
.size = 10,
|
|
|
|
},
|
|
|
|
},
|
2020-11-27 17:30:43 -05:00
|
|
|
.name = "\0",
|
2020-11-27 17:01:49 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
2020-11-27 17:30:43 -05:00
|
|
|
char name[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_boot_loader_name_with_some_name_invalid_size = {
|
2020-11-27 17:01:49 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME,
|
2020-11-27 17:01:49 -05:00
|
|
|
.size = 23,
|
|
|
|
},
|
|
|
|
},
|
2020-11-27 17:30:43 -05:00
|
|
|
.name = "Hello, World!\0",
|
2020-11-27 17:01:49 -05:00
|
|
|
};
|
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
/**************
|
|
|
|
* Tag_Module *
|
|
|
|
**************/
|
|
|
|
|
2020-11-27 17:11:01 -05:00
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_with_empty_name_valid = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MODULE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 17,
|
|
|
|
},
|
|
|
|
.mod_start = 123,
|
|
|
|
.mod_end = 456,
|
|
|
|
},
|
|
|
|
.cmdline = "\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_with_some_name_valid = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MODULE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 30,
|
|
|
|
},
|
|
|
|
.mod_start = 123,
|
|
|
|
.mod_end = 456,
|
|
|
|
},
|
|
|
|
.cmdline = "Hello, World!\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_invalid_type = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 17,
|
|
|
|
},
|
|
|
|
.mod_start = 123,
|
|
|
|
.mod_end = 456,
|
|
|
|
},
|
|
|
|
.cmdline = "\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_with_empty_name_invalid_size = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MODULE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 18,
|
|
|
|
},
|
|
|
|
.mod_start = 123,
|
|
|
|
.mod_end = 456,
|
|
|
|
},
|
|
|
|
.cmdline = "\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_with_some_name_invalid_size = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MODULE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 31,
|
|
|
|
},
|
|
|
|
.mod_start = 123,
|
|
|
|
.mod_end = 456,
|
|
|
|
},
|
|
|
|
.cmdline = "Hello, World!\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_with_equal_start_end_invalid = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MODULE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 31,
|
|
|
|
},
|
|
|
|
.mod_start = 123,
|
|
|
|
.mod_end = 123,
|
|
|
|
},
|
|
|
|
.cmdline = "Hello, World!\0",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_Module tag;
|
2020-11-27 17:11:01 -05:00
|
|
|
char cmdline[14];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_module_with_reversed_start_end_invalid = {
|
2020-11-27 17:11:01 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MODULE,
|
2020-11-27 17:11:01 -05:00
|
|
|
.size = 31,
|
|
|
|
},
|
|
|
|
.mod_start = 456,
|
|
|
|
.mod_end = 123,
|
|
|
|
},
|
|
|
|
.cmdline = "Hello, World!\0",
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:27:47 -05:00
|
|
|
/***********************
|
|
|
|
* Tag_BasicMemoryInfo *
|
|
|
|
***********************/
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_BasicMemoryInfo
|
2020-11-27 17:27:47 -05:00
|
|
|
tag_basic_memory_info_valid = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 17:27:47 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_BasicMemoryInfo
|
2020-11-27 17:27:47 -05:00
|
|
|
tag_basic_memory_info_invalid_type = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 17:27:47 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_BasicMemoryInfo
|
2020-11-27 17:27:47 -05:00
|
|
|
tag_basic_memory_info_invalid_size = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 17:27:47 -05:00
|
|
|
.size = 17,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:35:39 -05:00
|
|
|
/**********************
|
|
|
|
* Tag_BIOSBootDevice *
|
|
|
|
**********************/
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_BIOSBootDevice
|
2020-11-27 17:35:39 -05:00
|
|
|
tag_bios_boot_device_valid = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
2020-11-27 17:35:39 -05:00
|
|
|
.size = 20,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_BIOSBootDevice
|
2020-11-27 17:35:39 -05:00
|
|
|
tag_bios_boot_device_invalid_type = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 17:35:39 -05:00
|
|
|
.size = 20,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_BIOSBootDevice
|
2020-11-27 17:35:39 -05:00
|
|
|
tag_bios_boot_device_invalid_size = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
2020-11-27 17:35:39 -05:00
|
|
|
.size = 21,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:54:06 -05:00
|
|
|
/*****************
|
|
|
|
* Tag_MemoryMap *
|
|
|
|
*****************/
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
2020-11-27 17:54:06 -05:00
|
|
|
tag_memory_map_with_empty_data_valid = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-27 17:54:06 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
2020-11-28 17:44:26 -05:00
|
|
|
.entry_size = 8,
|
2020-11-27 17:54:06 -05:00
|
|
|
.entry_version = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
2020-11-28 17:44:26 -05:00
|
|
|
unsigned char data[8 * 2];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_memory_map_with_some_small_data_items_valid = {
|
2020-11-27 17:54:06 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:44:26 -05:00
|
|
|
.size = 16 + 8 * 2,
|
2020-11-27 17:54:06 -05:00
|
|
|
},
|
2020-11-28 17:44:26 -05:00
|
|
|
.entry_size = 8,
|
2020-11-27 17:54:06 -05:00
|
|
|
.entry_version = 123,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
2020-11-28 17:44:26 -05:00
|
|
|
unsigned char data[64 * 2];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_memory_map_with_some_large_data_items_valid = {
|
2020-11-27 17:54:06 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:44:26 -05:00
|
|
|
.size = 16 + 64 * 2,
|
2020-11-27 17:54:06 -05:00
|
|
|
},
|
2020-11-28 17:44:26 -05:00
|
|
|
.entry_size = 64,
|
2020-11-27 17:54:06 -05:00
|
|
|
.entry_version = 456,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
2020-11-27 17:54:06 -05:00
|
|
|
tag_memory_map_invalid_type = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 17:54:06 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
2020-11-28 17:44:26 -05:00
|
|
|
.entry_size = 8,
|
2020-11-27 17:54:06 -05:00
|
|
|
.entry_version = 0,
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
2020-11-27 17:54:06 -05:00
|
|
|
tag_memory_map_with_empty_data_invalid_size = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:44:26 -05:00
|
|
|
.size = 16 + 1,
|
2020-11-27 17:54:06 -05:00
|
|
|
},
|
2020-11-28 17:44:26 -05:00
|
|
|
.entry_size = 8,
|
2020-11-27 17:54:06 -05:00
|
|
|
.entry_version = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
2020-11-28 17:44:26 -05:00
|
|
|
unsigned char data[64 * 2 + 1];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_memory_map_with_some_large_data_items_invalid_size = {
|
2020-11-27 17:54:06 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:44:26 -05:00
|
|
|
.size = 16 + 64 * 2 + 1,
|
2020-11-27 17:54:06 -05:00
|
|
|
},
|
2020-11-28 17:44:26 -05:00
|
|
|
.entry_size = 64,
|
2020-11-27 17:54:06 -05:00
|
|
|
.entry_version = 456,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
2020-11-28 17:56:20 -05:00
|
|
|
tag_memory_map_with_empty_data_invalid_entry_size_zero = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:56:20 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.entry_size = 0,
|
|
|
|
.entry_version = 0,
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
2020-11-28 17:51:27 -05:00
|
|
|
tag_memory_map_with_empty_data_invalid_entry_size_not_mul8 = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:51:27 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.entry_size = 9,
|
|
|
|
.entry_version = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
2020-11-28 17:51:27 -05:00
|
|
|
unsigned char data[9 * 2];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_memory_map_with_some_small_data_items_invalid_entry_size_not_mul8 = {
|
2020-11-28 17:51:27 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:51:27 -05:00
|
|
|
.size = 16 + 9 * 2,
|
|
|
|
},
|
|
|
|
.entry_size = 9,
|
|
|
|
.entry_version = 123,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
2020-11-28 17:51:27 -05:00
|
|
|
unsigned char data[63 * 2];
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED tag_memory_map_with_some_large_data_items_invalid_entry_size_not_mul8 = {
|
2020-11-28 17:51:27 -05:00
|
|
|
.tag = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
2020-11-28 17:51:27 -05:00
|
|
|
.size = 16 + 63 * 2,
|
|
|
|
},
|
|
|
|
.entry_size = 63,
|
|
|
|
.entry_version = 123,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:58:20 -05:00
|
|
|
/***************
|
|
|
|
* Tag_VBEInfo *
|
|
|
|
***************/
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_VBEInfo
|
2020-11-27 17:58:20 -05:00
|
|
|
tag_vbe_info_valid = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_VBE_INFO,
|
2020-11-27 17:58:20 -05:00
|
|
|
.size = 784,
|
|
|
|
},
|
|
|
|
.vbe_mode = 123,
|
|
|
|
.vbe_interface_seg = 456,
|
|
|
|
.vbe_interface_off = 789,
|
|
|
|
.vbe_interface_len = 123,
|
|
|
|
.vbe_control_info = {0, 0, 0},
|
|
|
|
.vbe_mode_info = {0, 0, 0},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_VBEInfo
|
2020-11-27 17:58:20 -05:00
|
|
|
tag_vbe_info_invalid_type = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 17:58:20 -05:00
|
|
|
.size = 784,
|
|
|
|
},
|
|
|
|
.vbe_mode = 123,
|
|
|
|
.vbe_interface_seg = 456,
|
|
|
|
.vbe_interface_off = 789,
|
|
|
|
.vbe_interface_len = 123,
|
|
|
|
.vbe_control_info = {0, 0, 0},
|
|
|
|
.vbe_mode_info = {0, 0, 0},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:38:51 -05:00
|
|
|
static const struct KernAux_Multiboot2_ITag_VBEInfo
|
2020-11-27 17:58:20 -05:00
|
|
|
tag_vbe_info_invalid_size = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_VBE_INFO,
|
2020-11-27 17:58:20 -05:00
|
|
|
.size = 784 + 1,
|
|
|
|
},
|
|
|
|
.vbe_mode = 123,
|
|
|
|
.vbe_interface_seg = 456,
|
|
|
|
.vbe_interface_off = 789,
|
|
|
|
.vbe_interface_len = 123,
|
|
|
|
.vbe_control_info = {0, 0, 0},
|
|
|
|
.vbe_mode_info = {0, 0, 0},
|
|
|
|
};
|
|
|
|
|
2022-05-24 11:09:02 -04:00
|
|
|
/******************
|
|
|
|
* Tag_ELFSymbols *
|
|
|
|
******************/
|
|
|
|
|
|
|
|
static const struct KernAux_Multiboot2_ITag_ELFSymbols
|
|
|
|
tag_elf_symbols_with_zero_ent_size_valid = {
|
|
|
|
.base = {
|
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_ELF_SYMBOLS,
|
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.num = 0,
|
|
|
|
.ent_size = 0,
|
|
|
|
.shndx = 0,
|
|
|
|
.reserved1 = 0,
|
|
|
|
};
|
|
|
|
|
2020-11-27 19:02:44 -05:00
|
|
|
/**************
|
|
|
|
* Multiboot2 *
|
|
|
|
**************/
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_empty_valid = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 19:02:44 -05:00
|
|
|
.total_size = 8 + 8,
|
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_none = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_with_some_additional_tag_valid = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 19:02:44 -05:00
|
|
|
.total_size = 8 + 16 + 8,
|
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_basic_memory_info = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
},
|
|
|
|
.tag_none = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
|
|
|
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
2020-11-27 21:41:07 -05:00
|
|
|
unsigned char _align1[4];
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_with_more_additional_tags_valid = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 21:41:07 -05:00
|
|
|
.total_size = 8 + 16 + (20 + 4) + 8,
|
2020-11-27 19:02:44 -05:00
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_basic_memory_info = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
},
|
|
|
|
.tag_bios_boot_device = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 20,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
},
|
|
|
|
.tag_none = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_empty_invalid_size = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 19:02:44 -05:00
|
|
|
.total_size = 8,
|
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_none = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
static const struct KernAux_Multiboot2_Info
|
|
|
|
multiboot2_without_none_tag_invalid = {
|
2020-11-27 19:02:44 -05:00
|
|
|
.total_size = 8,
|
|
|
|
.reserved1 = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_with_invalid_last_tag_invalid = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 19:02:44 -05:00
|
|
|
.total_size = 8 + 16,
|
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_basic_memory_info = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none1;
|
|
|
|
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
2020-11-27 21:41:07 -05:00
|
|
|
unsigned char _align1[4];
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none2;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_with_early_none_tag_invalid = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 21:41:07 -05:00
|
|
|
.total_size = 8 + 16 + 8 + (20 + 4) + 8,
|
2020-11-27 19:02:44 -05:00
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_basic_memory_info = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
},
|
|
|
|
.tag_none1 = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.tag_bios_boot_device = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 20,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
},
|
|
|
|
.tag_none2 = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
|
|
|
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
2020-11-27 21:41:07 -05:00
|
|
|
unsigned char _align1[4];
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_with_more_additional_tags_invalid_size_too_big = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 21:41:07 -05:00
|
|
|
.total_size = 8 + 16 + (20 + 4) + 8 + 1,
|
2020-11-27 19:02:44 -05:00
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_basic_memory_info = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
},
|
|
|
|
.tag_bios_boot_device = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 20,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
},
|
|
|
|
.tag_none = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct {
|
2022-01-12 22:59:52 -05:00
|
|
|
struct KernAux_Multiboot2_Info multiboot2_info;
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
|
|
|
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
2020-11-27 21:41:07 -05:00
|
|
|
unsigned char _align1[4];
|
2022-01-12 22:38:51 -05:00
|
|
|
struct KernAux_Multiboot2_ITag_None tag_none;
|
2022-11-28 20:19:35 -05:00
|
|
|
} KERNAUX_PACKED multiboot2_with_more_additional_tags_invalid_size_too_small = {
|
2022-01-12 22:59:52 -05:00
|
|
|
.multiboot2_info = {
|
2020-11-27 21:41:07 -05:00
|
|
|
.total_size = 8 + 16 + (20 + 4) + 8 - 1,
|
2020-11-27 19:02:44 -05:00
|
|
|
.reserved1 = 0,
|
|
|
|
},
|
|
|
|
.tag_basic_memory_info = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 16,
|
|
|
|
},
|
|
|
|
.mem_lower = 123,
|
|
|
|
.mem_upper = 123,
|
|
|
|
},
|
|
|
|
.tag_bios_boot_device = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 20,
|
|
|
|
},
|
|
|
|
.bios_dev = 123,
|
|
|
|
.partition = 456,
|
|
|
|
.sub_partition = 789,
|
|
|
|
},
|
|
|
|
.tag_none = {
|
|
|
|
.base = {
|
2022-01-12 21:49:25 -05:00
|
|
|
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
2020-11-27 19:02:44 -05:00
|
|
|
.size = 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-06-24 19:07:10 -04:00
|
|
|
#include <kernaux/macro/packing_end.run>
|
2022-06-12 06:25:10 -04:00
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
/********
|
|
|
|
* main *
|
|
|
|
********/
|
|
|
|
|
2022-06-20 14:01:56 -04:00
|
|
|
void test_main()
|
2020-11-27 16:48:50 -05:00
|
|
|
{
|
2020-11-27 19:02:44 -05:00
|
|
|
// Multiboot2
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(KernAux_Multiboot2_Info_is_valid(
|
2022-01-12 23:05:34 -05:00
|
|
|
(struct KernAux_Multiboot2_Info*)&multiboot2_info_example1
|
2020-11-29 15:08:44 -05:00
|
|
|
));
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(KernAux_Multiboot2_Info_is_valid(
|
2022-01-12 23:05:34 -05:00
|
|
|
(struct KernAux_Multiboot2_Info*)&multiboot2_info_example2
|
2020-11-27 22:17:13 -05:00
|
|
|
));
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_empty_valid.multiboot2_info
|
|
|
|
));
|
2020-11-27 19:02:44 -05:00
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_with_some_additional_tag_valid.multiboot2_info)
|
2020-11-27 19:02:44 -05:00
|
|
|
);
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_with_more_additional_tags_valid.multiboot2_info)
|
2020-11-27 19:02:44 -05:00
|
|
|
);
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(!KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_empty_invalid_size.multiboot2_info
|
2020-11-27 19:02:44 -05:00
|
|
|
));
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(!KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_without_none_tag_invalid
|
|
|
|
));
|
2020-11-27 19:02:44 -05:00
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(!KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_with_invalid_last_tag_invalid.multiboot2_info
|
2020-11-27 19:02:44 -05:00
|
|
|
));
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(!KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_with_early_none_tag_invalid.multiboot2_info
|
2020-11-27 19:02:44 -05:00
|
|
|
));
|
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(!KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_with_more_additional_tags_invalid_size_too_big.multiboot2_info
|
|
|
|
));
|
2020-11-27 19:02:44 -05:00
|
|
|
|
2022-01-12 22:59:52 -05:00
|
|
|
assert(!KernAux_Multiboot2_Info_is_valid(
|
|
|
|
&multiboot2_with_more_additional_tags_invalid_size_too_small.multiboot2_info
|
|
|
|
));
|
2020-11-27 19:02:44 -05:00
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
// ITagBase
|
2020-11-27 18:13:53 -05:00
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(&tag_none_valid.base));
|
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(&tag_none_invalid_size.base));
|
2020-11-27 18:13:53 -05:00
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_cmd_line_with_empty_cmdline_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_cmd_line_with_some_cmdline_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_cmd_line_with_empty_cmdline_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_cmd_line_with_some_cmdline_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_loader_name_with_empty_name_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_loader_name_with_some_name_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_loader_name_with_empty_name_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_boot_loader_name_with_some_name_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_module_with_empty_name_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_module_with_some_name_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_module_with_empty_name_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_module_with_some_name_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_module_with_equal_start_end_invalid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_module_with_reversed_start_end_invalid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_basic_memory_info_valid.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_basic_memory_info_invalid_size.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_bios_boot_device_valid.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_bios_boot_device_invalid_size.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_memory_map_with_empty_data_valid.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_memory_map_with_some_small_data_items_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_memory_map_with_some_large_data_items_valid.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_memory_map_with_empty_data_invalid_size.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_memory_map_with_some_large_data_items_invalid_size.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-28 17:56:20 -05:00
|
|
|
&tag_memory_map_with_empty_data_invalid_entry_size_zero.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-28 17:51:27 -05:00
|
|
|
&tag_memory_map_with_empty_data_invalid_entry_size_not_mul8.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-28 17:51:27 -05:00
|
|
|
&tag_memory_map_with_some_small_data_items_invalid_entry_size_not_mul8
|
|
|
|
.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-28 17:51:27 -05:00
|
|
|
&tag_memory_map_with_some_large_data_items_invalid_entry_size_not_mul8
|
|
|
|
.tag.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_vbe_info_valid.base
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:03:15 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
2020-11-27 18:13:53 -05:00
|
|
|
&tag_vbe_info_invalid_size.base
|
|
|
|
));
|
|
|
|
|
2022-05-24 11:09:02 -04:00
|
|
|
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
|
|
|
&tag_elf_symbols_with_zero_ent_size_valid.base
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
// Tag_None
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_None_is_valid(&tag_none_valid));
|
|
|
|
assert(!KernAux_Multiboot2_ITag_None_is_valid(&tag_none_invalid_type));
|
|
|
|
assert(!KernAux_Multiboot2_ITag_None_is_valid(&tag_none_invalid_size));
|
2020-11-27 16:48:50 -05:00
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
// Tag_BootCmdLine
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
2020-11-27 16:48:50 -05:00
|
|
|
&tag_boot_cmd_line_with_empty_cmdline_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
2020-11-27 16:48:50 -05:00
|
|
|
&tag_boot_cmd_line_with_some_cmdline_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
2020-11-27 16:48:50 -05:00
|
|
|
&tag_boot_cmd_line_invalid_type.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
2020-11-27 16:48:50 -05:00
|
|
|
&tag_boot_cmd_line_with_empty_cmdline_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
2020-11-27 16:48:50 -05:00
|
|
|
&tag_boot_cmd_line_with_some_cmdline_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
// Tag_BootLoaderName
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
2020-11-27 17:01:49 -05:00
|
|
|
&tag_boot_loader_name_with_empty_name_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
2020-11-27 17:01:49 -05:00
|
|
|
&tag_boot_loader_name_with_some_name_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
2020-11-27 17:01:49 -05:00
|
|
|
&tag_boot_loader_name_invalid_type.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
2020-11-27 17:01:49 -05:00
|
|
|
&tag_boot_loader_name_with_empty_name_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
2020-11-27 17:01:49 -05:00
|
|
|
&tag_boot_loader_name_with_some_name_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:15:55 -05:00
|
|
|
// Tag_Module
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_with_empty_name_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_with_some_name_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_invalid_type.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_with_empty_name_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_with_some_name_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_with_equal_start_end_invalid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_Module_is_valid(
|
2020-11-27 17:11:01 -05:00
|
|
|
&tag_module_with_reversed_start_end_invalid.tag
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:27:47 -05:00
|
|
|
// Tag_BasicMemoryInfo
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
2020-11-27 17:27:47 -05:00
|
|
|
&tag_basic_memory_info_valid
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
2020-11-27 17:27:47 -05:00
|
|
|
&tag_basic_memory_info_invalid_type
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
2020-11-27 17:27:47 -05:00
|
|
|
&tag_basic_memory_info_invalid_size
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:35:39 -05:00
|
|
|
// Tag_BIOSBootDevice
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
2020-11-27 17:35:39 -05:00
|
|
|
&tag_bios_boot_device_valid
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
2020-11-27 17:35:39 -05:00
|
|
|
&tag_bios_boot_device_invalid_type
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
2020-11-27 17:35:39 -05:00
|
|
|
&tag_bios_boot_device_invalid_size
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:54:06 -05:00
|
|
|
// Tag_MemoryMap
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-27 17:54:06 -05:00
|
|
|
&tag_memory_map_with_empty_data_valid
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-27 17:54:06 -05:00
|
|
|
&tag_memory_map_with_some_small_data_items_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-27 17:54:06 -05:00
|
|
|
&tag_memory_map_with_some_large_data_items_valid.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-27 17:54:06 -05:00
|
|
|
&tag_memory_map_invalid_type
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-27 17:54:06 -05:00
|
|
|
&tag_memory_map_with_some_large_data_items_invalid_size.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-28 17:56:20 -05:00
|
|
|
&tag_memory_map_with_empty_data_invalid_entry_size_zero
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-28 17:51:27 -05:00
|
|
|
&tag_memory_map_with_empty_data_invalid_entry_size_not_mul8
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-28 17:51:27 -05:00
|
|
|
&tag_memory_map_with_some_small_data_items_invalid_entry_size_not_mul8
|
|
|
|
.tag
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
2020-11-28 17:51:27 -05:00
|
|
|
&tag_memory_map_with_some_large_data_items_invalid_entry_size_not_mul8
|
|
|
|
.tag
|
|
|
|
));
|
|
|
|
|
2020-11-27 17:58:20 -05:00
|
|
|
// Tag_VBEInfo
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
2020-11-27 17:58:20 -05:00
|
|
|
&tag_vbe_info_valid
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
2020-11-27 17:58:20 -05:00
|
|
|
&tag_vbe_info_invalid_type
|
|
|
|
));
|
|
|
|
|
2022-01-12 22:10:33 -05:00
|
|
|
assert(!KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
2020-11-27 17:58:20 -05:00
|
|
|
&tag_vbe_info_invalid_size
|
|
|
|
));
|
|
|
|
|
2022-05-24 11:09:02 -04:00
|
|
|
// Tag_ELFSymbols
|
|
|
|
|
|
|
|
|
|
|
|
assert(KernAux_Multiboot2_ITag_ELFSymbols_is_valid(
|
|
|
|
&tag_elf_symbols_with_zero_ent_size_valid
|
|
|
|
));
|
2020-11-27 16:48:50 -05:00
|
|
|
}
|