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

Side by Side Diff: host/arch/arm/lib/crossystem_arch.c

Issue 6780008: Refactor crossystem to move x86-specific implementation to its own file. (Closed) Base URL: ssh://gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: post-pull Created 9 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 | Annotate | Revision Log
« no previous file with comments | « host/Makefile ('k') | host/arch/x86/lib/crossystem_arch.c » ('j') | 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) 2011 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 <stdio.h>
7 #include <string.h>
8 #include <sys/types.h>
9 #include <sys/stat.h>
10 #include <unistd.h>
11 #include <ctype.h>
12
13 #include "host_common.h"
14
15 #include "crossystem.h"
16 #include "crossystem_arch.h"
17 #include "utility.h"
18 #include "vboot_common.h"
19 #include "vboot_nvstorage.h"
20 #include "vboot_struct.h"
21
22
23 int VbReadNvStorage(VbNvContext* vnc) {
24 /* TODO: IMPLEMENT ME! */
25 return -1;
26 }
27
28
29 int VbWriteNvStorage(VbNvContext* vnc) {
30 /* TODO: IMPLEMENT ME! */
31 return -1;
32 }
33
34
35 VbSharedDataHeader* VbSharedDataRead(void) {
36 /* TODO: IMPLEMENT ME! */
37 return NULL;
38 }
39
40
41 int VbGetArchPropertyInt(const char* name) {
42
43 /* TODO: IMPLEMENT ME! For now, return reasonable defaults for
44 * values where reasonable defaults exist. */
45 if (!strcasecmp(name,"recovery_reason")) {
46 } else if (!strcasecmp(name,"fmap_base")) {
47 }
48 /* Switch positions */
49 else if (!strcasecmp(name,"devsw_cur")) {
50 return 1;
51 } else if (!strcasecmp(name,"recoverysw_cur")) {
52 return 0;
53 } else if (!strcasecmp(name,"wpsw_cur")) {
54 return 1;
55 } else if (!strcasecmp(name,"devsw_boot")) {
56 return 1;
57 } else if (!strcasecmp(name,"recoverysw_boot")) {
58 return 0;
59 } else if (!strcasecmp(name,"recoverysw_ec_boot")) {
60 return 0;
61 } else if (!strcasecmp(name,"wpsw_boot")) {
62 return 1;
63 }
64
65 /* Saved memory is at a fixed location for all H2C BIOS. If the CHSW
66 * path exists in sysfs, it's a H2C BIOS. */
67 else if (!strcasecmp(name,"savedmem_base")) {
68 } else if (!strcasecmp(name,"savedmem_size")) {
69 }
70
71 return -1;
72 }
73
74
75 const char* VbGetArchPropertyString(const char* name, char* dest, int size) {
76 /* TODO: IMPLEMENT ME! For now, return reasonable defaults for
77 * values where reasonable defaults exist. */
78 if (!strcasecmp(name,"hwid")) {
79 return StrCopy(dest, "UnknownArmHwid", size);
80 } else if (!strcasecmp(name,"fwid")) {
81 return StrCopy(dest, "UnknownArmFwid", size);
82 } else if (!strcasecmp(name,"ro_fwid")) {
83 return StrCopy(dest, "UnknownArmRoFwid", size);
84 } else if (!strcasecmp(name,"mainfw_act")) {
85 return StrCopy(dest, "A", size);
86 } else if (!strcasecmp(name,"mainfw_type")) {
87 return StrCopy(dest, "developer", size);
88 } else if (!strcasecmp(name,"ecfw_act")) {
89 return StrCopy(dest, "RO", size);
90 }
91
92 return NULL;
93 }
94
95
96 int VbSetArchPropertyInt(const char* name, int value) {
97 /* TODO: IMPLEMENT ME! */
98 return -1;
99 }
100
101
102 int VbSetArchPropertyString(const char* name, const char* value) {
103 /* If there were settable architecture-dependent string properties,
104 * they'd be here. */
105 return -1;
106 }
OLDNEW
« no previous file with comments | « host/Makefile ('k') | host/arch/x86/lib/crossystem_arch.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698