/system/update_engine/common/ |
D | fake_boot_control.h | 50 BootControlInterface::Slot slot, in GetPartitionDevice() argument 55 GetPartitionDevice(partition_name, slot, current_slot_, not_in_payload); in GetPartitionDevice() 69 BootControlInterface::Slot slot, in GetPartitionDevice() argument 71 return GetPartitionDevice(partition_name, slot, false, device, nullptr); in GetPartitionDevice() 74 bool IsSlotBootable(BootControlInterface::Slot slot) const override { in IsSlotBootable() argument 75 return slot < num_slots_ && is_bootable_[slot]; in IsSlotBootable() 78 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override { in MarkSlotUnbootable() argument 79 if (slot >= num_slots_) in MarkSlotUnbootable() 81 is_bootable_[slot] = false; in MarkSlotUnbootable() 85 bool SetActiveBootSlot(Slot slot) override { return true; } in SetActiveBootSlot() argument [all …]
|
D | boot_control_interface.h | 67 Slot slot, 75 Slot slot, 80 uint32_t slot, 85 virtual bool IsSlotBootable(Slot slot) const = 0; 89 virtual bool MarkSlotUnbootable(Slot slot) = 0; 95 virtual bool SetActiveBootSlot(Slot slot) = 0; 109 virtual bool IsSlotMarkedSuccessful(Slot slot) const = 0; 115 static std::string SlotName(Slot slot) { in SlotName() argument 116 if (slot == kInvalidSlot) in SlotName() 118 if (slot < 26) in SlotName() [all …]
|
D | boot_control_stub.h | 44 Slot slot, 49 BootControlInterface::Slot slot, 53 uint32_t slot, 56 bool IsSlotBootable(BootControlInterface::Slot slot) const override; 57 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override; 58 bool SetActiveBootSlot(BootControlInterface::Slot slot) override; 61 bool IsSlotMarkedSuccessful(BootControlInterface::Slot slot) const override;
|
D | boot_control_stub.cc | 39 BootControlInterface::Slot slot, in GetPartitionDevice() argument 49 uint32_t slot, in GetPartitionDevice() argument 57 Slot slot, in GetPartitionDevice() argument 63 bool BootControlStub::IsSlotBootable(Slot slot) const { in IsSlotBootable() 68 bool BootControlStub::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument 73 bool BootControlStub::SetActiveBootSlot(Slot slot) { in SetActiveBootSlot() argument 84 bool BootControlStub::IsSlotMarkedSuccessful(Slot slot) const { in IsSlotMarkedSuccessful()
|
/system/nvram/core/tests/ |
D | fake_storage.cpp | 89 StorageSlot slot; member 98 if (g_spaces[i].slot.present() && g_spaces[i].index == index) { in FindSlotForIndex() 99 return &g_spaces[i].slot; in FindSlotForIndex() 109 StorageSlot* slot = FindSlotForIndex(index); in FindOrCreateSlotForIndex() local 110 if (slot) { in FindOrCreateSlotForIndex() 111 return slot; in FindOrCreateSlotForIndex() 116 if (!g_spaces[i].slot.present()) { in FindOrCreateSlotForIndex() 118 return &g_spaces[i].slot; in FindOrCreateSlotForIndex() 144 StorageSlot* slot = FindSlotForIndex(index); in LoadSpace() local 145 return slot ? slot->Load(blob) : Status::kNotFound; in LoadSpace() [all …]
|
/system/chre/apps/test/chqts/src/shared/ |
D | chunk_allocator.cc | 41 size_t slot = 0; in alloc() local 42 for (uint32_t mask = 1; slot < mSlotCount; slot++, mask <<= 1) { in alloc() 49 if (slot == mSlotCount) { in alloc() 53 return mRawMemory + (slot * mAllocSize); in alloc() 57 size_t slot; in free() local 58 if (!getSlot(pointer, &slot)) { in free() 61 mAllocatedSlots &= ~(1 << slot); in free() 66 size_t slot; in contains() local 67 return getSlot(pointer, &slot); in contains() 70 bool ChunkAllocatorBase::getSlot(const void *pointer, size_t *slot) const { in getSlot() [all …]
|
/system/update_engine/aosp/ |
D | boot_control_android.cc | 81 BootControlInterface::Slot slot, in GetPartitionDevice() argument 86 slot, in GetPartitionDevice() 94 BootControlInterface::Slot slot, in GetPartitionDevice() argument 97 partition_name, slot, false /* not_in_payload */, device, nullptr); in GetPartitionDevice() 100 bool BootControlAndroid::IsSlotBootable(Slot slot) const { in IsSlotBootable() 101 const auto ret = module_->IsSlotBootable(slot); in IsSlotBootable() 103 LOG(ERROR) << "Unable to determine if slot " << SlotName(slot) in IsSlotBootable() 110 bool BootControlAndroid::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument 111 const auto ret = module_->MarkSlotUnbootable(slot); in MarkSlotUnbootable() 114 << SlotName(slot) << ": " << ret.errMsg; in MarkSlotUnbootable() [all …]
|
D | boot_control_android.h | 50 uint32_t slot, 54 BootControlInterface::Slot slot, 59 BootControlInterface::Slot slot, 61 bool IsSlotBootable(BootControlInterface::Slot slot) const override; 62 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override; 63 bool SetActiveBootSlot(BootControlInterface::Slot slot) override; 65 bool IsSlotMarkedSuccessful(BootControlInterface::Slot slot) const override;
|
D | dynamic_partition_control_android.h | 68 uint32_t slot, 86 uint32_t slot, 92 uint32_t slot, 99 uint32_t slot, 117 bool IsDynamicPartition(const std::string& part_name, uint32_t slot) override; 134 const std::string& super_device, uint32_t slot); 160 uint32_t slot, 180 virtual std::string GetSuperPartitionName(uint32_t slot); 234 void SetSourceSlot(uint32_t slot) { source_slot_ = slot; } in SetSourceSlot() argument 235 void SetTargetSlot(uint32_t slot) { target_slot_ = slot; } in SetTargetSlot() argument [all …]
|
D | dynamic_partition_control_android.cc | 190 uint32_t slot, in MapPartitionInternal() argument 195 .metadata_slot = slot, in MapPartitionInternal() 229 uint32_t slot, in MapPartitionOnDeviceMapper() argument 262 super_device, target_partition_name, slot, force_writable, path); in MapPartitionOnDeviceMapper() 344 const std::string& super_device, uint32_t slot) { in LoadMetadataBuilder() argument 345 auto builder = MetadataBuilder::New(PartitionOpener(), super_device, slot); in LoadMetadataBuilder() 347 LOG(WARNING) << "No metadata slot " << BootControlInterface::SlotName(slot) in LoadMetadataBuilder() 352 << BootControlInterface::SlotName(slot) << " in " << super_device; in LoadMetadataBuilder() 986 uint32_t slot) { in GetSuperPartitionName() argument 987 return fs_mgr_get_super_partition_name(slot); in GetSuperPartitionName() [all …]
|
/system/extras/tests/bootloader/ |
D | bootctl.py | 38 def set_active_boot_slot(self, slot): argument 41 return self._exec("set-active-boot-slot " + str(slot))[0] == 0 43 def set_slot_as_unbootable_slot(self, slot): argument 46 return self._exec("set-slot-as-unbootable " + str(slot))[0] == 0 48 def is_slot_bootable(self, slot): argument 51 return self._exec("is-slot-bootable " + str(slot))[0] == 0 53 def is_slot_marked_successful(self, slot): argument 56 return self._exec("is-slot-marked-successful " + str(slot))[0] == 0 58 def get_suffix(self, slot): argument 61 return self._exec("get-suffix " + str(slot))[1].strip()
|
D | haltest.py | 34 for slot in range(num_slots): 35 suffix = self.bootctl.get_suffix(slot) 37 suffixes[suffix] = slot 49 slot = self.bootctl.get_current_slot() 50 self.assertTrue(self.bootctl.set_active_boot_slot(slot)) 51 self.assertFalse(self.bootctl.is_slot_marked_successful(slot)) 53 self.assertTrue(self.bootctl.is_slot_marked_successful(slot)) 58 self.assertTrue(self.bootctl.is_slot_marked_successful(slot)) 71 slot = self.bootctl.get_current_slot() 72 new_slot = (slot + 1) % num_slots [all …]
|
D | bootloadertest.py | 126 for slot in slots: 127 self.exists_yes_no("slot-unbootable:"+slot, var_all) 128 self.exists_yes_no("slot-unbootable:"+slot, var_all) 129 self.exists_integer("slot-retry-count:"+slot, var_all) 166 for slot in slots: 167 self.get_exists_yes_no("slot-unbootable:"+slot) 168 self.get_exists_yes_no("slot-successful:"+slot) 169 self.get_exists_integer("slot-retry-count:"+slot) 180 for slot in slots: 181 self.fastboot.set_active(slot) [all …]
|
/system/nvram/hal/ |
D | memory_storage.cpp | 64 StorageSlot slot; member 71 if (g_spaces[i].slot.present() && g_spaces[i].index == index) { in FindSpaceSlot() 72 return &g_spaces[i].slot; in FindSpaceSlot() 90 StorageSlot* slot = FindSpaceSlot(index); in LoadSpace() local 91 return slot ? slot->Load(blob) : Status::kNotFound; in LoadSpace() 95 StorageSlot* slot = FindSpaceSlot(index); in StoreSpace() local 96 if (slot) { in StoreSpace() 97 return slot->Store(blob); in StoreSpace() 102 if (!g_spaces[i].slot.present()) { in StoreSpace() 104 return g_spaces[i].slot.Store(blob); in StoreSpace() [all …]
|
/system/extras/boot_control_copy/ |
D | boot_control_copy.cpp | 125 int module_setActiveBootSlot(boot_control_module_t* module, unsigned slot) { in module_setActiveBootSlot() argument 131 if (slot >= 2) return -EINVAL; in module_setActiveBootSlot() 143 info.active_slot = slot; in module_setActiveBootSlot() 144 info.slot_info[slot].bootable = true; in module_setActiveBootSlot() 145 snprintf(info.bootctrl_suffix, sizeof(info.bootctrl_suffix), "_%c", slot + 'a'); in module_setActiveBootSlot() 153 snprintf(src_name, sizeof(src_name), "boot_%c", slot + 'a'); in module_setActiveBootSlot() 194 int module_setSlotAsUnbootable(struct boot_control_module* module, unsigned slot) { in module_setSlotAsUnbootable() argument 197 if (slot >= 2) return -EINVAL; in module_setSlotAsUnbootable() 209 info.slot_info[slot].bootable = false; in module_setSlotAsUnbootable() 219 int module_isSlotBootable(struct boot_control_module* module, unsigned slot) { in module_isSlotBootable() argument [all …]
|
/system/core/fs_mgr/libsnapshot/ |
D | device_info.cpp | 56 std::string DeviceInfo::GetSuperDevice(uint32_t slot) const { in GetSuperDevice() 57 return fs_mgr_get_super_partition_name(slot); in GetSuperDevice() 107 bool DeviceInfo::SetSlotAsUnbootable([[maybe_unused]] unsigned int slot) { in SetSlotAsUnbootable() argument 113 CommandResult result = boot_control_->MarkSlotUnbootable(slot); in SetSlotAsUnbootable() 115 LOG(ERROR) << "Error setting slot " << slot << " unbootable: " << result.errMsg; in SetSlotAsUnbootable()
|
D | device_info.h | 36 std::string GetSuperDevice(uint32_t slot) const override; 39 bool SetSlotAsUnbootable(unsigned int slot) override;
|
/system/extras/partition_tools/ |
D | lpdump.cc | 117 static std::string GetSuperPartitionName(const std::optional<uint32_t>& slot = {}) { in GetSuperPartitionName() argument 122 if (slot.has_value()) { 123 return super_partition + SlotSuffixForSlotNumber(slot.value()); 390 static std::unique_ptr<LpMetadata> ReadDeviceOrFile(const std::string& path, uint32_t slot) { in ReadDeviceOrFile() argument 394 return ReadMetadata(path, slot); in ReadDeviceOrFile() 418 std::optional<uint32_t> slot; in LpdumpMain() local 430 slot = slot_arg; in LpdumpMain() 432 slot = SlotNumberForSlotSuffix(optarg); in LpdumpMain() 452 if (slot.has_value()) { in LpdumpMain() 462 slot = 0; in LpdumpMain() [all …]
|
/system/keymint/common/src/ |
D | keyblob.rs | 205 fn get_secret(&self, slot: SecureDeletionSlot) -> Result<SecureDeletionData, Error>; in get_secret() 208 fn delete_secret(&mut self, slot: SecureDeletionSlot) -> Result<(), Error>; in delete_secret() 217 slot: Option<SecureDeletionSlot>, field 222 if let Some(slot) = self.slot.take() { in drop() 223 if let Err(e) = self.mgr.delete_secret(slot) { in drop() 224 error!("Failed to delete recently-acquired SDD slot {:?}: {:?}", slot, e); in drop() 237 let (slot, sdd) = mgr.new_secret(rng, purpose)?; in new() 238 Ok((Self { mgr, slot: Some(slot) }, sdd)) in new() 243 self.slot.take().unwrap() in consume() 402 (Some(slot), Some(sdd_mgr)) => Some(sdd_mgr.get_secret(slot)?), in decrypt()
|
/system/keymint/common/src/keyblob/ |
D | sdd_mem.rs | 63 fn get_secret(&self, slot: SecureDeletionSlot) -> Result<SecureDeletionData, Error> { in get_secret() 64 let idx = slot.0 as usize; in get_secret() 74 fn delete_secret(&mut self, slot: SecureDeletionSlot) -> Result<(), Error> { in delete_secret() 75 match self.slots[slot.0 as usize].take() { in delete_secret()
|
/system/core/fastboot/ |
D | task.cpp | 50 auto slot = slot_; in GetPartitionAndSlot() local 51 if (slot.empty()) { in GetPartitionAndSlot() 52 slot = get_current_slot(); in GetPartitionAndSlot() 54 if (slot.empty()) { in GetPartitionAndSlot() 57 if (slot == "all") { in GetPartitionAndSlot() 60 return pname_ + "_" + slot; in GetPartitionAndSlot() 270 const std::string& slot) in ResizeTask() argument 271 : fp_(fp), pname_(pname), size_(size), slot_(slot) {} in ResizeTask()
|
D | fastboot.cpp | 1316 std::string slot = slot_name; in verify_slot() local 1317 if (slot == "all") { in verify_slot() 1333 if (slot == "other") { in verify_slot() 1341 if (slot.size() == 1 && (slot[0] - 'a' >= 0 && slot[0] - 'a' < count)) return slot; in verify_slot() 1343 fprintf(stderr, "Slot %s does not exist. supported slots are:\n", slot.c_str()); in verify_slot() 1351 static std::string verify_slot(const std::string& slot) { in verify_slot() argument 1352 return verify_slot(slot, true); in verify_slot() 1355 static void do_for_partition(const std::string& part, const std::string& slot, in do_for_partition() argument 1367 if (slot == "") { in do_for_partition() 1374 part_tokens[0] += "_" + slot; in do_for_partition() [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_dm_linear.cpp | 140 uint32_t slot = SlotNumberForSlotSuffix(fs_mgr_get_slot_suffix()); in CreateLogicalPartitions() local 141 auto metadata = ReadMetadata(block_device.c_str(), slot); in CreateLogicalPartitions() 150 uint32_t slot = SlotNumberForSlotSuffix(fs_mgr_get_slot_suffix()); in ReadCurrentMetadata() local 151 return ReadMetadata(block_device.c_str(), slot); in ReadCurrentMetadata() 197 auto slot = *metadata_slot; in InitDefaults() local 198 if (owned->metadata = ReadMetadata(*partition_opener, block_device, slot); in InitDefaults()
|
/system/core/fs_mgr/libsnapshot/include/libsnapshot/ |
D | mock_device_info.h | 28 MOCK_METHOD(std::string, GetSuperDevice, (uint32_t slot), (const, override)); 32 MOCK_METHOD(bool, SetSlotAsUnbootable, (unsigned int slot), (override));
|
/system/core/fastboot/device/ |
D | utility.cpp | 139 bool GetSlotNumber(const std::string& slot, int32_t* number) { in GetSlotNumber() argument 140 if (slot.size() != 1) { in GetSlotNumber() 143 if (slot[0] < 'a' || slot[0] > 'z') { in GetSlotNumber() 146 *number = slot[0] - 'a'; in GetSlotNumber()
|