Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: firmware/lib/cgptlib/include/cgptlib_internal.h

Issue 2799019: Modify the size of the attributes field to comply with msc limitations. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Fix the attribute field to allow compilation in the BIOS environment. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « firmware/lib/cgptlib/cgptlib_internal.c ('k') | firmware/lib/cgptlib/include/gpt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 #ifndef VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ 6 #ifndef VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_
7 #define VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ 7 #define VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_
8 8
9 #include "sysincludes.h" 9 #include "sysincludes.h"
10 #include "cgptlib.h" 10 #include "cgptlib.h"
(...skipping 10 matching lines...) Expand all
21 * 63-61 -- (reserved) 21 * 63-61 -- (reserved)
22 * 60 -- read-only 22 * 60 -- read-only
23 * 59-57 -- (reserved) 23 * 59-57 -- (reserved)
24 * 56 -- success 24 * 56 -- success
25 * 55-52 -- tries 25 * 55-52 -- tries
26 * 51-48 -- priority 26 * 51-48 -- priority
27 * 47-2 -- UEFI: reserved for future use 27 * 47-2 -- UEFI: reserved for future use
28 * 1 -- UEFI: partition is not mapped 28 * 1 -- UEFI: partition is not mapped
29 * 0 -- UEFI: partition is required 29 * 0 -- UEFI: partition is required
30 */ 30 */
31 #define CGPT_ATTRIBUTE_SUCCESSFUL_OFFSET 56 31 #define CGPT_ATTRIBUTE_SUCCESSFUL_OFFSET (56 - 48)
32 #define CGPT_ATTRIBUTE_MAX_SUCCESSFUL (1ULL) 32 #define CGPT_ATTRIBUTE_MAX_SUCCESSFUL (1ULL)
33 #define CGPT_ATTRIBUTE_SUCCESSFUL_MASK (CGPT_ATTRIBUTE_MAX_SUCCESSFUL << \ 33 #define CGPT_ATTRIBUTE_SUCCESSFUL_MASK (CGPT_ATTRIBUTE_MAX_SUCCESSFUL << \
34 CGPT_ATTRIBUTE_SUCCESSFUL_OFFSET) 34 CGPT_ATTRIBUTE_SUCCESSFUL_OFFSET)
35 35
36 #define CGPT_ATTRIBUTE_TRIES_OFFSET 52 36 #define CGPT_ATTRIBUTE_TRIES_OFFSET (52 - 48)
37 #define CGPT_ATTRIBUTE_MAX_TRIES (15ULL) 37 #define CGPT_ATTRIBUTE_MAX_TRIES (15ULL)
38 #define CGPT_ATTRIBUTE_TRIES_MASK (CGPT_ATTRIBUTE_MAX_TRIES << \ 38 #define CGPT_ATTRIBUTE_TRIES_MASK (CGPT_ATTRIBUTE_MAX_TRIES << \
39 CGPT_ATTRIBUTE_TRIES_OFFSET) 39 CGPT_ATTRIBUTE_TRIES_OFFSET)
40 40
41 #define CGPT_ATTRIBUTE_PRIORITY_OFFSET 48 41 #define CGPT_ATTRIBUTE_PRIORITY_OFFSET (48 - 48)
42 #define CGPT_ATTRIBUTE_MAX_PRIORITY (15ULL) 42 #define CGPT_ATTRIBUTE_MAX_PRIORITY (15ULL)
43 #define CGPT_ATTRIBUTE_PRIORITY_MASK (CGPT_ATTRIBUTE_MAX_PRIORITY << \ 43 #define CGPT_ATTRIBUTE_PRIORITY_MASK (CGPT_ATTRIBUTE_MAX_PRIORITY << \
44 CGPT_ATTRIBUTE_PRIORITY_OFFSET) 44 CGPT_ATTRIBUTE_PRIORITY_OFFSET)
45 45
46 /* Defines ChromeOS-specific limitation on GPT */ 46 /* Defines ChromeOS-specific limitation on GPT */
47 #define MIN_SIZE_OF_HEADER 92 47 #define MIN_SIZE_OF_HEADER 92
48 #define MAX_SIZE_OF_HEADER 512 48 #define MAX_SIZE_OF_HEADER 512
49 #define MIN_SIZE_OF_ENTRY 128 49 #define MIN_SIZE_OF_ENTRY 128
50 #define MAX_SIZE_OF_ENTRY 512 50 #define MAX_SIZE_OF_ENTRY 512
51 #define SIZE_OF_ENTRY_MULTIPLE 8 51 #define SIZE_OF_ENTRY_MULTIPLE 8
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void SetEntryPriority(GptEntry* e, int priority); 106 void SetEntryPriority(GptEntry* e, int priority);
107 void SetEntryTries(GptEntry* e, int tries); 107 void SetEntryTries(GptEntry* e, int tries);
108 108
109 /* Return 1 if the entry is unused, 0 if it is used. */ 109 /* Return 1 if the entry is unused, 0 if it is used. */
110 int IsUnusedEntry(const GptEntry* e); 110 int IsUnusedEntry(const GptEntry* e);
111 111
112 /* Returns 1 if the entry is a Chrome OS kernel partition, else 0. */ 112 /* Returns 1 if the entry is a Chrome OS kernel partition, else 0. */
113 int IsKernelEntry(const GptEntry* e); 113 int IsKernelEntry(const GptEntry* e);
114 114
115 #endif /* VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ */ 115 #endif /* VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ */
OLDNEW
« no previous file with comments | « firmware/lib/cgptlib/cgptlib_internal.c ('k') | firmware/lib/cgptlib/include/gpt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698