1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Add macro KERNAUX_MULTIBOOT2_CHECKSUM

This commit is contained in:
Alex Kotov 2022-01-13 18:21:21 +05:00
parent 0056accb80
commit 8dc690d139

View file

@ -10,6 +10,13 @@ extern "C" {
#define KERNAUX_MULTIBOOT2_MAGIC 0x36d76289 #define KERNAUX_MULTIBOOT2_MAGIC 0x36d76289
#define KERNAUX_MULTIBOOT2_CHECKSUM(arch, total_size) \
((uint32_t)(-( \
((uint32_t)KERNAUX_MULTIBOOT2_MAGIC) + \
((uint32_t)(arch)) + \
((uint32_t)(total_size)) \
)))
#define KERNAUX_MULTIBOOT2_DATA(ptr) (((uint8_t*)(ptr)) + sizeof(*(ptr))) #define KERNAUX_MULTIBOOT2_DATA(ptr) (((uint8_t*)(ptr)) + sizeof(*(ptr)))
#define KERNAUX_MULTIBOOT2_HTAG_NEXT(tag_base) \ #define KERNAUX_MULTIBOOT2_HTAG_NEXT(tag_base) \