L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
gpt.h
1/*
2 * Copyright (C) 2018 Kernkonzept GmbH.
3 * Author(s): Sarah Hoffmann <sarah.hoffmann@kernkonzept.com>
4 *
5 * This file is distributed under the terms of the GNU General Public
6 * License, version 2. Please see the COPYING-GPL-2 file for details.
7 */
8#pragma once
9
10#include <l4/sys/types.h>
11
12namespace Block_device {
13namespace Gpt {
14
15struct Header
16{
17 char signature[8];
18 l4_uint32_t version;
19 l4_uint32_t header_size;
20 l4_uint32_t crc;
21 l4_uint32_t _reserved;
22 l4_uint64_t current_lba;
23 l4_uint64_t backup_lba;
24 l4_uint64_t first_lba;
25 l4_uint64_t last_lba;
26 char disk_guid[16];
27 l4_uint64_t partition_array_lba;
28 l4_uint32_t partition_array_size;
29 l4_uint32_t entry_size;
30 l4_uint32_t crc_array;
31} __attribute__((packed));
32
33struct Entry
34{
35 unsigned char type_guid[16];
36 unsigned char partition_guid[16];
37 l4_uint64_t first;
38 l4_uint64_t last;
39 l4_uint64_t flags;
40 l4_uint16_t name[36];
41};
42
43} // namespace
44
45namespace Pc_partition_table {
46
47struct Part_table {
48 l4_uint8_t bootable;
49 l4_uint8_t first_sector_chs[3];
50 l4_uint8_t type;
51 l4_uint8_t last_sector_chs[3];
52 l4_uint32_t start_sector_lba;
53 l4_uint32_t num_sector_lba;
54} __attribute__((packed));
55
56} // namespace
57} // namespace
unsigned char l4_uint8_t
Unsigned 8bit value.
Definition l4int.h:36
unsigned int l4_uint32_t
Unsigned 32bit value.
Definition l4int.h:40
unsigned short int l4_uint16_t
Unsigned 16bit value.
Definition l4int.h:38
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:42
Common L4 ABI Data Types.