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

Side by Side Diff: utility/load_kernel_test.c

Issue 3041005: Add lots of debugging to TPM library. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Fix TPM unit tests Created 10 years, 5 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
« no previous file with comments | « tests/tpm_lite/writelimit.c ('k') | no next file » | 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) 2010 The Chromium OS Authors. All rights reserved. 1 /* 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 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 /* Routines for verifying a file's signature. Useful in testing the core 6 /* Routines for verifying a file's signature. Useful in testing the core
7 * RSA verification implementation. 7 * RSA verification implementation.
8 */ 8 */
9 9
10 #include <inttypes.h> /* For PRIu64 macro */ 10 #include <inttypes.h> /* For PRIu64 macro */
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 #include <sys/types.h> 14 #include <sys/types.h>
15 15
16 #include "load_kernel_fw.h" 16 #include "load_kernel_fw.h"
17 #include "boot_device.h" 17 #include "boot_device.h"
18 #include "host_common.h" 18 #include "host_common.h"
19 #include "rollback_index.h" 19 #include "rollback_index.h"
20 #include "utility.h" 20 #include "utility.h"
21 #include "vboot_kernel.h" 21 #include "vboot_kernel.h"
22 22
23 #define LBA_BYTES 512 23 #define LBA_BYTES 512
24 #define KERNEL_BUFFER_SIZE 0x600000 24 #define KERNEL_BUFFER_SIZE 0xA00000
25 25
26 /* Global variables for stub functions */ 26 /* Global variables for stub functions */
27 static LoadKernelParams lkp; 27 static LoadKernelParams lkp;
28 static FILE *image_file = NULL; 28 static FILE *image_file = NULL;
29 29
30 30
31 /* Boot device stub implementations to read from the image file */ 31 /* Boot device stub implementations to read from the image file */
32 int BootDeviceReadLBA(uint64_t lba_start, uint64_t lba_count, void *buffer) { 32 int BootDeviceReadLBA(uint64_t lba_start, uint64_t lba_count, void *buffer) {
33 printf("Read(%" PRIu64 ", %" PRIu64 ")\n", lba_start, lba_count); 33 printf("Read(%" PRIu64 ", %" PRIu64 ")\n", lba_start, lba_count);
34 34
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 if (LOAD_KERNEL_SUCCESS == rv) { 133 if (LOAD_KERNEL_SUCCESS == rv) {
134 printf("Partition number: %" PRIu64 "\n", lkp.partition_number); 134 printf("Partition number: %" PRIu64 "\n", lkp.partition_number);
135 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address); 135 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address);
136 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size); 136 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size);
137 } 137 }
138 138
139 fclose(image_file); 139 fclose(image_file);
140 Free(lkp.kernel_buffer); 140 Free(lkp.kernel_buffer);
141 return rv != LOAD_KERNEL_SUCCESS; 141 return rv != LOAD_KERNEL_SUCCESS;
142 } 142 }
OLDNEW
« no previous file with comments | « tests/tpm_lite/writelimit.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698