L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gpt.h
1/*
2 * Copyright (C) 2018, 2024 Kernkonzept GmbH.
3 * Author(s): Sarah Hoffmann <sarah.hoffmann@kernkonzept.com>
4 *
5 * License: see LICENSE.spdx (in this directory or the directories above)
6 */
7#pragma once
8
9#include <l4/sys/types.h>
10
11namespace Block_device {
12namespace Gpt {
13
14struct Header
15{
16 char signature[8];
17 l4_uint32_t version;
18 l4_uint32_t header_size;
19 l4_uint32_t crc;
20 l4_uint32_t _reserved;
21 l4_uint64_t current_lba;
22 l4_uint64_t backup_lba;
23 l4_uint64_t first_lba;
24 l4_uint64_t last_lba;
25 char disk_guid[16];
26 l4_uint64_t partition_array_lba;
27 l4_uint32_t partition_array_size;
28 l4_uint32_t entry_size;
29 l4_uint32_t crc_array;
30} __attribute__((packed));
31
32struct Entry
33{
34 unsigned char type_guid[16];
35 unsigned char partition_guid[16];
36 l4_uint64_t first;
37 l4_uint64_t last;
38 l4_uint64_t flags;
39 l4_uint16_t name[36];
40};
41
42} // namespace
43
44namespace Pc_partition_table {
45
46struct Part_table {
47 l4_uint8_t bootable;
48 l4_uint8_t first_sector_chs[3];
49 l4_uint8_t type;
50 l4_uint8_t last_sector_chs[3];
51 l4_uint32_t start_sector_lba;
52 l4_uint32_t num_sector_lba;
53} __attribute__((packed));
54
55} // namespace
56} // namespace
unsigned char l4_uint8_t
Unsigned 8bit value.
Definition l4int.h:25
unsigned int l4_uint32_t
Unsigned 32bit value.
Definition l4int.h:29
unsigned short int l4_uint16_t
Unsigned 16bit value.
Definition l4int.h:27
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
Common L4 ABI Data Types.