Skip to content

Commit

Permalink
multiboot: pack structs
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianfreyer committed Feb 22, 2018
1 parent cfe0528 commit 90f8f03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions multiboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#define MULTIBOOT_FLAG_MEMORY (1<<1)
#define MULTIBOOT_FLAG_ALIGN4k (1<<0)

#define PACKED __attribute__((packed))

struct multiboot_header {
uint32_t magic;
uint32_t flags;
Expand All @@ -53,20 +55,20 @@ struct multiboot_header {
uint32_t width;
uint32_t height;
uint32_t depth;
};
} PACKED;

struct multiboot2_header {
uint32_t magic;
uint32_t architecture;
uint32_t header_length;
uint32_t checksum;
};
} PACKED;

struct multiboot2_tag {
uint16_t type;
uint16_t flags;
uint32_t size;
};
} PACKED;

struct multiboot {
uint32_t magic;
Expand Down

0 comments on commit 90f8f03

Please sign in to comment.