From 875235afbfa563180f0e25a18c05203da66f5bc6 Mon Sep 17 00:00:00 2001 From: Ilya Matyukhin Date: Wed, 15 Dec 2021 17:00:50 -0800 Subject: [PATCH 1/4] DO NOT MERGE Remove unintended face config Bug: 210921116 Test: N/A Change-Id: Ie10aaca6892b1246b57941d00b283f202b08035d --- device_framework_matrix_product.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 863fc2ab..5e4785ba 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -56,13 +56,6 @@ default - - com.google.face.debug - - IDebugHost - default - - com.google.edgetpu 2 From 61585265a100c65fc737e19c033fba3147377fdb Mon Sep 17 00:00:00 2001 From: Stephane Lee Date: Thu, 12 May 2022 17:13:26 -0700 Subject: [PATCH 2/4] Add device-specific support for GoogleBattery AIDL V1 Bug: 232461104 Test: Ensure Adaptive Charging/Battery health flags works as expected Change-Id: I381165a154f81f2017e1259daab19eaa9eba2fa7 --- device_framework_matrix_product.xml | 4 ++-- manifest.xml | 15 +++++++-------- manifest_64.xml | 15 +++++++-------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 3c24f9a0..c007ae20 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -134,9 +134,9 @@ default - + vendor.google.google_battery - 1.2 + 1 IGoogleBattery default diff --git a/manifest.xml b/manifest.xml index 1cb5345a..a306c704 100644 --- a/manifest.xml +++ b/manifest.xml @@ -133,14 +133,13 @@ default - - vendor.google.google_battery - hwbinder - 1.2 - - IGoogleBattery - default - + + vendor.google.google_battery + 1 + + IGoogleBattery + default + vendor.google.whitechapel.audio.audioext diff --git a/manifest_64.xml b/manifest_64.xml index 2190686b..a8b512be 100644 --- a/manifest_64.xml +++ b/manifest_64.xml @@ -125,14 +125,13 @@ default - - vendor.google.google_battery - hwbinder - 1.2 - - IGoogleBattery - default - + + vendor.google.google_battery + 1 + + IGoogleBattery + default + vendor.google.whitechapel.audio.audioext From 29c8d8c5ff707647fe69268da1c6e1477edc6f9e Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Wed, 8 Jun 2022 09:39:35 -0700 Subject: [PATCH 3/4] gs101: turn off page_pinner Page_pinner aimed for help tracking cma allocation failure. Since we are memory hungry and gs101 is lacking of critical usecases atm, we could disable it. It will return memory 0.78% memory. Bug: 235227018 Test: confirmed that no page_pinner directory in the debugfs. Signed-off-by: Minchan Kim Change-Id: I37a0c9ba76b278f813dff6e81b77438ab9e87d3c --- BoardConfig-common.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index b5843c7c..1b246e13 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -46,7 +46,6 @@ endif BOARD_KERNEL_CMDLINE += dyndbg=\"func alloc_contig_dump_pages +p\" BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10A00000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y -BOARD_KERNEL_CMDLINE += stack_depot_disable=off page_pinner=on BOARD_KERNEL_CMDLINE += swiotlb=noforce BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs From 9ecd004e6bf34260c17c39bb29d0a718fa01cd1f Mon Sep 17 00:00:00 2001 From: Jidong Sun Date: Fri, 3 Jun 2022 14:42:05 -0700 Subject: [PATCH 4/4] BootControl: blow AR on boot complete Bug: 232277507 Signed-off-by: Jidong Sun Change-Id: I684bc259407b3cbaa5dda9fdc16158d7bd4b4e02 --- interfaces/boot/1.2/BootControl.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/interfaces/boot/1.2/BootControl.cpp b/interfaces/boot/1.2/BootControl.cpp index a28be05a..6c480bb6 100644 --- a/interfaces/boot/1.2/BootControl.cpp +++ b/interfaces/boot/1.2/BootControl.cpp @@ -49,6 +49,8 @@ namespace { #define BOOT_B_PATH "/dev/block/by-name/boot_b" #define DEVINFO_PATH "/dev/block/by-name/devinfo" +#define BLOW_AR_PATH "/sys/kernel/boot_control/blow_ar" + // slot flags #define AB_ATTR_PRIORITY_SHIFT 52 #define AB_ATTR_PRIORITY_MASK (3UL << AB_ATTR_PRIORITY_SHIFT) @@ -174,6 +176,11 @@ static void DevInfoInitSlot(devinfo_ab_slot_data_t &slot_data) { slot_data.fastboot_ok = 0; } +static bool blowAR() { + android::base::unique_fd fd(open(BLOW_AR_PATH, O_WRONLY | O_DSYNC)); + return android::base::WriteStringToFd("1", fd); +} + } // namespace // Methods from ::android::hardware::boot::V1_0::IBootControl follow. @@ -211,7 +218,17 @@ Return BootControl::markBootSuccessful(markBootSuccessful_cb _hidl_cb) { ret = setSlotFlag(getCurrentSlot(), AB_ATTR_SUCCESSFUL); } - !ret ? _hidl_cb({false, "Failed to set successful flag"}) : _hidl_cb({true, ""}); + if (!ret) { + _hidl_cb({false, "Failed to set successful flag"}); + return Void(); + } + + if (!blowAR()) { + ALOGE("Failed to blow anti-rollback counter"); + // Ignore the error, since ABL will re-trigger it on reboot + } + + _hidl_cb({true, ""}); return Void(); }