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

Side by Side Diff: cbootimage.h

Issue 6676023: Initialize the bad block table when create the bct file from scratch, (Closed) Base URL: http://git.chromium.org/git/cbootimage.git@master
Patch Set: 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 | data_layout.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. 2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * See file CREDITS for list of people who contributed to this 4 * See file CREDITS for list of people who contributed to this
5 * project. 5 * project.
6 * 6 *
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of 9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version. 10 * the License, or (at your option) any later version.
(...skipping 15 matching lines...) Expand all
26 26
27 #ifndef INCLUDED_BUILDIMAGE_H 27 #ifndef INCLUDED_BUILDIMAGE_H
28 #define INCLUDED_BUILDIMAGE_H 28 #define INCLUDED_BUILDIMAGE_H
29 29
30 #include "nvboot_bct.h" 30 #include "nvboot_bct.h"
31 #include "nvbctlib.h" 31 #include "nvbctlib.h"
32 #include <stdio.h> 32 #include <stdio.h>
33 #include <stdlib.h> 33 #include <stdlib.h>
34 #include <assert.h> 34 #include <assert.h>
35 #include <errno.h> 35 #include <errno.h>
36 #include <math.h>
36 37
37 #define NVBOOT_AES_BLOCK_SIZE_LOG2 4 38 #define NVBOOT_AES_BLOCK_SIZE_LOG2 4
38 #define MAX_BUFFER 200 39 #define MAX_BUFFER 200
39 #define MAX_STR_LEN 20 40 #define MAX_STR_LEN 20
40 #define MAX_BOOTLOADER_SIZE (16 * 1024 * 1024) 41 #define MAX_BOOTLOADER_SIZE (16 * 1024 * 1024)
41 #define NVBOOT_BOOTDATA_VERSION(a, b) ((((a)&0xffff) << 16) | ((b)&0xffff)) 42 #define NVBOOT_BOOTDATA_VERSION(a, b) ((((a)&0xffff) << 16) | ((b)&0xffff))
43 #define NVBOOT_BAD_BLOCK_TABLE_SIZE 4096
44 #define NV_MAX(a, b) (((a) > (b)) ? (a) : (b))
42 45
43 /* 46 /*
44 * Enumerations 47 * Enumerations
45 */ 48 */
46 49
47 typedef enum 50 typedef enum
48 { 51 {
49 file_type_bl = 0, 52 file_type_bl = 0,
50 file_type_bct, 53 file_type_bct,
51 file_type_addon 54 file_type_addon
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 (void)context->bctlib.get_value(nvbct_lib_id_##id, \ 134 (void)context->bctlib.get_value(nvbct_lib_id_##id, \
132 ptr, \ 135 ptr, \
133 context->bct); 136 context->bct);
134 137
135 #define SET_VALUE(id, value) \ 138 #define SET_VALUE(id, value) \
136 (void)context->bctlib.set_value(nvbct_lib_id_##id, \ 139 (void)context->bctlib.set_value(nvbct_lib_id_##id, \
137 value, \ 140 value, \
138 context->bct); 141 context->bct);
139 142
140 #endif /* #ifndef INCLUDED_BUILDIMAGE_H */ 143 #endif /* #ifndef INCLUDED_BUILDIMAGE_H */
OLDNEW
« no previous file with comments | « no previous file | data_layout.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698