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

Side by Side Diff: include/chromeos/firmware_storage.h

Issue 6628009: Add a wrapper function of LoadKernel() (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Code review: set gbb to NULL on error Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/chromeos/hardware_interface.h » ('j') | include/chromeos/load_util.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 * 5 *
6 * Alternatively, this software may be distributed under the terms of the 6 * Alternatively, this software may be distributed under the terms of the
7 * GNU General Public License ("GPL") version 2 as published by the Free 7 * GNU General Public License ("GPL") version 2 as published by the Free
8 * Software Foundation. 8 * Software Foundation.
9 */ 9 */
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 */ 58 */
59 off_t firmware_data_offset[2]; 59 off_t firmware_data_offset[2];
60 60
61 /* 61 /*
62 * These pointers will point to firmware data loaded by 62 * These pointers will point to firmware data loaded by
63 * GetFirmwareBody(). 63 * GetFirmwareBody().
64 */ 64 */
65 uint8_t *firmware_body[2]; 65 uint8_t *firmware_body[2];
66 } firmware_storage_t; 66 } firmware_storage_t;
67 67
68 /* Returns 0 if success, nonzero if error. */
69 int init_firmware_storage(firmware_storage_t *f);
70 int release_firmware_storage(firmware_storage_t *f);
71
68 /* Initialize fields for talking to GetFirmwareBody(). */ 72 /* Initialize fields for talking to GetFirmwareBody(). */
69 void GetFirmwareBody_setup(firmware_storage_t *f, 73 void GetFirmwareBody_setup(firmware_storage_t *f,
70 off_t firmware_data_offset_0, off_t firmware_data_offset_1); 74 off_t firmware_data_offset_0, off_t firmware_data_offset_1);
71 75
72 /* Dispose fields that are used for communicating with GetFirmwareBody(). */ 76 /* Dispose fields that are used for communicating with GetFirmwareBody(). */
73 void GetFirmwareBody_dispose(firmware_storage_t *f); 77 void GetFirmwareBody_dispose(firmware_storage_t *f);
74 78
75 /* 79 /*
76 * Read <count> bytes, starting from <offset>, from firmware storage 80 * Read <count> bytes, starting from <offset>, from firmware storage
77 * device <file> into buffer <buf>. 81 * device <file> into buffer <buf>.
78 * 82 *
79 * Return 0 on success, non-zero on error. 83 * Return 0 on success, non-zero on error.
80 */ 84 */
81 int read_firmware_device(firmware_storage_t *file, off_t offset, void *buf, 85 int read_firmware_device(firmware_storage_t *file, off_t offset, void *buf,
82 size_t count); 86 size_t count);
83 87
84 #endif /* __FIRMWARE_STORAGE_H_ */ 88 #endif /* __FIRMWARE_STORAGE_H_ */
OLDNEW
« no previous file with comments | « no previous file | include/chromeos/hardware_interface.h » ('j') | include/chromeos/load_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698