blob: 7f18a1cf8d45b6bc2a925592acdf1a5f7a04e69d [file] [log] [blame]
Louis Yung-Chieh Loe1a25ab2010-04-20 10:52:41 -07001/* 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 */
9static int start[] = { 34, 10034 };
10
11int GPTInit(GPTData_t *gpt) {
12 gpt->current_kernel = 1;
13 return 0;
14}
15
16int 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
23int 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}