| Randall Spangler | 102bfba | 2010-05-24 15:14:33 -0700 | [diff] [blame] | 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 |
| 3 | * found in the LICENSE file. |
| 4 | */ |
| 5 | |
| 6 | /* Helper functions/wrappers for raw sector access to current boot device. */ |
| 7 | |
| 8 | #ifndef VBOOT_REFERENCE_BOOT_DEVICE_H_ |
| 9 | #define VBOOT_REFERENCE_BOOT_DEVICE_H_ |
| 10 | |
| Randall Spangler | f302905 | 2010-06-16 13:42:58 -0700 | [diff] [blame] | 11 | #include "sysincludes.h" |
| Randall Spangler | 102bfba | 2010-05-24 15:14:33 -0700 | [diff] [blame] | 12 | |
| 13 | int BootDeviceReadLBA(uint64_t lba_start, uint64_t lba_count, void *buffer); |
| 14 | /* Reads lba_count LBA sectors, starting at sector lba_start, from the current |
| 15 | * boot device, into the buffer. |
| 16 | * |
| 17 | * Returns 0 if successful or 1 if error. */ |
| 18 | |
| 19 | int BootDeviceWriteLBA(uint64_t lba_start, uint64_t lba_count, |
| 20 | const void *buffer); |
| 21 | /* Writes lba_count LBA sectors, starting at sector lba_start, to the current |
| 22 | * boot device, from the buffer. |
| 23 | * |
| 24 | * Returns 0 if successful or 1 if error. */ |
| 25 | |
| 26 | #endif /* VBOOT_REFERENCE_BOOT_DEVICE_H_ */ |