mirror of
https://github.com/tailix/libkernaux.git
synced 2025-04-21 17:42:26 -04:00
Rename tag base struct
This commit is contained in:
parent
14664241d1
commit
e68d131fae
6 changed files with 104 additions and 96 deletions
|
@ -80,7 +80,7 @@ struct KernAux_Multiboot2 {
|
|||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_TagBase {
|
||||
struct KernAux_Multiboot2_ITagBase {
|
||||
enum KernAux_Multiboot2_ITag type : 32;
|
||||
uint32_t size;
|
||||
}
|
||||
|
@ -93,28 +93,28 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_None {
|
||||
// type = 0
|
||||
// size = 8
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BootCmdLine {
|
||||
// type = 1
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_BootLoaderName {
|
||||
// type = 2
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_Module {
|
||||
// type = 3
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned mod_start : 32;
|
||||
unsigned mod_end : 32;
|
||||
|
@ -124,7 +124,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_BasicMemoryInfo {
|
||||
// type = 4
|
||||
// size = 16
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned mem_lower : 32;
|
||||
unsigned mem_upper : 32;
|
||||
|
@ -134,7 +134,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_BIOSBootDevice {
|
||||
// type = 5
|
||||
// size = 20
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned bios_dev : 32;
|
||||
unsigned partition : 32;
|
||||
|
@ -145,7 +145,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_MemoryMap {
|
||||
// type = 6
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned entry_size : 32;
|
||||
unsigned entry_version : 32;
|
||||
|
@ -155,7 +155,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_VBEInfo {
|
||||
// type = 7
|
||||
// size = 784
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned vbe_mode : 16;
|
||||
unsigned vbe_interface_seg : 16;
|
||||
|
@ -169,7 +169,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_FramebufferInfo {
|
||||
// type = 8
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned long long framebuffer_addr : 64;
|
||||
unsigned framebuffer_pitch : 32;
|
||||
|
@ -184,7 +184,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_ELFSymbols {
|
||||
// type = 9
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned num : 16;
|
||||
unsigned ent_size : 16;
|
||||
|
@ -196,7 +196,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_APMTable {
|
||||
// type = 10
|
||||
// size = 28
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned version : 16;
|
||||
unsigned cseg : 16;
|
||||
|
@ -213,7 +213,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_EFI32bitSystemTablePtr {
|
||||
// type = 11
|
||||
// size = 12
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned pointer : 32;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_EFI64bitSystemTablePtr {
|
||||
// type = 12
|
||||
// size = 16
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned long long pointer : 64;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_SMBIOSTables {
|
||||
// type = 13
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned major : 8;
|
||||
unsigned minor : 8;
|
||||
|
@ -242,28 +242,28 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_ACPIOldRSDP {
|
||||
// type = 14
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_ACPINewRSDP {
|
||||
// type = 15
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_NetworkingInfo {
|
||||
// type = 16
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFIMemoryMap {
|
||||
// type = 17
|
||||
// size = ?
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned descriptor_size : 32;
|
||||
unsigned descriptor_version : 32;
|
||||
|
@ -273,14 +273,14 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_EFIBootServicesNotTerminated {
|
||||
// type = 18
|
||||
// size = 8
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
struct KernAux_Multiboot2_Tag_EFI32bitImageHandlePtr {
|
||||
// type = 19
|
||||
// size = 12
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned pointer : 32;
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_EFI64bitImageHandlePtr {
|
||||
// type = 20
|
||||
// size = 16
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned long long pointer : 64;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ __attribute__((packed));
|
|||
struct KernAux_Multiboot2_Tag_ImageLoadBasePhysAddr {
|
||||
// type = 21
|
||||
// size = 12
|
||||
struct KernAux_Multiboot2_TagBase base;
|
||||
struct KernAux_Multiboot2_ITagBase base;
|
||||
|
||||
unsigned load_base_addr : 32;
|
||||
}
|
||||
|
@ -320,15 +320,17 @@ __attribute__((packed));
|
|||
* Helper functions *
|
||||
********************/
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_first_tag_with_type(
|
||||
const struct KernAux_Multiboot2_ITagBase
|
||||
*KernAux_Multiboot2_first_tag_with_type(
|
||||
const struct KernAux_Multiboot2 *multiboot2,
|
||||
enum KernAux_Multiboot2_ITag tag_type
|
||||
);
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_tag_with_type_after(
|
||||
const struct KernAux_Multiboot2_ITagBase
|
||||
*KernAux_Multiboot2_tag_with_type_after(
|
||||
const struct KernAux_Multiboot2 *multiboot2,
|
||||
enum KernAux_Multiboot2_ITag tag_type,
|
||||
const struct KernAux_Multiboot2_TagBase *after_tag
|
||||
const struct KernAux_Multiboot2_ITagBase *after_tag
|
||||
);
|
||||
|
||||
const char *KernAux_Multiboot2_boot_cmd_line(
|
||||
|
@ -344,8 +346,8 @@ void KernAux_Multiboot2_print(
|
|||
void (*printf)(const char *format, ...)
|
||||
);
|
||||
|
||||
void KernAux_Multiboot2_TagBase_print(
|
||||
const struct KernAux_Multiboot2_TagBase *tag_base,
|
||||
void KernAux_Multiboot2_ITagBase_print(
|
||||
const struct KernAux_Multiboot2_ITagBase *tag_base,
|
||||
void (*printf)(const char *format, ...)
|
||||
);
|
||||
|
||||
|
@ -357,8 +359,8 @@ bool KernAux_Multiboot2_is_valid(
|
|||
const struct KernAux_Multiboot2 *multiboot2
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_TagBase_is_valid(
|
||||
const struct KernAux_Multiboot2_TagBase *tag_base
|
||||
bool KernAux_Multiboot2_ITagBase_is_valid(
|
||||
const struct KernAux_Multiboot2_ITagBase *tag_base
|
||||
);
|
||||
|
||||
bool KernAux_Multiboot2_Tag_None_is_valid(
|
||||
|
|
|
@ -6,21 +6,23 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_first_tag_with_type(
|
||||
const struct KernAux_Multiboot2_ITagBase
|
||||
*KernAux_Multiboot2_first_tag_with_type(
|
||||
const struct KernAux_Multiboot2 *const multiboot2,
|
||||
const enum KernAux_Multiboot2_ITag tag_type
|
||||
) {
|
||||
const struct KernAux_Multiboot2_TagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_TagBase*)KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
const struct KernAux_Multiboot2_ITagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
|
||||
while (tag_base <
|
||||
(struct KernAux_Multiboot2_TagBase*)
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
((unsigned char*)multiboot2 + multiboot2->total_size))
|
||||
{
|
||||
if (!KernAux_Multiboot2_TagBase_is_valid(tag_base)) return NULL;
|
||||
if (!KernAux_Multiboot2_ITagBase_is_valid(tag_base)) return NULL;
|
||||
if (tag_base->type == tag_type) return tag_base;
|
||||
|
||||
tag_base = (struct KernAux_Multiboot2_TagBase*)(
|
||||
tag_base = (struct KernAux_Multiboot2_ITagBase*)(
|
||||
(unsigned char*)tag_base + ((tag_base->size + 7) & ~7)
|
||||
);
|
||||
}
|
||||
|
@ -28,22 +30,24 @@ const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_first_tag_with_type(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_tag_with_type_after(
|
||||
const struct KernAux_Multiboot2_ITagBase
|
||||
*KernAux_Multiboot2_tag_with_type_after(
|
||||
const struct KernAux_Multiboot2 *const multiboot2,
|
||||
const enum KernAux_Multiboot2_ITag tag_type,
|
||||
const struct KernAux_Multiboot2_TagBase *const after_tag
|
||||
const struct KernAux_Multiboot2_ITagBase *const after_tag
|
||||
) {
|
||||
const struct KernAux_Multiboot2_TagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_TagBase*)KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
const struct KernAux_Multiboot2_ITagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
|
||||
while (tag_base <
|
||||
(struct KernAux_Multiboot2_TagBase*)
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
(unsigned char*)multiboot2 + multiboot2->total_size)
|
||||
{
|
||||
if (!KernAux_Multiboot2_TagBase_is_valid(tag_base)) return NULL;
|
||||
if (!KernAux_Multiboot2_ITagBase_is_valid(tag_base)) return NULL;
|
||||
if (tag_base->type == tag_type && tag_base > after_tag) return tag_base;
|
||||
|
||||
tag_base = (struct KernAux_Multiboot2_TagBase*)(
|
||||
tag_base = (struct KernAux_Multiboot2_ITagBase*)(
|
||||
(unsigned char*)tag_base + ((tag_base->size + 7) & ~7)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,16 +11,17 @@ bool KernAux_Multiboot2_is_valid(
|
|||
) {
|
||||
if (multiboot2->total_size <= 8) return false;
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_TagBase*)KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
const struct KernAux_Multiboot2_ITagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *none_tag_base = NULL;
|
||||
const struct KernAux_Multiboot2_ITagBase *none_tag_base = NULL;
|
||||
|
||||
while (tag_base <
|
||||
(struct KernAux_Multiboot2_TagBase*)
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
((unsigned char*)multiboot2 + multiboot2->total_size))
|
||||
{
|
||||
if (!KernAux_Multiboot2_TagBase_is_valid(tag_base)) return false;
|
||||
if (!KernAux_Multiboot2_ITagBase_is_valid(tag_base)) return false;
|
||||
|
||||
if (tag_base->type == KERNAUX_MULTIBOOT2_ITAG_NONE &&
|
||||
none_tag_base == NULL
|
||||
|
@ -28,20 +29,20 @@ bool KernAux_Multiboot2_is_valid(
|
|||
none_tag_base = tag_base;
|
||||
}
|
||||
|
||||
tag_base = (struct KernAux_Multiboot2_TagBase*)(
|
||||
tag_base = (struct KernAux_Multiboot2_ITagBase*)(
|
||||
(unsigned char*)tag_base + ((tag_base->size + 7) & ~7)
|
||||
);
|
||||
}
|
||||
|
||||
if (tag_base !=
|
||||
(struct KernAux_Multiboot2_TagBase*)
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
((unsigned char*)multiboot2 + multiboot2->total_size))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (none_tag_base !=
|
||||
(struct KernAux_Multiboot2_TagBase*)
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
((unsigned char*)tag_base - sizeof(struct KernAux_Multiboot2_Tag_None)))
|
||||
{
|
||||
return false;
|
||||
|
@ -50,8 +51,8 @@ bool KernAux_Multiboot2_is_valid(
|
|||
return true;
|
||||
}
|
||||
|
||||
bool KernAux_Multiboot2_TagBase_is_valid(
|
||||
const struct KernAux_Multiboot2_TagBase *const tag_base
|
||||
bool KernAux_Multiboot2_ITagBase_is_valid(
|
||||
const struct KernAux_Multiboot2_ITagBase *const tag_base
|
||||
) {
|
||||
switch (tag_base->type) {
|
||||
case KERNAUX_MULTIBOOT2_ITAG_NONE:
|
||||
|
|
|
@ -81,28 +81,29 @@ void KernAux_Multiboot2_print(
|
|||
printf(" size: %u\n", multiboot2->total_size);
|
||||
printf(" reserved1: %u\n", multiboot2->reserved1);
|
||||
|
||||
const struct KernAux_Multiboot2_TagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_TagBase*)KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
const struct KernAux_Multiboot2_ITagBase *tag_base =
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
KERNAUX_MULTIBOOT2_DATA(multiboot2);
|
||||
|
||||
while (tag_base <
|
||||
(struct KernAux_Multiboot2_TagBase*)
|
||||
(struct KernAux_Multiboot2_ITagBase*)
|
||||
((unsigned char*)multiboot2 + multiboot2->total_size))
|
||||
{
|
||||
if (!KernAux_Multiboot2_TagBase_is_valid(tag_base)) return;
|
||||
if (!KernAux_Multiboot2_ITagBase_is_valid(tag_base)) return;
|
||||
|
||||
KernAux_Multiboot2_TagBase_print(tag_base, printf);
|
||||
KernAux_Multiboot2_ITagBase_print(tag_base, printf);
|
||||
|
||||
tag_base = (struct KernAux_Multiboot2_TagBase*)(
|
||||
tag_base = (struct KernAux_Multiboot2_ITagBase*)(
|
||||
(unsigned char*)tag_base + ((tag_base->size + 7) & ~7)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void KernAux_Multiboot2_TagBase_print(
|
||||
const struct KernAux_Multiboot2_TagBase *const tag_base,
|
||||
void KernAux_Multiboot2_ITagBase_print(
|
||||
const struct KernAux_Multiboot2_ITagBase *const tag_base,
|
||||
void (*const printf)(const char *format, ...) __attribute__((format(printf, 1, 2)))
|
||||
) {
|
||||
if (!KernAux_Multiboot2_TagBase_is_valid(tag_base)) return;
|
||||
if (!KernAux_Multiboot2_ITagBase_is_valid(tag_base)) return;
|
||||
|
||||
printf("Multiboot 2 tag\n");
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ int main()
|
|||
&multiboot2_example2.multiboot2,
|
||||
KERNAUX_MULTIBOOT2_ITAG_MODULE
|
||||
) - 1
|
||||
) == (struct KernAux_Multiboot2_TagBase*)
|
||||
) == (struct KernAux_Multiboot2_ITagBase*)
|
||||
&multiboot2_example2.tag_module1
|
||||
);
|
||||
|
||||
|
@ -361,7 +361,7 @@ int main()
|
|||
&multiboot2_example2.multiboot2,
|
||||
KERNAUX_MULTIBOOT2_ITAG_MODULE
|
||||
)
|
||||
) == (struct KernAux_Multiboot2_TagBase*)
|
||||
) == (struct KernAux_Multiboot2_ITagBase*)
|
||||
&multiboot2_example2.tag_module2
|
||||
);
|
||||
|
||||
|
|
|
@ -805,126 +805,126 @@ int main()
|
|||
&multiboot2_with_more_additional_tags_invalid_size_too_small.multiboot2)
|
||||
);
|
||||
|
||||
// TagBase
|
||||
// ITagBase
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(&tag_none_valid.base));
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(&tag_none_invalid_size.base));
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(&tag_none_valid.base));
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(&tag_none_invalid_size.base));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_cmd_line_with_empty_cmdline_valid.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_cmd_line_with_some_cmdline_valid.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_cmd_line_with_empty_cmdline_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_cmd_line_with_some_cmdline_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_loader_name_with_empty_name_valid.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_loader_name_with_some_name_valid.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_loader_name_with_empty_name_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_boot_loader_name_with_some_name_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_module_with_empty_name_valid.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_module_with_some_name_valid.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_module_with_empty_name_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_module_with_some_name_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_module_with_equal_start_end_invalid.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_module_with_reversed_start_end_invalid.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_basic_memory_info_valid.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_basic_memory_info_invalid_size.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_bios_boot_device_valid.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_bios_boot_device_invalid_size.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_empty_data_valid.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_some_small_data_items_valid.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_some_large_data_items_valid.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_empty_data_invalid_size.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_some_large_data_items_invalid_size.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_empty_data_invalid_entry_size_zero.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_empty_data_invalid_entry_size_not_mul8.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_some_small_data_items_invalid_entry_size_not_mul8
|
||||
.tag.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_memory_map_with_some_large_data_items_invalid_entry_size_not_mul8
|
||||
.tag.base
|
||||
));
|
||||
|
||||
assert(KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_vbe_info_valid.base
|
||||
));
|
||||
|
||||
assert(!KernAux_Multiboot2_TagBase_is_valid(
|
||||
assert(!KernAux_Multiboot2_ITagBase_is_valid(
|
||||
&tag_vbe_info_invalid_size.base
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue