mirror of
https://github.com/tailix/libkernaux.git
synced 2024-11-27 11:14:42 -05:00
Rename Multiboot2 info tags
This commit is contained in:
parent
d22349cc75
commit
ab84e5892f
7 changed files with 207 additions and 206 deletions
|
@ -86,32 +86,32 @@ struct KernAux_Multiboot2_ITagBase {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
/******************
|
||||
* Tag structures *
|
||||
******************/
|
||||
/******************************
|
||||
* Information tag structures *
|
||||
******************************/
|
||||
|
||||
struct KernAux_Multiboot2_Tag_None {
|
||||
struct KernAux_Multiboot2_ITag_None {
|
||||
// type = 0
|
||||
// size = 8
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine {
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine {
|
||||
// type = 1
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName {
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName {
|
||||
// type = 2
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_Module {
|
||||
struct KernAux_Multiboot2_ITag_Module {
|
||||
// type = 3
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -121,7 +121,7 @@ struct KernAux_Multiboot2_Tag_Module {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo {
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo {
|
||||
// type = 4
|
||||
// size = 16
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -131,7 +131,7 @@ struct KernAux_Multiboot2_Tag_BasicMemoryInfo {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BIOSBootDevice {
|
||||
struct KernAux_Multiboot2_ITag_BIOSBootDevice {
|
||||
// type = 5
|
||||
// size = 20
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -142,7 +142,7 @@ struct KernAux_Multiboot2_Tag_BIOSBootDevice {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap {
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap {
|
||||
// type = 6
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -152,7 +152,7 @@ struct KernAux_Multiboot2_Tag_MemoryMap {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_VBEInfo {
|
||||
struct KernAux_Multiboot2_ITag_VBEInfo {
|
||||
// type = 7
|
||||
// size = 784
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -166,7 +166,7 @@ struct KernAux_Multiboot2_Tag_VBEInfo {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_FramebufferInfo {
|
||||
struct KernAux_Multiboot2_ITag_FramebufferInfo {
|
||||
// type = 8
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -181,7 +181,7 @@ struct KernAux_Multiboot2_Tag_FramebufferInfo {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_ELFSymbols {
|
||||
struct KernAux_Multiboot2_ITag_ELFSymbols {
|
||||
// type = 9
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -193,7 +193,7 @@ struct KernAux_Multiboot2_Tag_ELFSymbols {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_APMTable {
|
||||
struct KernAux_Multiboot2_ITag_APMTable {
|
||||
// type = 10
|
||||
// size = 28
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -210,7 +210,7 @@ struct KernAux_Multiboot2_Tag_APMTable {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr {
|
||||
struct KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr {
|
||||
// type = 11
|
||||
// size = 12
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -219,7 +219,7 @@ struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr {
|
||||
struct KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr {
|
||||
// type = 12
|
||||
// size = 16
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -228,7 +228,7 @@ struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_SMBIOSTables {
|
||||
struct KernAux_Multiboot2_ITag_SMBIOSTables {
|
||||
// type = 13
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -239,28 +239,28 @@ struct KernAux_Multiboot2_Tag_SMBIOSTables {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_ACPIOldRSDP {
|
||||
struct KernAux_Multiboot2_ITag_ACPIOldRSDP {
|
||||
// type = 14
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_ACPINewRSDP {
|
||||
struct KernAux_Multiboot2_ITag_ACPINewRSDP {
|
||||
// type = 15
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_NetworkingInfo {
|
||||
struct KernAux_Multiboot2_ITag_NetworkingInfo {
|
||||
// type = 16
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFIMemoryMap {
|
||||
struct KernAux_Multiboot2_ITag_EFIMemoryMap {
|
||||
// type = 17
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -270,14 +270,14 @@ struct KernAux_Multiboot2_Tag_EFIMemoryMap {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFIBootServicesNotTerminated {
|
||||
struct KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated {
|
||||
// type = 18
|
||||
// size = 8
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr {
|
||||
struct KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr {
|
||||
// type = 19
|
||||
// size = 12
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -286,7 +286,7 @@ struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr {
|
||||
struct KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr {
|
||||
// type = 20
|
||||
// size = 16
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -295,7 +295,7 @@ struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr {
|
||||
struct KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr {
|
||||
// type = 21
|
||||
// size = 12
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
@ -364,91 +364,91 @@ bool KernAux_Multiboot2_ITagBase_is_valid(
|
|||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_None_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_None *tag
|
||||
const struct KernAux_Multiboot2_ITag_None *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BootCmdLine *tag
|
||||
const struct KernAux_Multiboot2_ITag_BootCmdLine *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BootLoaderName *tag
|
||||
const struct KernAux_Multiboot2_ITag_BootLoaderName *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_Module_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_Module *tag
|
||||
const struct KernAux_Multiboot2_ITag_Module *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BasicMemoryInfo *tag
|
||||
const struct KernAux_Multiboot2_ITag_BasicMemoryInfo *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BIOSBootDevice *tag
|
||||
const struct KernAux_Multiboot2_ITag_BIOSBootDevice *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_MemoryMap *tag
|
||||
const struct KernAux_Multiboot2_ITag_MemoryMap *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_VBEInfo *tag
|
||||
const struct KernAux_Multiboot2_ITag_VBEInfo *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_FramebufferInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_FramebufferInfo *tag
|
||||
const struct KernAux_Multiboot2_ITag_FramebufferInfo *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ELFSymbols_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ELFSymbols *tag
|
||||
const struct KernAux_Multiboot2_ITag_ELFSymbols *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_APMTable_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_APMTable *tag
|
||||
const struct KernAux_Multiboot2_ITag_APMTable *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr *tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr *tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_SMBIOSTables_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_SMBIOSTables *tag
|
||||
const struct KernAux_Multiboot2_ITag_SMBIOSTables *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ACPIOldRSDP_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ACPIOldRSDP *tag
|
||||
const struct KernAux_Multiboot2_ITag_ACPIOldRSDP *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ACPINewRSDP_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ACPINewRSDP *tag
|
||||
const struct KernAux_Multiboot2_ITag_ACPINewRSDP *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_NetworkingInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_NetworkingInfo *tag
|
||||
const struct KernAux_Multiboot2_ITag_NetworkingInfo *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFIMemoryMap_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFIMemoryMap *tag
|
||||
const struct KernAux_Multiboot2_ITag_EFIMemoryMap *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFIBootServicesNotTerminated *tag
|
||||
const struct KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr *tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr *tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr *tag
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr *tag
|
||||
const struct KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr *tag
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -58,8 +58,8 @@ const struct KernAux_Multiboot2_ITagBase
|
|||
const char *KernAux_Multiboot2_boot_cmd_line(
|
||||
const struct KernAux_Multiboot2 *const multiboot2
|
||||
) {
|
||||
const struct KernAux_Multiboot2_Tag_BootCmdLine *const tag =
|
||||
(struct KernAux_Multiboot2_Tag_BootCmdLine*)
|
||||
const struct KernAux_Multiboot2_ITag_BootCmdLine *const tag =
|
||||
(struct KernAux_Multiboot2_ITag_BootCmdLine*)
|
||||
KernAux_Multiboot2_first_tag_with_type(
|
||||
multiboot2,
|
||||
KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE
|
||||
|
|
|
@ -43,7 +43,8 @@ bool KernAux_Multiboot2_is_valid(
|
|||
|
||||
if (none_tag_base !=
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
((unsigned char*)tag_base - sizeof(struct KernAux_Multiboot2_Tag_None)))
|
||||
((unsigned char*)tag_base -
|
||||
sizeof(struct KernAux_Multiboot2_ITag_None)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -57,92 +58,92 @@ bool KernAux_Multiboot2_ITagBase_is_valid(
|
|||
switch (tag_base->type) {
|
||||
case KERNAUX_MULTIBOOT2_ITAG_NONE:
|
||||
return KernAux_Multiboot2_ITag_None_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_None*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_None*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE:
|
||||
return KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_BootCmdLine*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_BootCmdLine*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_BOOT_LOADER_NAME:
|
||||
return KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_BootLoaderName*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_BootLoaderName*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_MODULE:
|
||||
return KernAux_Multiboot2_ITag_Module_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_Module*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_Module*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO:
|
||||
return KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_BasicMemoryInfo*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_BasicMemoryInfo*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE:
|
||||
return KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_BIOSBootDevice*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_BIOSBootDevice*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP:
|
||||
return KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_MemoryMap*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_MemoryMap*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_VBE_INFO:
|
||||
return KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_VBEInfo*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_VBEInfo*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_FRAMEBUFFER_INFO:
|
||||
return KernAux_Multiboot2_ITag_FramebufferInfo_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_FramebufferInfo*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_FramebufferInfo*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_ELF_SYMBOLS:
|
||||
return KernAux_Multiboot2_ITag_ELFSymbols_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_ELFSymbols*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_ELFSymbols*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_APM_TABLE:
|
||||
return KernAux_Multiboot2_ITag_APMTable_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_APMTable*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_APMTable*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_EFI_32BIT_SYSTEM_TABLE_PTR:
|
||||
return KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_EFI_64BIT_SYSTEM_TABLE_PTR:
|
||||
return KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_SMBIOS_TABLES:
|
||||
return KernAux_Multiboot2_ITag_SMBIOSTables_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_SMBIOSTables*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_SMBIOSTables*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_ACPI_OLD_RSDP:
|
||||
return KernAux_Multiboot2_ITag_ACPIOldRSDP_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_ACPIOldRSDP*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_ACPIOldRSDP*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_ACPI_NEW_RSDP:
|
||||
return KernAux_Multiboot2_ITag_ACPINewRSDP_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_ACPINewRSDP*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_ACPINewRSDP*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_NETWORKING_INFO:
|
||||
return KernAux_Multiboot2_ITag_NetworkingInfo_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_NetworkingInfo*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_NetworkingInfo*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_EFI_MEMORY_MAP:
|
||||
return KernAux_Multiboot2_ITag_EFIMemoryMap_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_EFIMemoryMap*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_EFIMemoryMap*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_EFI_BOOT_SERVICES_NOT_TERMINATED:
|
||||
return KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_EFIBootServicesNotTerminated*)
|
||||
(struct KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated*)
|
||||
tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_EFI_32BIT_IMAGE_HANDLE_PTR:
|
||||
return KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_EFI_64BIT_IMAGE_HANDLE_PTR:
|
||||
return KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr*)tag_base
|
||||
);
|
||||
case KERNAUX_MULTIBOOT2_ITAG_IMAGE_LOAD_BASE_PHYS_ADDR:
|
||||
return KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr_is_valid(
|
||||
(struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr*)tag_base
|
||||
);
|
||||
default:
|
||||
return false;
|
||||
|
@ -150,7 +151,7 @@ bool KernAux_Multiboot2_ITagBase_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_None_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_None *const tag
|
||||
const struct KernAux_Multiboot2_ITag_None *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_NONE &&
|
||||
|
@ -159,7 +160,7 @@ bool KernAux_Multiboot2_ITag_None_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BootCmdLine *const tag
|
||||
const struct KernAux_Multiboot2_ITag_BootCmdLine *const tag
|
||||
) {
|
||||
size_t index = 1;
|
||||
|
||||
|
@ -178,7 +179,7 @@ bool KernAux_Multiboot2_ITag_BootCmdLine_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BootLoaderName *const tag
|
||||
const struct KernAux_Multiboot2_ITag_BootLoaderName *const tag
|
||||
) {
|
||||
size_t index = 1;
|
||||
|
||||
|
@ -197,7 +198,7 @@ bool KernAux_Multiboot2_ITag_BootLoaderName_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_Module_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_Module *const tag
|
||||
const struct KernAux_Multiboot2_ITag_Module *const tag
|
||||
) {
|
||||
size_t index = 1;
|
||||
|
||||
|
@ -217,7 +218,7 @@ bool KernAux_Multiboot2_ITag_Module_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BasicMemoryInfo *const tag
|
||||
const struct KernAux_Multiboot2_ITag_BasicMemoryInfo *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO &&
|
||||
|
@ -226,7 +227,7 @@ bool KernAux_Multiboot2_ITag_BasicMemoryInfo_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_BIOSBootDevice *const tag
|
||||
const struct KernAux_Multiboot2_ITag_BIOSBootDevice *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE &&
|
||||
|
@ -235,7 +236,7 @@ bool KernAux_Multiboot2_ITag_BIOSBootDevice_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_MemoryMap *const tag
|
||||
const struct KernAux_Multiboot2_ITag_MemoryMap *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP &&
|
||||
|
@ -247,7 +248,7 @@ bool KernAux_Multiboot2_ITag_MemoryMap_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_VBEInfo *const tag
|
||||
const struct KernAux_Multiboot2_ITag_VBEInfo *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_VBE_INFO &&
|
||||
|
@ -256,7 +257,7 @@ bool KernAux_Multiboot2_ITag_VBEInfo_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_FramebufferInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_FramebufferInfo *const tag
|
||||
const struct KernAux_Multiboot2_ITag_FramebufferInfo *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_FRAMEBUFFER_INFO &&
|
||||
|
@ -265,7 +266,7 @@ bool KernAux_Multiboot2_ITag_FramebufferInfo_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ELFSymbols_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ELFSymbols *const tag
|
||||
const struct KernAux_Multiboot2_ITag_ELFSymbols *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_ELF_SYMBOLS &&
|
||||
|
@ -276,7 +277,7 @@ bool KernAux_Multiboot2_ITag_ELFSymbols_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_APMTable_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_APMTable *const tag
|
||||
const struct KernAux_Multiboot2_ITag_APMTable *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_APM_TABLE &&
|
||||
|
@ -285,7 +286,7 @@ bool KernAux_Multiboot2_ITag_APMTable_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr *const tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_EFI_32BIT_SYSTEM_TABLE_PTR &&
|
||||
|
@ -294,7 +295,7 @@ bool KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr *const tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_EFI_64BIT_SYSTEM_TABLE_PTR &&
|
||||
|
@ -303,7 +304,7 @@ bool KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_SMBIOSTables_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_SMBIOSTables *const tag
|
||||
const struct KernAux_Multiboot2_ITag_SMBIOSTables *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_SMBIOS_TABLES &&
|
||||
|
@ -312,7 +313,7 @@ bool KernAux_Multiboot2_ITag_SMBIOSTables_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ACPIOldRSDP_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ACPIOldRSDP *const tag
|
||||
const struct KernAux_Multiboot2_ITag_ACPIOldRSDP *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_ACPI_OLD_RSDP &&
|
||||
|
@ -321,7 +322,7 @@ bool KernAux_Multiboot2_ITag_ACPIOldRSDP_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ACPINewRSDP_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ACPINewRSDP *const tag
|
||||
const struct KernAux_Multiboot2_ITag_ACPINewRSDP *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_ACPI_NEW_RSDP &&
|
||||
|
@ -330,7 +331,7 @@ bool KernAux_Multiboot2_ITag_ACPINewRSDP_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_NetworkingInfo_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_NetworkingInfo *const tag
|
||||
const struct KernAux_Multiboot2_ITag_NetworkingInfo *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_NETWORKING_INFO &&
|
||||
|
@ -339,7 +340,7 @@ bool KernAux_Multiboot2_ITag_NetworkingInfo_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFIMemoryMap_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFIMemoryMap *const tag
|
||||
const struct KernAux_Multiboot2_ITag_EFIMemoryMap *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_EFI_MEMORY_MAP &&
|
||||
|
@ -348,7 +349,7 @@ bool KernAux_Multiboot2_ITag_EFIMemoryMap_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFIBootServicesNotTerminated *const tag
|
||||
const struct KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type ==
|
||||
|
@ -358,7 +359,7 @@ bool KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr *const tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_EFI_32BIT_IMAGE_HANDLE_PTR &&
|
||||
|
@ -367,7 +368,7 @@ bool KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr *const tag
|
||||
const struct KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_EFI_64BIT_IMAGE_HANDLE_PTR &&
|
||||
|
@ -376,7 +377,7 @@ bool KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr_is_valid(
|
|||
}
|
||||
|
||||
bool KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr_is_valid(
|
||||
const struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr *const tag
|
||||
const struct KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr *const tag
|
||||
) {
|
||||
return (
|
||||
tag->base.type == KERNAUX_MULTIBOOT2_ITAG_IMAGE_LOAD_BASE_PHYS_ADDR &&
|
||||
|
|
|
@ -11,12 +11,12 @@ static const char *KernAux_Multiboot2_ITag_to_str(
|
|||
);
|
||||
|
||||
static void KernAux_Multiboot2_ITag_MemoryMap_print(
|
||||
const struct KernAux_Multiboot2_Tag_MemoryMap *tag,
|
||||
const struct KernAux_Multiboot2_ITag_MemoryMap *tag,
|
||||
void (*printf)(const char *format, ...) __attribute__((format(printf, 1, 2)))
|
||||
);
|
||||
|
||||
static void KernAux_Multiboot2_ITag_ELFSymbols_print(
|
||||
const struct KernAux_Multiboot2_Tag_ELFSymbols *tag,
|
||||
const struct KernAux_Multiboot2_ITag_ELFSymbols *tag,
|
||||
void (*printf)(const char *format, ...) __attribute__((format(printf, 1, 2)))
|
||||
);
|
||||
|
||||
|
@ -122,7 +122,7 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
printf(
|
||||
" cmdline: %s\n",
|
||||
KERNAUX_MULTIBOOT2_DATA(
|
||||
(struct KernAux_Multiboot2_Tag_BootCmdLine*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_BootCmdLine*)tag_base
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
@ -130,14 +130,14 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
printf(
|
||||
" name: %s\n",
|
||||
KERNAUX_MULTIBOOT2_DATA(
|
||||
(struct KernAux_Multiboot2_Tag_BootLoaderName*)tag_base
|
||||
(struct KernAux_Multiboot2_ITag_BootLoaderName*)tag_base
|
||||
)
|
||||
);
|
||||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_MODULE:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_Module *const tag_module =
|
||||
(struct KernAux_Multiboot2_Tag_Module*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_Module *const tag_module =
|
||||
(struct KernAux_Multiboot2_ITag_Module*)tag_base;
|
||||
|
||||
printf(" start: %u\n", tag_module->mod_start);
|
||||
printf(" end: %u\n", tag_module->mod_end);
|
||||
|
@ -146,8 +146,8 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_BasicMemoryInfo *const tag_bmi =
|
||||
(struct KernAux_Multiboot2_Tag_BasicMemoryInfo*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_BasicMemoryInfo *const tag_bmi =
|
||||
(struct KernAux_Multiboot2_ITag_BasicMemoryInfo*)tag_base;
|
||||
|
||||
printf(" mem lower: %u\n", tag_bmi->mem_lower);
|
||||
printf(" mem upper: %u\n", tag_bmi->mem_upper);
|
||||
|
@ -155,8 +155,8 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_BIOSBootDevice *const tag_bbd =
|
||||
(struct KernAux_Multiboot2_Tag_BIOSBootDevice*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_BIOSBootDevice *const tag_bbd =
|
||||
(struct KernAux_Multiboot2_ITag_BIOSBootDevice*)tag_base;
|
||||
|
||||
printf(" bios dev: %u\n", tag_bbd->bios_dev);
|
||||
printf(" partition: %u\n", tag_bbd->partition);
|
||||
|
@ -165,14 +165,14 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP:
|
||||
KernAux_Multiboot2_ITag_MemoryMap_print(
|
||||
(struct KernAux_Multiboot2_Tag_MemoryMap*)tag_base,
|
||||
(struct KernAux_Multiboot2_ITag_MemoryMap*)tag_base,
|
||||
printf
|
||||
);
|
||||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_VBE_INFO:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_VBEInfo *const tag_vbe =
|
||||
(struct KernAux_Multiboot2_Tag_VBEInfo*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_VBEInfo *const tag_vbe =
|
||||
(struct KernAux_Multiboot2_ITag_VBEInfo*)tag_base;
|
||||
|
||||
printf(" VBE mode: %hu\n", tag_vbe->vbe_mode);
|
||||
printf(" VBE interface seg: %hu\n", tag_vbe->vbe_interface_seg);
|
||||
|
@ -182,8 +182,8 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_FRAMEBUFFER_INFO:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_FramebufferInfo *const tag_fb =
|
||||
(struct KernAux_Multiboot2_Tag_FramebufferInfo*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_FramebufferInfo *const tag_fb =
|
||||
(struct KernAux_Multiboot2_ITag_FramebufferInfo*)tag_base;
|
||||
|
||||
printf(" framebuffer addr: %llu\n", tag_fb->framebuffer_addr);
|
||||
printf(" framebuffer pitch: %u\n", tag_fb->framebuffer_pitch);
|
||||
|
@ -196,14 +196,14 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_ELF_SYMBOLS:
|
||||
KernAux_Multiboot2_ITag_ELFSymbols_print(
|
||||
(struct KernAux_Multiboot2_Tag_ELFSymbols*)tag_base,
|
||||
(struct KernAux_Multiboot2_ITag_ELFSymbols*)tag_base,
|
||||
printf
|
||||
);
|
||||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_APM_TABLE:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_APMTable *const tag_apm =
|
||||
(struct KernAux_Multiboot2_Tag_APMTable*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_APMTable *const tag_apm =
|
||||
(struct KernAux_Multiboot2_ITag_APMTable*)tag_base;
|
||||
|
||||
printf(" version: %hu\n", tag_apm->version);
|
||||
printf(" cseg: %hu\n", tag_apm->cseg);
|
||||
|
@ -228,8 +228,8 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
break;
|
||||
case KERNAUX_MULTIBOOT2_ITAG_SMBIOS_TABLES:
|
||||
{
|
||||
const struct KernAux_Multiboot2_Tag_SMBIOSTables *const tag_smbios =
|
||||
(struct KernAux_Multiboot2_Tag_SMBIOSTables*)tag_base;
|
||||
const struct KernAux_Multiboot2_ITag_SMBIOSTables *const tag_smbios =
|
||||
(struct KernAux_Multiboot2_ITag_SMBIOSTables*)tag_base;
|
||||
|
||||
printf(" major: %u\n", tag_smbios->major);
|
||||
printf(" minor: %u\n", tag_smbios->minor);
|
||||
|
@ -280,7 +280,7 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
case KERNAUX_MULTIBOOT2_ITAG_IMAGE_LOAD_BASE_PHYS_ADDR:
|
||||
printf(
|
||||
" load base addr: %u\n",
|
||||
((struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr*)tag_base)->
|
||||
((struct KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr*)tag_base)->
|
||||
load_base_addr
|
||||
);
|
||||
break;
|
||||
|
@ -288,7 +288,7 @@ void KernAux_Multiboot2_ITagBase_print(
|
|||
}
|
||||
|
||||
void KernAux_Multiboot2_ITag_MemoryMap_print(
|
||||
const struct KernAux_Multiboot2_Tag_MemoryMap *const tag,
|
||||
const struct KernAux_Multiboot2_ITag_MemoryMap *const tag,
|
||||
void (*printf)(const char *format, ...) __attribute__((format(printf, 1, 2)))
|
||||
) {
|
||||
if (!KernAux_Multiboot2_ITag_MemoryMap_is_valid(tag)) {
|
||||
|
@ -303,7 +303,7 @@ void KernAux_Multiboot2_ITag_MemoryMap_print(
|
|||
|
||||
const struct KernAux_Multiboot2_ITag_MemoryMap_EntryBase *const entries =
|
||||
(struct KernAux_Multiboot2_ITag_MemoryMap_EntryBase*)
|
||||
KERNAUX_MULTIBOOT2_DATA((struct KernAux_Multiboot2_Tag_MemoryMap*)tag);
|
||||
KERNAUX_MULTIBOOT2_DATA((struct KernAux_Multiboot2_ITag_MemoryMap*)tag);
|
||||
|
||||
for (
|
||||
size_t index = 0;
|
||||
|
@ -319,7 +319,7 @@ void KernAux_Multiboot2_ITag_MemoryMap_print(
|
|||
}
|
||||
|
||||
void KernAux_Multiboot2_ITag_ELFSymbols_print(
|
||||
const struct KernAux_Multiboot2_Tag_ELFSymbols *const tag,
|
||||
const struct KernAux_Multiboot2_ITag_ELFSymbols *const tag,
|
||||
void (*printf)(const char *format, ...) __attribute__((format(printf, 1, 2)))
|
||||
) {
|
||||
if (!KernAux_Multiboot2_ITag_ELFSymbols_is_valid(tag)) {
|
||||
|
|
|
@ -2,116 +2,116 @@ static const struct {
|
|||
struct KernAux_Multiboot2 multiboot2;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[15];
|
||||
} tag_boot_cmd_line;
|
||||
|
||||
unsigned char _align1[1];
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName tag;
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
||||
char name[22];
|
||||
} tag_boot_loader_name;
|
||||
|
||||
unsigned char _align2[2];
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[17];
|
||||
} tag_module1;
|
||||
|
||||
unsigned char _align3[7];
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[17];
|
||||
} tag_module2;
|
||||
|
||||
unsigned char _align4[7];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BIOSBootDevice tag_bios_boot_device;
|
||||
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
||||
|
||||
unsigned char _align5[4];
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
||||
|
||||
unsigned char
|
||||
data[160 - sizeof(struct KernAux_Multiboot2_Tag_MemoryMap)];
|
||||
data[160 - sizeof(struct KernAux_Multiboot2_ITag_MemoryMap)];
|
||||
} tag_memory_map;
|
||||
|
||||
struct KernAux_Multiboot2_Tag_VBEInfo tag_vbe_info;
|
||||
struct KernAux_Multiboot2_ITag_VBEInfo tag_vbe_info;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_FramebufferInfo tag;
|
||||
struct KernAux_Multiboot2_ITag_FramebufferInfo tag;
|
||||
unsigned char data[8];
|
||||
} tag_framebuffer_info;
|
||||
|
||||
unsigned char _align6[1];
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_ELFSymbols tag;
|
||||
struct KernAux_Multiboot2_ITag_ELFSymbols tag;
|
||||
|
||||
unsigned char
|
||||
data[420 - sizeof(struct KernAux_Multiboot2_Tag_ELFSymbols)];
|
||||
data[420 - sizeof(struct KernAux_Multiboot2_ITag_ELFSymbols)];
|
||||
} tag_elf_symbols;
|
||||
|
||||
unsigned char _align7[4];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_APMTable tag_apm_table;
|
||||
struct KernAux_Multiboot2_ITag_APMTable tag_apm_table;
|
||||
|
||||
unsigned char _align8[4];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr tag_efi_32bit_system_table_ptr;
|
||||
struct KernAux_Multiboot2_ITag_EFI32bitSystemTablePtr tag_efi_32bit_system_table_ptr;
|
||||
|
||||
unsigned char _align9[4];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr tag_efi_64bit_system_table_ptr;
|
||||
struct KernAux_Multiboot2_ITag_EFI64bitSystemTablePtr tag_efi_64bit_system_table_ptr;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_SMBIOSTables tag;
|
||||
struct KernAux_Multiboot2_ITag_SMBIOSTables tag;
|
||||
unsigned char data[8];
|
||||
} tag_smbios_tables;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_ACPIOldRSDP tag;
|
||||
struct KernAux_Multiboot2_ITag_ACPIOldRSDP tag;
|
||||
unsigned char data[8];
|
||||
} tag_acpi_old_rsdp;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_ACPINewRSDP tag;
|
||||
struct KernAux_Multiboot2_ITag_ACPINewRSDP tag;
|
||||
unsigned char data[8];
|
||||
} tag_acpi_new_rsdp;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_NetworkingInfo tag;
|
||||
struct KernAux_Multiboot2_ITag_NetworkingInfo tag;
|
||||
unsigned char data[8];
|
||||
} tag_networking_info;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_EFIMemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_EFIMemoryMap tag;
|
||||
unsigned char data[8];
|
||||
} tag_efi_memory_map;
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFIBootServicesNotTerminated
|
||||
struct KernAux_Multiboot2_ITag_EFIBootServicesNotTerminated
|
||||
tag_efi_boot_services_not_terminated;
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr
|
||||
struct KernAux_Multiboot2_ITag_EFI32bitImageHandlePtr
|
||||
tag_efi_32bit_image_handle_ptr;
|
||||
|
||||
unsigned char _align10[4];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr
|
||||
struct KernAux_Multiboot2_ITag_EFI64bitImageHandlePtr
|
||||
tag_efi_64bit_image_handle_ptr;
|
||||
|
||||
struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr
|
||||
struct KernAux_Multiboot2_ITag_ImageLoadBasePhysAddr
|
||||
tag_image_load_base_phys_addr;
|
||||
|
||||
unsigned char _align11[4];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_example2 = {
|
||||
.multiboot2 = {
|
||||
.total_size = sizeof(multiboot2_example2),
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_without_boot_cmd_line = {
|
||||
.multiboot2 = {
|
||||
.total_size = sizeof(multiboot2_without_boot_cmd_line),
|
||||
|
@ -29,13 +29,13 @@ static const struct {
|
|||
struct KernAux_Multiboot2 multiboot2;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[14];
|
||||
} tag_boot_cmd_line;
|
||||
|
||||
unsigned char _align1[2];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_with_some_boot_cmd_line = {
|
||||
.multiboot2 = {
|
||||
.total_size = sizeof(multiboot2_with_some_boot_cmd_line),
|
||||
|
@ -64,20 +64,20 @@ static const struct {
|
|||
struct KernAux_Multiboot2 multiboot2;
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[14];
|
||||
} tag_boot_cmd_line1;
|
||||
|
||||
unsigned char _align1[2];
|
||||
|
||||
struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[13];
|
||||
} tag_boot_cmd_line2;
|
||||
|
||||
unsigned char _align2[3];
|
||||
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_with_two_boot_cmd_lines = {
|
||||
.multiboot2 = {
|
||||
.total_size = sizeof(multiboot2_with_two_boot_cmd_lines),
|
||||
|
|
|
@ -13,21 +13,21 @@
|
|||
* Tag_None *
|
||||
************/
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_None tag_none_valid = {
|
||||
static const struct KernAux_Multiboot2_ITag_None tag_none_valid = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
||||
.size = 8,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_None tag_none_invalid_type = {
|
||||
static const struct KernAux_Multiboot2_ITag_None tag_none_invalid_type = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_BOOT_CMD_LINE,
|
||||
.size = 8,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_None tag_none_invalid_size = {
|
||||
static const struct KernAux_Multiboot2_ITag_None tag_none_invalid_size = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
||||
.size = 9,
|
||||
|
@ -39,7 +39,7 @@ static const struct KernAux_Multiboot2_Tag_None tag_none_invalid_size = {
|
|||
*******************/
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[1];
|
||||
} tag_boot_cmd_line_with_empty_cmdline_valid = {
|
||||
.tag = {
|
||||
|
@ -52,7 +52,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[14];
|
||||
} tag_boot_cmd_line_with_some_cmdline_valid = {
|
||||
.tag = {
|
||||
|
@ -65,7 +65,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[1];
|
||||
} tag_boot_cmd_line_invalid_type = {
|
||||
.tag = {
|
||||
|
@ -78,7 +78,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[1];
|
||||
} tag_boot_cmd_line_with_empty_cmdline_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -91,7 +91,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine tag;
|
||||
struct KernAux_Multiboot2_ITag_BootCmdLine tag;
|
||||
char cmdline[14];
|
||||
} tag_boot_cmd_line_with_some_cmdline_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -108,7 +108,7 @@ static const struct {
|
|||
**********************/
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName tag;
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
||||
char name[1];
|
||||
} tag_boot_loader_name_with_empty_name_valid = {
|
||||
.tag = {
|
||||
|
@ -121,7 +121,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName tag;
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
||||
char name[14];
|
||||
} tag_boot_loader_name_with_some_name_valid = {
|
||||
.tag = {
|
||||
|
@ -134,7 +134,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName tag;
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
||||
char name[1];
|
||||
} tag_boot_loader_name_invalid_type = {
|
||||
.tag = {
|
||||
|
@ -147,7 +147,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName tag;
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
||||
char name[1];
|
||||
} tag_boot_loader_name_with_empty_name_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -160,7 +160,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName tag;
|
||||
struct KernAux_Multiboot2_ITag_BootLoaderName tag;
|
||||
char name[14];
|
||||
} tag_boot_loader_name_with_some_name_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -177,7 +177,7 @@ static const struct {
|
|||
**************/
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[1];
|
||||
} tag_module_with_empty_name_valid = {
|
||||
.tag = {
|
||||
|
@ -192,7 +192,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[14];
|
||||
} tag_module_with_some_name_valid = {
|
||||
.tag = {
|
||||
|
@ -207,7 +207,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[1];
|
||||
} tag_module_invalid_type = {
|
||||
.tag = {
|
||||
|
@ -222,7 +222,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[1];
|
||||
} tag_module_with_empty_name_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -237,7 +237,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[14];
|
||||
} tag_module_with_some_name_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -252,7 +252,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[14];
|
||||
} tag_module_with_equal_start_end_invalid = {
|
||||
.tag = {
|
||||
|
@ -267,7 +267,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_Module tag;
|
||||
struct KernAux_Multiboot2_ITag_Module tag;
|
||||
char cmdline[14];
|
||||
} tag_module_with_reversed_start_end_invalid = {
|
||||
.tag = {
|
||||
|
@ -285,7 +285,7 @@ static const struct {
|
|||
* Tag_BasicMemoryInfo *
|
||||
***********************/
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_BasicMemoryInfo
|
||||
static const struct KernAux_Multiboot2_ITag_BasicMemoryInfo
|
||||
tag_basic_memory_info_valid = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
||||
|
@ -295,7 +295,7 @@ tag_basic_memory_info_valid = {
|
|||
.mem_upper = 123,
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_BasicMemoryInfo
|
||||
static const struct KernAux_Multiboot2_ITag_BasicMemoryInfo
|
||||
tag_basic_memory_info_invalid_type = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
||||
|
@ -305,7 +305,7 @@ tag_basic_memory_info_invalid_type = {
|
|||
.mem_upper = 123,
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_BasicMemoryInfo
|
||||
static const struct KernAux_Multiboot2_ITag_BasicMemoryInfo
|
||||
tag_basic_memory_info_invalid_size = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_BASIC_MEMORY_INFO,
|
||||
|
@ -319,7 +319,7 @@ tag_basic_memory_info_invalid_size = {
|
|||
* Tag_BIOSBootDevice *
|
||||
**********************/
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_BIOSBootDevice
|
||||
static const struct KernAux_Multiboot2_ITag_BIOSBootDevice
|
||||
tag_bios_boot_device_valid = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
||||
|
@ -330,7 +330,7 @@ tag_bios_boot_device_valid = {
|
|||
.sub_partition = 789,
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_BIOSBootDevice
|
||||
static const struct KernAux_Multiboot2_ITag_BIOSBootDevice
|
||||
tag_bios_boot_device_invalid_type = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
||||
|
@ -341,7 +341,7 @@ tag_bios_boot_device_invalid_type = {
|
|||
.sub_partition = 789,
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_BIOSBootDevice
|
||||
static const struct KernAux_Multiboot2_ITag_BIOSBootDevice
|
||||
tag_bios_boot_device_invalid_size = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_BIOS_BOOT_DEVICE,
|
||||
|
@ -356,7 +356,7 @@ tag_bios_boot_device_invalid_size = {
|
|||
* Tag_MemoryMap *
|
||||
*****************/
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_MemoryMap
|
||||
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
||||
tag_memory_map_with_empty_data_valid = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
||||
|
@ -367,7 +367,7 @@ tag_memory_map_with_empty_data_valid = {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
||||
unsigned char data[8 * 2];
|
||||
} tag_memory_map_with_some_small_data_items_valid = {
|
||||
.tag = {
|
||||
|
@ -381,7 +381,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
||||
unsigned char data[64 * 2];
|
||||
} tag_memory_map_with_some_large_data_items_valid = {
|
||||
.tag = {
|
||||
|
@ -394,7 +394,7 @@ static const struct {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_MemoryMap
|
||||
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
||||
tag_memory_map_invalid_type = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
||||
|
@ -404,7 +404,7 @@ tag_memory_map_invalid_type = {
|
|||
.entry_version = 0,
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_MemoryMap
|
||||
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
||||
tag_memory_map_with_empty_data_invalid_size = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
||||
|
@ -415,7 +415,7 @@ tag_memory_map_with_empty_data_invalid_size = {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
||||
unsigned char data[64 * 2 + 1];
|
||||
} tag_memory_map_with_some_large_data_items_invalid_size = {
|
||||
.tag = {
|
||||
|
@ -428,7 +428,7 @@ static const struct {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_MemoryMap
|
||||
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
||||
tag_memory_map_with_empty_data_invalid_entry_size_zero = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
||||
|
@ -438,7 +438,7 @@ tag_memory_map_with_empty_data_invalid_entry_size_zero = {
|
|||
.entry_version = 0,
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_MemoryMap
|
||||
static const struct KernAux_Multiboot2_ITag_MemoryMap
|
||||
tag_memory_map_with_empty_data_invalid_entry_size_not_mul8 = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_MEMORY_MAP,
|
||||
|
@ -449,7 +449,7 @@ tag_memory_map_with_empty_data_invalid_entry_size_not_mul8 = {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
||||
unsigned char data[9 * 2];
|
||||
} tag_memory_map_with_some_small_data_items_invalid_entry_size_not_mul8 = {
|
||||
.tag = {
|
||||
|
@ -463,7 +463,7 @@ static const struct {
|
|||
};
|
||||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2_Tag_MemoryMap tag;
|
||||
struct KernAux_Multiboot2_ITag_MemoryMap tag;
|
||||
unsigned char data[63 * 2];
|
||||
} tag_memory_map_with_some_large_data_items_invalid_entry_size_not_mul8 = {
|
||||
.tag = {
|
||||
|
@ -480,7 +480,7 @@ static const struct {
|
|||
* Tag_VBEInfo *
|
||||
***************/
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_VBEInfo
|
||||
static const struct KernAux_Multiboot2_ITag_VBEInfo
|
||||
tag_vbe_info_valid = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_VBE_INFO,
|
||||
|
@ -494,7 +494,7 @@ tag_vbe_info_valid = {
|
|||
.vbe_mode_info = {0, 0, 0},
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_VBEInfo
|
||||
static const struct KernAux_Multiboot2_ITag_VBEInfo
|
||||
tag_vbe_info_invalid_type = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_NONE,
|
||||
|
@ -508,7 +508,7 @@ tag_vbe_info_invalid_type = {
|
|||
.vbe_mode_info = {0, 0, 0},
|
||||
};
|
||||
|
||||
static const struct KernAux_Multiboot2_Tag_VBEInfo
|
||||
static const struct KernAux_Multiboot2_ITag_VBEInfo
|
||||
tag_vbe_info_invalid_size = {
|
||||
.base = {
|
||||
.type = KERNAUX_MULTIBOOT2_ITAG_VBE_INFO,
|
||||
|
@ -528,7 +528,7 @@ tag_vbe_info_invalid_size = {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_empty_valid = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 8,
|
||||
|
@ -544,8 +544,8 @@ static const struct {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_with_some_additional_tag_valid = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 16 + 8,
|
||||
|
@ -569,10 +569,10 @@ static const struct {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_Tag_BIOSBootDevice tag_bios_boot_device;
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
||||
unsigned char _align1[4];
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_with_more_additional_tags_valid = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 16 + (20 + 4) + 8,
|
||||
|
@ -605,7 +605,7 @@ static const struct {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_empty_invalid_size = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8,
|
||||
|
@ -626,7 +626,7 @@ static const struct KernAux_Multiboot2 multiboot2_without_none_tag_invalid = {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
||||
} multiboot2_with_invalid_last_tag_invalid = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 16,
|
||||
|
@ -644,11 +644,11 @@ static const struct {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_Tag_None tag_none1;
|
||||
struct KernAux_Multiboot2_Tag_BIOSBootDevice tag_bios_boot_device;
|
||||
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;
|
||||
unsigned char _align1[4];
|
||||
struct KernAux_Multiboot2_Tag_None tag_none2;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none2;
|
||||
} multiboot2_with_early_none_tag_invalid = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 16 + 8 + (20 + 4) + 8,
|
||||
|
@ -687,10 +687,10 @@ static const struct {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_Tag_BIOSBootDevice tag_bios_boot_device;
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
||||
unsigned char _align1[4];
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_with_more_additional_tags_invalid_size_too_big = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 16 + (20 + 4) + 8 + 1,
|
||||
|
@ -723,10 +723,10 @@ static const struct {
|
|||
|
||||
static const struct {
|
||||
struct KernAux_Multiboot2 multiboot2;
|
||||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_Tag_BIOSBootDevice tag_bios_boot_device;
|
||||
struct KernAux_Multiboot2_ITag_BasicMemoryInfo tag_basic_memory_info;
|
||||
struct KernAux_Multiboot2_ITag_BIOSBootDevice tag_bios_boot_device;
|
||||
unsigned char _align1[4];
|
||||
struct KernAux_Multiboot2_Tag_None tag_none;
|
||||
struct KernAux_Multiboot2_ITag_None tag_none;
|
||||
} multiboot2_with_more_additional_tags_invalid_size_too_small = {
|
||||
.multiboot2 = {
|
||||
.total_size = 8 + 16 + (20 + 4) + 8 - 1,
|
||||
|
|
Loading…
Reference in a new issue