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

Side by Side Diff: host/lib/crossystem.c

Issue 6580037: Add flashmap base address (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 10 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 | utility/crossystem_main.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 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "host_common.h" 9 #include "host_common.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #define BINF0_S3_RESUME_FAILED 10 54 #define BINF0_S3_RESUME_FAILED 10
55 /* Recovery caused by TPM error */ 55 /* Recovery caused by TPM error */
56 #define BINF0_RECOVERY_TPM_ERROR 11 56 #define BINF0_RECOVERY_TPM_ERROR 11
57 57
58 /* Base name for ACPI files */ 58 /* Base name for ACPI files */
59 #define ACPI_BASE_PATH "/sys/devices/platform/chromeos_acpi" 59 #define ACPI_BASE_PATH "/sys/devices/platform/chromeos_acpi"
60 /* Paths for frequently used ACPI files */ 60 /* Paths for frequently used ACPI files */
61 #define ACPI_BINF_PATH ACPI_BASE_PATH "/BINF" 61 #define ACPI_BINF_PATH ACPI_BASE_PATH "/BINF"
62 #define ACPI_CHNV_PATH ACPI_BASE_PATH "/CHNV" 62 #define ACPI_CHNV_PATH ACPI_BASE_PATH "/CHNV"
63 #define ACPI_CHSW_PATH ACPI_BASE_PATH "/CHSW" 63 #define ACPI_CHSW_PATH ACPI_BASE_PATH "/CHSW"
64 #define ACPI_FMAP_PATH ACPI_BASE_PATH "/FMAP"
64 #define ACPI_GPIO_PATH ACPI_BASE_PATH "/GPIO" 65 #define ACPI_GPIO_PATH ACPI_BASE_PATH "/GPIO"
65 66
66 /* Base name for GPIO files */ 67 /* Base name for GPIO files */
67 #define GPIO_BASE_PATH "/sys/class/gpio" 68 #define GPIO_BASE_PATH "/sys/class/gpio"
68 #define GPIO_EXPORT_PATH GPIO_BASE_PATH "/export" 69 #define GPIO_EXPORT_PATH GPIO_BASE_PATH "/export"
69 70
70 /* Base name for NVRAM file */ 71 /* Base name for NVRAM file */
71 #define NVRAM_PATH "/dev/nvram" 72 #define NVRAM_PATH "/dev/nvram"
72 73
73 74
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 else if (!strcasecmp(name,"recovery_request")) { 389 else if (!strcasecmp(name,"recovery_request")) {
389 value = VbGetCmosRebootField(CMOSRF_RECOVERY); 390 value = VbGetCmosRebootField(CMOSRF_RECOVERY);
390 } else if (!strcasecmp(name,"dbg_reset")) { 391 } else if (!strcasecmp(name,"dbg_reset")) {
391 value = VbGetCmosRebootField(CMOSRF_DEBUG_RESET); 392 value = VbGetCmosRebootField(CMOSRF_DEBUG_RESET);
392 } else if (!strcasecmp(name,"fwb_tries")) { 393 } else if (!strcasecmp(name,"fwb_tries")) {
393 value = VbGetCmosRebootField(CMOSRF_TRY_B); 394 value = VbGetCmosRebootField(CMOSRF_TRY_B);
394 } 395 }
395 /* Other parameters */ 396 /* Other parameters */
396 else if (!strcasecmp(name,"recovery_reason")) { 397 else if (!strcasecmp(name,"recovery_reason")) {
397 return VbGetRecoveryReason(); 398 return VbGetRecoveryReason();
399 } else if (!strcasecmp(name,"fmap_base")) {
400 value = ReadFileInt(ACPI_FMAP_PATH);
398 } 401 }
399 402
400 /* TODO: implement the following properties: 403 /* TODO: implement the following properties:
401 * nvram_cleared 404 * nvram_cleared
402 */ 405 */
403 406
404 return value; 407 return value;
405 } 408 }
406 409
407 410
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 470
468 471
469 /* Set a system property string. 472 /* Set a system property string.
470 * 473 *
471 * Returns 0 if success, -1 if error. */ 474 * Returns 0 if success, -1 if error. */
472 int VbSetSystemPropertyString(const char* name, const char* value) { 475 int VbSetSystemPropertyString(const char* name, const char* value) {
473 476
474 /* TODO: support setting */ 477 /* TODO: support setting */
475 return -1; 478 return -1;
476 } 479 }
OLDNEW
« no previous file with comments | « no previous file | utility/crossystem_main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698