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

Side by Side Diff: src/platform/vboot_reference/cgptlib/cgpt.c

Issue 1547038: cgptlib stub for verified boot development. (Closed)
Patch Set: coding-style fix Created 10 years, 8 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 | « src/platform/vboot_reference/cgptlib/cgpt.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 #include "cgpt.h"
7
8 /* stub code */
9 static int start[] = { 34, 10034 };
10
11 int GPTInit(GPTData_t *gpt) {
12 gpt->current_kernel = 1;
13 return 0;
14 }
15
16 int GPTNextKernelEntry(GPTData_t *gpt, uint64_t *start_sector, uint64_t *size) {
17 gpt->current_kernel ^= 1;
18 if (start_sector) *start_sector = start[gpt->current_kernel];
19 if (size) *size = 10000;
20 return 0;
21 }
22
23 int GPTUpdateKernelEntry(GPTData_t *gpt, uint32_t update_type) {
24 gpt->modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) <<
25 gpt->current_kernel;
26 return 0;
27 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/cgptlib/cgpt.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698