diff options
Diffstat (limited to 'src/vendorcode/google')
-rw-r--r-- | src/vendorcode/google/Kconfig | 9 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/Kconfig | 21 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/Makefile.mk | 11 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/elog.c | 7 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/sar.c | 119 |
5 files changed, 159 insertions, 8 deletions
diff --git a/src/vendorcode/google/Kconfig b/src/vendorcode/google/Kconfig index 796f8b4089..b24c554147 100644 --- a/src/vendorcode/google/Kconfig +++ b/src/vendorcode/google/Kconfig @@ -28,3 +28,12 @@ config GOOGLE_DSM_PARAM_FILE_NAME On some boards, there are different dsm parameter files for Dynamic Speaker Management (DSM). Enable this config to assign dsm parameters file name in ACPI SSDT table. Kernel driver uses this to load the DSM parameter file. + +config MAINBOARD_HAS_GOOGLE_STRAUSS_KEYBOARD + bool + default n + help + Select this config to indicate that a board has Strauss keyboard. + +config ACPI_FNKEY_GEN_SCANCODE + default 94 if MAINBOARD_HAS_GOOGLE_STRAUSS_KEYBOARD diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig index 74f23d60ac..60f48fef33 100644 --- a/src/vendorcode/google/chromeos/Kconfig +++ b/src/vendorcode/google/chromeos/Kconfig @@ -102,5 +102,26 @@ config CHROMEBOOK_PLUS_LOGO_PATH depends on CHROMEOS_FW_SPLASH_SCREEN default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/logo.bmp" +config CHROMEOS_ENABLE_ESOL + def_bool FSP_UGOP_EARLY_SIGN_OF_LIFE || MAINBOARD_HAS_EARLY_LIBGFXINIT + help + Early sign-of-life (eSOL) provides an early boot notification during + critical firmware updates on Chrome OS devices, particularly for + updates requiring a restart (e.g., CSE and FSP). + + eSOL Implementation Options: + + - FSP uGOP: Closed-source solution from Intel's Firmware Support + Package. + - libgfxinit: Open-source graphics initialization library. + + Platforms before Intel Meteor Lake are expected to use the libgfxinit. + + Devices from Intel Meteor Lake onwards will utilize the Intel FSP + uGOP driver for eSOL. + + If your platform supports eSOL, enable it by selecting the + appropriate option. + endif # CHROMEOS endmenu diff --git a/src/vendorcode/google/chromeos/Makefile.mk b/src/vendorcode/google/chromeos/Makefile.mk index af37a0981e..44d4d2b7b5 100644 --- a/src/vendorcode/google/chromeos/Makefile.mk +++ b/src/vendorcode/google/chromeos/Makefile.mk @@ -23,12 +23,19 @@ romstage-$(CONFIG_CHROMEOS_DRAM_PART_NUMBER_IN_CBI) += dram_part_num_override.c ramstage-$(CONFIG_CHROMEOS_FW_SPLASH_SCREEN) += splash.c # Add logo to the cbfs image +BMP_LOGO_COMPRESS_FLAG := $(CBFS_COMPRESS_FLAG) +ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZMA),y) + BMP_LOGO_COMPRESS_FLAG := LZMA +else ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZ4),y) + BMP_LOGO_COMPRESS_FLAG := LZ4 +endif + cbfs-files-$(CONFIG_CHROMEOS_FW_SPLASH_SCREEN) += cb_logo.bmp cb_logo.bmp-file := $(call strip_quotes,$(CONFIG_CHROMEOS_LOGO_PATH)) cb_logo.bmp-type := raw -cb_logo.bmp-compression := $(CBFS_COMPRESS_FLAG) +cb_logo.bmp-compression := $(BMP_LOGO_COMPRESS_FLAG) cbfs-files-$(CONFIG_CHROMEOS_FW_SPLASH_SCREEN) += cb_plus_logo.bmp cb_plus_logo.bmp-file := $(call strip_quotes,$(CONFIG_CHROMEBOOK_PLUS_LOGO_PATH)) cb_plus_logo.bmp-type := raw -cb_plus_logo.bmp-compression := $(CBFS_COMPRESS_FLAG) +cb_plus_logo.bmp-compression := $(BMP_LOGO_COMPRESS_FLAG) diff --git a/src/vendorcode/google/chromeos/elog.c b/src/vendorcode/google/chromeos/elog.c index 4d3fc40537..e60cec83b0 100644 --- a/src/vendorcode/google/chromeos/elog.c +++ b/src/vendorcode/google/chromeos/elog.c @@ -10,6 +10,13 @@ static void elog_add_vboot_info(void *unused) { + /* + * Skip logging boot info if CSE sync scheduled at payload. + * The payload should log boot info after CSE sync. + */ + if (CONFIG(SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD)) + return; + /* Skip logging boot info in ACPI resume path */ if (acpi_is_wakeup_s3()) return; diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c index c42bf65437..eef3bb3df5 100644 --- a/src/vendorcode/google/chromeos/sar.c +++ b/src/vendorcode/google/chromeos/sar.c @@ -53,7 +53,7 @@ static uint8_t *wifi_hextostr(const char *sar_str, size_t str_len, size_t *sar_b return sar_bin; } -static int sar_table_size(const struct sar_profile *sar) +static size_t sar_table_size(const struct sar_profile *sar) { if (sar == NULL) return 0; @@ -62,7 +62,7 @@ static int sar_table_size(const struct sar_profile *sar) sar->subbands_count)); } -static int wgds_table_size(const struct geo_profile *geo) +static size_t wgds_table_size(const struct geo_profile *geo) { if (geo == NULL) return 0; @@ -70,7 +70,7 @@ static int wgds_table_size(const struct geo_profile *geo) return sizeof(struct geo_profile) + (geo->chains_count * geo->bands_count); } -static int gain_table_size(const struct gain_profile *gain) +static size_t gain_table_size(const struct gain_profile *gain) { if (gain == NULL) return 0; @@ -78,7 +78,7 @@ static int gain_table_size(const struct gain_profile *gain) return sizeof(struct gain_profile) + (gain->chains_count * gain->bands_count); } -static int sar_avg_table_size(const struct avg_profile *sar_avg) +static size_t sar_avg_table_size(const struct avg_profile *sar_avg) { if (sar_avg == NULL) return 0; @@ -86,7 +86,7 @@ static int sar_avg_table_size(const struct avg_profile *sar_avg) return sizeof(struct avg_profile); } -static int dsm_table_size(const struct dsm_profile *dsm) +static size_t dsm_table_size(const struct dsm_profile *dsm) { if (dsm == NULL) return 0; @@ -94,6 +94,98 @@ static int dsm_table_size(const struct dsm_profile *dsm) return sizeof(struct dsm_profile); } +static size_t bsar_table_size(const struct bsar_profile *bsar) +{ + int revs_offset = offsetof(struct bsar_profile, revs); + + if (bsar == NULL) + return 0; + + if (bsar->revision == 2) + return revs_offset + sizeof(bsar->revs.rev2); + return revs_offset + sizeof(bsar->revs.rev1); +} + +static size_t wbem_table_size(const struct wbem_profile *wbem) +{ + if (wbem == NULL) + return 0; + + return sizeof(struct wbem_profile); +} + +static size_t bpag_table_size(const struct bpag_profile *bpag) +{ + if (bpag == NULL) + return 0; + + return sizeof(struct bpag_profile); +} + +static size_t bbfb_table_size(const struct bbfb_profile *bbfb) +{ + if (bbfb == NULL) + return 0; + + return sizeof(struct bbfb_profile); +} + +static size_t bdcm_table_size(const struct bdcm_profile *bdcm) +{ + if (bdcm == NULL) + return 0; + + return sizeof(struct bdcm_profile); +} + +static size_t bbsm_table_size(const struct bbsm_profile *bbsm) +{ + if (bbsm == NULL) + return 0; + + return sizeof(struct bbsm_profile); +} + +static size_t bucs_table_size(const struct bucs_profile *bucs) +{ + if (bucs == NULL) + return 0; + + return sizeof(struct bucs_profile); +} + +static size_t bdmm_table_size(const struct bdmm_profile *bdmm) +{ + if (bdmm == NULL) + return 0; + + return sizeof(struct bdmm_profile); +} + +static size_t ebrd_table_size(const struct ebrd_profile *ebrd) +{ + if (ebrd == NULL) + return 0; + + return sizeof(struct ebrd_profile); +} + +static size_t wpfc_table_size(const struct wpfc_profile *wpfc) +{ + if (wpfc == NULL) + return 0; + + return sizeof(struct wpfc_profile); +} + +static size_t dsbr_table_size(const struct dsbr_profile *dsbr) +{ + if (dsbr == NULL) + return 0; + + return sizeof(struct dsbr_profile); +} + static bool valid_legacy_length(size_t bin_len) { if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE) @@ -105,7 +197,7 @@ static bool valid_legacy_length(size_t bin_len) return false; } -static int sar_header_size(void) +static size_t sar_header_size(void) { return (MAX_PROFILE_COUNT * sizeof(uint16_t)) + sizeof(struct sar_header); } @@ -145,6 +237,17 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t expected_sar_bin_size += gain_table_size(sar_limits->ppag); expected_sar_bin_size += sar_avg_table_size(sar_limits->wtas); expected_sar_bin_size += dsm_table_size(sar_limits->dsm); + expected_sar_bin_size += bsar_table_size(sar_limits->bsar); + expected_sar_bin_size += wbem_table_size(sar_limits->wbem); + expected_sar_bin_size += bpag_table_size(sar_limits->bpag); + expected_sar_bin_size += bbfb_table_size(sar_limits->bbfb); + expected_sar_bin_size += bdcm_table_size(sar_limits->bdcm); + expected_sar_bin_size += bbsm_table_size(sar_limits->bbsm); + expected_sar_bin_size += bucs_table_size(sar_limits->bucs); + expected_sar_bin_size += bdmm_table_size(sar_limits->bdmm); + expected_sar_bin_size += ebrd_table_size(sar_limits->ebrd); + expected_sar_bin_size += wpfc_table_size(sar_limits->wpfc); + expected_sar_bin_size += dsbr_table_size(sar_limits->dsbr); if (sar_bin_size != expected_sar_bin_size) { printk(BIOS_ERR, "Invalid SAR size, expected: %zu, obtained: %zu\n", @@ -210,6 +313,8 @@ static int fill_wifi_sar_limits_legacy(union wifi_sar_limits *sar_limits, * [PPAG_REVISION,MODE,CHAINS_COUNT,SUBBANDS_COUNT<PPAG_DATA>] * [WTAS_REVISION, WTAS_DATA] * [DSM_RETURN_VALUES] + * [BSAR_REVISION,IPML,LB,BR,EDR2,EDR3,LE,LE2,LE_LR] + * [WBEM_REVISION, WBEM_DATA] * * The configuration data will always have the revision added in the file for each of the * block, based on the revision number and validity, size of the specific block will be @@ -249,6 +354,8 @@ static int fill_wifi_sar_limits_legacy(union wifi_sar_limits *sar_limits, * [Enable/disable the TAS feature] * [Number of blocked countries that are not approved by the OEM to support this feature] * [deny_list_entry_<1-16>: ISO country code to block] + * [WBEM_DATA] = + * [Enable or disable 320MHZ Bandwidth for Japan, SouthKorea] */ int get_wifi_sar_limits(union wifi_sar_limits *sar_limits) { |