Lines Matching refs:lkp
29 static LoadKernelParams lkp; variable
40 if (lba_start >= lkp.streaming_lba_count || in VbExDiskRead()
41 lba_start + lba_count > lkp.streaming_lba_count) { in VbExDiskRead()
43 lba_start, lba_count, lkp.streaming_lba_count); in VbExDiskRead()
47 fseek(image_file, lba_start * lkp.bytes_per_lba, SEEK_SET); in VbExDiskRead()
48 if (1 != fread(buffer, lba_count * lkp.bytes_per_lba, 1, image_file)) { in VbExDiskRead()
60 if (lba_start >= lkp.streaming_lba_count || in VbExDiskWrite()
61 lba_start + lba_count > lkp.streaming_lba_count) { in VbExDiskWrite()
63 lba_start, lba_count, lkp.streaming_lba_count); in VbExDiskWrite()
70 fseek(image_file, lba_start * lkp.bytes_per_lba, SEEK_SET); in VbExDiskWrite()
71 if (1 != fwrite(buffer, lba_count * lkp.bytes_per_lba, 1, image_file)) { in VbExDiskWrite()
92 Memset(&lkp, 0, sizeof(LoadKernelParams)); in main()
93 lkp.bytes_per_lba = LBA_BYTES; in main()
94 lkp.boot_flags = BOOT_FLAG_RECOVERY; in main()
97 lkp.nv_context = &vnc; in main()
107 lkp.boot_flags = strtoull(optarg, &e, 0); in main()
159 lkp.gbb_size = sizeof(GoogleBinaryBlockHeader) + key_size; in main()
160 lkp.gbb_data = (void*)malloc(lkp.gbb_size); in main()
161 gbb = (GoogleBinaryBlockHeader*)lkp.gbb_data; in main()
163 Memset(gbb, 0, lkp.gbb_size); in main()
179 lkp.shared_data_blob = malloc(VB_SHARED_DATA_REC_SIZE); in main()
180 lkp.shared_data_size = VB_SHARED_DATA_REC_SIZE; in main()
181 shared = (VbSharedDataHeader*)lkp.shared_data_blob; in main()
182 if (0 != VbSharedDataInit(shared, lkp.shared_data_size)) { in main()
197 printf("bootflags = %" PRIu64 "\n", lkp.boot_flags); in main()
207 lkp.streaming_lba_count = (ftell(image_file) / LBA_BYTES); in main()
208 lkp.gpt_lba_count = lkp.streaming_lba_count; in main()
210 printf("Streaming LBA count: %" PRIu64 "\n", lkp.streaming_lba_count); in main()
213 lkp.kernel_buffer = malloc(KERNEL_BUFFER_SIZE); in main()
214 if(!lkp.kernel_buffer) { in main()
218 lkp.kernel_buffer_size = KERNEL_BUFFER_SIZE; in main()
221 rv = LoadKernel(&lkp, &cparams); in main()
225 printf("Partition number: %" PRIu64 "\n", lkp.partition_number); in main()
226 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address); in main()
227 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size); in main()
231 lkp.partition_guid[3], in main()
232 lkp.partition_guid[2], in main()
233 lkp.partition_guid[1], in main()
234 lkp.partition_guid[0], in main()
235 lkp.partition_guid[5], in main()
236 lkp.partition_guid[4], in main()
237 lkp.partition_guid[7], in main()
238 lkp.partition_guid[6], in main()
239 lkp.partition_guid[8], in main()
240 lkp.partition_guid[9], in main()
241 lkp.partition_guid[10], in main()
242 lkp.partition_guid[11], in main()
243 lkp.partition_guid[12], in main()
244 lkp.partition_guid[13], in main()
245 lkp.partition_guid[14], in main()
246 lkp.partition_guid[15]); in main()
250 free(lkp.kernel_buffer); in main()