2 * This file is part of the coreboot project.
4 * Copyright (C) 2013 Google, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #define DOS_MAGIC 0x5a4d
32 uint16_t reserved1
[4];
35 uint16_t reserved2
[10];
39 #define MACHINE_TYPE_X86 0x014c
40 #define MACHINE_TYPE_X64 0x8664
44 uint16_t num_sections
;
48 uint16_t opt_header_size
;
49 uint16_t characteristics
;
52 #define PE_HDR_32_MAGIC 0x10b
55 uint8_t major_linker_version
;
56 uint8_t minor_linker_version
;
64 uint32_t section_alignment
;
65 uint32_t file_alignment
;
66 uint16_t major_os_version
;
67 uint16_t minor_os_version
;
68 uint16_t major_image_version
;
69 uint16_t minor_image_version
;
70 uint16_t major_subsystem_version
;
71 uint16_t minor_subsystem_version
;
77 uint16_t characteristics
;
78 uint32_t stack_reserve_size
;
79 uint32_t stack_commit_size
;
80 uint32_t heap_reserve_size
;
81 uint32_t heap_commit_size
;
82 uint32_t loader_flags
;
83 uint32_t number_of_va_and_sizes
;
84 /* data directory not needed */
87 #define PE_HDR_64_MAGIC 0x20b
90 uint8_t major_linker_version
;
91 uint8_t minor_linker_version
;
98 uint32_t section_alignment
;
99 uint32_t file_alignment
;
100 uint16_t major_os_version
;
101 uint16_t minor_os_version
;
102 uint16_t major_image_version
;
103 uint16_t minor_image_version
;
104 uint16_t major_subsystem_version
;
105 uint16_t minor_subsystem_version
;
108 uint32_t header_size
;
111 uint16_t characteristics
;
112 uint64_t stack_reserve_size
;
113 uint64_t stack_commit_size
;
114 uint64_t heap_reserve_size
;
115 uint64_t heap_commit_size
;
116 uint32_t loader_flags
;
117 uint32_t number_of_va_and_sizes
;
118 /* data directory not needed */
119 } pe_opt_header_64_t
;