diff options
author | Tao Bao <tbao@google.com> | 2019-05-21 15:56:31 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-05-21 15:56:31 +0200 |
commit | 70bc3c40d235c952922ae1535c6403206b4eda53 (patch) | |
tree | 807d2ed2d3ae70d240b64a2c3178bced055d3449 /bootloader_message/include | |
parent | [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master (diff) | |
parent | Merge "Add misc_writer." (diff) | |
download | android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.tar android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.tar.gz android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.tar.bz2 android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.tar.lz android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.tar.xz android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.tar.zst android_bootable_recovery-70bc3c40d235c952922ae1535c6403206b4eda53.zip |
Diffstat (limited to 'bootloader_message/include')
-rw-r--r-- | bootloader_message/include/bootloader_message/bootloader_message.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h index 2207d4cb3..5c0a450fc 100644 --- a/bootloader_message/include/bootloader_message/bootloader_message.h +++ b/bootloader_message/include/bootloader_message/bootloader_message.h @@ -28,8 +28,9 @@ // 16K - 64K Used by uncrypt and recovery to store wipe_package for A/B devices // Note that these offsets are admitted by bootloader,recovery and uncrypt, so they // are not configurable without changing all of them. -static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0; -static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024; +constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0; +constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024; +constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024; /* Bootloader Message (2-KiB) * @@ -233,6 +234,14 @@ bool read_wipe_package(std::string* package_data, size_t size, std::string* err) // Write the wipe package into BCB (to offset WIPE_PACKAGE_OFFSET_IN_MISC). bool write_wipe_package(const std::string& package_data, std::string* err); +// Reads data from the vendor space in /misc partition, with the given offset and size. Note that +// offset is in relative to the start of vendor space. +bool ReadMiscPartitionVendorSpace(void* data, size_t size, size_t offset, std::string* err); + +// Writes the given data to the vendor space in /misc partition, at the given offset. Note that +// offset is in relative to the start of the vendor space. +bool WriteMiscPartitionVendorSpace(const void* data, size_t size, size_t offset, std::string* err); + #else #include <stdbool.h> |