summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2022-01-21 17:06:20 -0800
committerJulius Werner <jwerner@chromium.org>2022-02-07 23:29:09 +0000
commite9665959edeba6ae2d5364c4f7339704b6b6fd42 (patch)
treee3cd9e0e6e91c9b6bd5c6f586a9abee1d654b5dd /src/soc/amd/common/block
parent266041f0e62296737617cc2fcfa97f31e2b43aea (diff)
treewide: Remove "ERROR: "/"WARN: " prefixes from log messages
Now that the console system itself will clearly differentiate loglevels, it is no longer necessary to explicitly add "ERROR: " in front of every BIOS_ERR message to help it stand out more (and allow automated tooling to grep for it). Removing all these extra .rodata characters should save us a nice little amount of binary size. This patch was created by running find src/ -type f -exec perl -0777 -pi -e 's/printk\(\s*BIOS_ERR,\s*"ERROR: /printk\(BIOS_ERR, "/gi' '{}' ';' and doing some cursory review/cleanup on the result. Then doing the same thing for BIOS_WARN with 's/printk\(\s*BIOS_WARNING,\s*"WARN(ING)?: /printk\(BIOS_WARNING, "/gi' Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I3d0573acb23d2df53db6813cb1a5fc31b5357db8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61309 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Lance Zhao Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/acpi/bert.c2
-rw-r--r--src/soc/amd/common/block/acpi/gpio.c8
-rw-r--r--src/soc/amd/common/block/apob/apob_cache.c8
-rw-r--r--src/soc/amd/common/block/cpu/mca/mca_bert.c2
-rw-r--r--src/soc/amd/common/block/cpu/mca/mcax_bert.c2
-rw-r--r--src/soc/amd/common/block/cpu/noncar/memmap.c2
-rw-r--r--src/soc/amd/common/block/cpu/smm/smm_helper.c2
-rw-r--r--src/soc/amd/common/block/gpio/gpio.c4
-rw-r--r--src/soc/amd/common/block/lpc/espi_util.c45
-rw-r--r--src/soc/amd/common/block/lpc/spi_dma.c3
-rw-r--r--src/soc/amd/common/block/pci/amd_pci_util.c2
-rw-r--r--src/soc/amd/common/block/pm/pmlib.c2
-rw-r--r--src/soc/amd/common/block/smu/smu.c2
13 files changed, 41 insertions, 43 deletions
diff --git a/src/soc/amd/common/block/acpi/bert.c b/src/soc/amd/common/block/acpi/bert.c
index 968c9a6dc0..f20a4546b3 100644
--- a/src/soc/amd/common/block/acpi/bert.c
+++ b/src/soc/amd/common/block/acpi/bert.c
@@ -17,7 +17,7 @@ enum cb_err acpi_soc_get_bert_region(void **region, size_t *length)
bert_errors_region(region, length);
if (!*region) {
- printk(BIOS_ERR, "Error: Can't find BERT storage area\n");
+ printk(BIOS_ERR, "Can't find BERT storage area\n");
return CB_ERR;
}
diff --git a/src/soc/amd/common/block/acpi/gpio.c b/src/soc/amd/common/block/acpi/gpio.c
index b5167b8743..c4e3801545 100644
--- a/src/soc/amd/common/block/acpi/gpio.c
+++ b/src/soc/amd/common/block/acpi/gpio.c
@@ -7,13 +7,13 @@
static int acpigen_soc_gpio_op(const char *op, unsigned int gpio_num)
{
if (gpio_num >= SOC_GPIO_TOTAL_PINS) {
- printk(BIOS_WARNING, "Warning: Pin %d should be smaller than"
+ printk(BIOS_WARNING, "Pin %d should be smaller than"
" %d\n", gpio_num, SOC_GPIO_TOTAL_PINS);
return -1;
}
if (SOC_GPIO_TOTAL_PINS >= AMD_GPIO_FIRST_REMOTE_GPIO_NUMBER &&
gpio_num >= SOC_GPIO_TOTAL_PINS) {
- printk(BIOS_WARNING, "Warning: Pin %d is a remote GPIO which isn't supported"
+ printk(BIOS_WARNING, "Pin %d is a remote GPIO which isn't supported"
" yet.\n", gpio_num);
return -1;
}
@@ -26,13 +26,13 @@ static int acpigen_soc_gpio_op(const char *op, unsigned int gpio_num)
static int acpigen_soc_get_gpio_state(const char *op, unsigned int gpio_num)
{
if (gpio_num >= SOC_GPIO_TOTAL_PINS) {
- printk(BIOS_WARNING, "Warning: Pin %d should be smaller than"
+ printk(BIOS_WARNING, "Pin %d should be smaller than"
" %d\n", gpio_num, SOC_GPIO_TOTAL_PINS);
return -1;
}
if (SOC_GPIO_TOTAL_PINS >= AMD_GPIO_FIRST_REMOTE_GPIO_NUMBER &&
gpio_num >= SOC_GPIO_TOTAL_PINS) {
- printk(BIOS_WARNING, "Warning: Pin %d is a remote GPIO which isn't supported"
+ printk(BIOS_WARNING, "Pin %d is a remote GPIO which isn't supported"
" yet.\n", gpio_num);
return -1;
}
diff --git a/src/soc/amd/common/block/apob/apob_cache.c b/src/soc/amd/common/block/apob/apob_cache.c
index d538207f15..bdacd81ba4 100644
--- a/src/soc/amd/common/block/apob/apob_cache.c
+++ b/src/soc/amd/common/block/apob/apob_cache.c
@@ -67,7 +67,7 @@ static void *get_apob_dram_address(void)
static int get_nv_rdev(struct region_device *r)
{
if (fmap_locate_area_as_rdev(DEFAULT_MRC_CACHE, r) < 0) {
- printk(BIOS_ERR, "Error: No APOB NV region is found in flash\n");
+ printk(BIOS_ERR, "No APOB NV region is found in flash\n");
return -1;
}
@@ -180,7 +180,7 @@ static void soc_update_apob_cache(void *unused)
region_device_offset(&read_rdev), region_device_sz(&read_rdev));
if (fmap_locate_area_as_rdev_rw(DEFAULT_MRC_CACHE, &write_rdev) < 0) {
- printk(BIOS_ERR, "Error: No RW APOB NV region is found in flash\n");
+ printk(BIOS_ERR, "No RW APOB NV region is found in flash\n");
return;
}
@@ -188,14 +188,14 @@ static void soc_update_apob_cache(void *unused)
/* write data to flash region */
if (rdev_eraseat(&write_rdev, 0, DEFAULT_MRC_CACHE_SIZE) < 0) {
- printk(BIOS_ERR, "Error: APOB flash region erase failed\n");
+ printk(BIOS_ERR, "APOB flash region erase failed\n");
return;
}
timestamp_add_now(TS_AMD_APOB_WRITE_START);
if (rdev_writeat(&write_rdev, apob_src_ram, 0, apob_src_ram->size) < 0) {
- printk(BIOS_ERR, "Error: APOB flash region update failed\n");
+ printk(BIOS_ERR, "APOB flash region update failed\n");
return;
}
diff --git a/src/soc/amd/common/block/cpu/mca/mca_bert.c b/src/soc/amd/common/block/cpu/mca/mca_bert.c
index 93d5749f54..5ec68e58f0 100644
--- a/src/soc/amd/common/block/cpu/mca/mca_bert.c
+++ b/src/soc/amd/common/block/cpu/mca/mca_bert.c
@@ -91,5 +91,5 @@ void build_bert_mca_error(struct mca_bank_status *mci)
failed:
/* We're here because of a hardware error, don't break something else */
- printk(BIOS_ERR, "Error: Not enough room in BERT region for Machine Check error\n");
+ printk(BIOS_ERR, "Not enough room in BERT region for Machine Check error\n");
}
diff --git a/src/soc/amd/common/block/cpu/mca/mcax_bert.c b/src/soc/amd/common/block/cpu/mca/mcax_bert.c
index 8d864e855e..af2bee407d 100644
--- a/src/soc/amd/common/block/cpu/mca/mcax_bert.c
+++ b/src/soc/amd/common/block/cpu/mca/mcax_bert.c
@@ -91,5 +91,5 @@ void build_bert_mca_error(struct mca_bank_status *mci)
failed:
/* We're here because of a hardware error, don't break something else */
- printk(BIOS_ERR, "Error: Not enough room in BERT region for Machine Check error\n");
+ printk(BIOS_ERR, "Not enough room in BERT region for Machine Check error\n");
}
diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c
index 325e36b106..8f37f1ab42 100644
--- a/src/soc/amd/common/block/cpu/noncar/memmap.c
+++ b/src/soc/amd/common/block/cpu/noncar/memmap.c
@@ -47,7 +47,7 @@ void smm_region(uintptr_t *start, size_t *size)
status = fsp_find_range_hob(&tseg, AMD_FSP_TSEG_HOB_GUID.b);
if (status < 0) {
- printk(BIOS_ERR, "Error: unable to find TSEG HOB\n");
+ printk(BIOS_ERR, "unable to find TSEG HOB\n");
return;
}
diff --git a/src/soc/amd/common/block/cpu/smm/smm_helper.c b/src/soc/amd/common/block/cpu/smm/smm_helper.c
index bf01b8b965..ce80f1613c 100644
--- a/src/soc/amd/common/block/cpu/smm/smm_helper.c
+++ b/src/soc/amd/common/block/cpu/smm/smm_helper.c
@@ -19,7 +19,7 @@ void clear_tvalid(void)
if (!tvalid) /* not valid but locked means still accessible */
return;
- printk(BIOS_ERR, "Error: can't clear TValid, already locked\n");
+ printk(BIOS_ERR, "can't clear TValid, already locked\n");
return;
}
diff --git a/src/soc/amd/common/block/gpio/gpio.c b/src/soc/amd/common/block/gpio/gpio.c
index 163de2de58..bc3bcab035 100644
--- a/src/soc/amd/common/block/gpio/gpio.c
+++ b/src/soc/amd/common/block/gpio/gpio.c
@@ -85,7 +85,7 @@ static void program_smi(uint32_t flags, unsigned int gevent_num)
uint8_t level;
if (!is_gpio_event_level_triggered(flags)) {
- printk(BIOS_ERR, "ERROR: %s - Only level trigger allowed for SMI!\n", __func__);
+ printk(BIOS_ERR, "%s - Only level trigger allowed for SMI!\n", __func__);
BUG();
return;
}
@@ -247,7 +247,7 @@ static void set_single_gpio(const struct soc_amd_gpio *g)
gevent_num = get_gpio_gevent(g->gpio, gev_tbl, gev_items);
if (gevent_num < 0) {
- printk(BIOS_WARNING, "Warning: GPIO pin %d has no associated gevent!\n",
+ printk(BIOS_WARNING, "GPIO pin %d has no associated gevent!\n",
g->gpio);
return;
}
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c
index ae742c5e88..c1d0a5799a 100644
--- a/src/soc/amd/common/block/lpc/espi_util.c
+++ b/src/soc/amd/common/block/lpc/espi_util.c
@@ -187,7 +187,7 @@ static enum cb_err espi_open_generic_io_window(uint16_t base, size_t size)
if (idx == -1) {
printk(BIOS_ERR, "Cannot open IO window base %x size %zx\n", base,
size);
- printk(BIOS_ERR, "ERROR: No more available IO windows!\n");
+ printk(BIOS_ERR, "No more available IO windows!\n");
return CB_ERR;
}
@@ -279,7 +279,7 @@ enum cb_err espi_open_mmio_window(uint32_t base, size_t size)
if (idx == -1) {
printk(BIOS_ERR, "Cannot open IO window base %x size %zx\n", base,
size);
- printk(BIOS_ERR, "ERROR: No more available MMIO windows!\n");
+ printk(BIOS_ERR, "No more available MMIO windows!\n");
return CB_ERR;
}
@@ -418,7 +418,7 @@ static enum cb_err espi_poll_status(uint32_t *status)
return CB_SUCCESS;
} while (!stopwatch_expired(&sw));
- printk(BIOS_ERR, "Error: eSPI timed out waiting for status update.\n");
+ printk(BIOS_ERR, "eSPI timed out waiting for status update.\n");
return CB_ERR;
}
@@ -609,7 +609,7 @@ static void espi_set_io_mode_config(enum espi_io_mode mb_io_mode, uint32_t slave
*ctrlr_config |= ESPI_IO_MODE_QUAD;
break;
}
- printk(BIOS_ERR, "Error: eSPI Quad I/O not supported. Dropping to dual mode.\n");
+ printk(BIOS_ERR, "eSPI Quad I/O not supported. Dropping to dual mode.\n");
/* Intentional fall-through */
case ESPI_IO_MODE_DUAL:
if (espi_slave_supports_dual_io(slave_caps)) {
@@ -617,8 +617,7 @@ static void espi_set_io_mode_config(enum espi_io_mode mb_io_mode, uint32_t slave
*ctrlr_config |= ESPI_IO_MODE_DUAL;
break;
}
- printk(BIOS_ERR,
- "Error: eSPI Dual I/O not supported. Dropping to single mode.\n");
+ printk(BIOS_ERR, "eSPI Dual I/O not supported. Dropping to single mode.\n");
/* Intentional fall-through */
case ESPI_IO_MODE_SINGLE:
/* Single I/O mode is always supported. */
@@ -642,7 +641,7 @@ static void espi_set_op_freq_config(enum espi_op_freq mb_op_freq, uint32_t slave
*ctrlr_config |= ESPI_OP_FREQ_66_MHZ;
break;
}
- printk(BIOS_ERR, "Error: eSPI 66MHz not supported. Dropping to 33MHz.\n");
+ printk(BIOS_ERR, "eSPI 66MHz not supported. Dropping to 33MHz.\n");
/* Intentional fall-through */
case ESPI_OP_FREQ_33_MHZ:
if (slave_max_speed_mhz >= 33) {
@@ -650,7 +649,7 @@ static void espi_set_op_freq_config(enum espi_op_freq mb_op_freq, uint32_t slave
*ctrlr_config |= ESPI_OP_FREQ_33_MHZ;
break;
}
- printk(BIOS_ERR, "Error: eSPI 33MHz not supported. Dropping to 16MHz.\n");
+ printk(BIOS_ERR, "eSPI 33MHz not supported. Dropping to 16MHz.\n");
/* Intentional fall-through */
case ESPI_OP_FREQ_16_MHZ:
/*
@@ -732,7 +731,7 @@ static enum cb_err espi_wait_channel_ready(uint16_t slave_reg_addr)
return CB_SUCCESS;
} while (!stopwatch_expired(&sw));
- printk(BIOS_ERR, "Error: Channel is not ready after %d usec (slave addr: 0x%x)\n",
+ printk(BIOS_ERR, "Channel is not ready after %d usec (slave addr: 0x%x)\n",
ESPI_CH_READY_TIMEOUT_US, slave_reg_addr);
return CB_ERR;
@@ -777,7 +776,7 @@ static enum cb_err espi_setup_vw_channel(const struct espi_config *mb_cfg, uint3
return CB_SUCCESS;
if (!espi_slave_supports_vw_channel(slave_caps)) {
- printk(BIOS_ERR, "Error: eSPI slave doesn't support VW channel!\n");
+ printk(BIOS_ERR, "eSPI slave doesn't support VW channel!\n");
return CB_ERR;
}
@@ -812,7 +811,7 @@ static enum cb_err espi_setup_periph_channel(const struct espi_config *mb_cfg,
*/
if (mb_cfg->periph_ch_en) {
if (!espi_slave_supports_periph_channel(slave_caps)) {
- printk(BIOS_ERR, "Error: eSPI slave doesn't support periph channel!\n");
+ printk(BIOS_ERR, "eSPI slave doesn't support periph channel!\n");
return CB_ERR;
}
slave_config |= slave_en_mask;
@@ -834,7 +833,7 @@ static enum cb_err espi_setup_oob_channel(const struct espi_config *mb_cfg, uint
return CB_SUCCESS;
if (!espi_slave_supports_oob_channel(slave_caps)) {
- printk(BIOS_ERR, "Error: eSPI slave doesn't support OOB channel!\n");
+ printk(BIOS_ERR, "eSPI slave doesn't support OOB channel!\n");
return CB_ERR;
}
@@ -856,7 +855,7 @@ static enum cb_err espi_setup_flash_channel(const struct espi_config *mb_cfg,
return CB_SUCCESS;
if (!espi_slave_supports_flash_channel(slave_caps)) {
- printk(BIOS_ERR, "Error: eSPI slave doesn't support flash channel!\n");
+ printk(BIOS_ERR, "eSPI slave doesn't support flash channel!\n");
return CB_ERR;
}
@@ -928,7 +927,7 @@ enum cb_err espi_setup(void)
* The resets affects both host and slave devices, so set initial config again.
*/
if (espi_send_reset() != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: In-band reset failed!\n");
+ printk(BIOS_ERR, "In-band reset failed!\n");
return CB_ERR;
}
espi_set_initial_config(cfg);
@@ -938,7 +937,7 @@ enum cb_err espi_setup(void)
* Get configuration of slave device.
*/
if (espi_get_general_configuration(&slave_caps) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Slave GET_CONFIGURATION failed!\n");
+ printk(BIOS_ERR, "Slave GET_CONFIGURATION failed!\n");
return CB_ERR;
}
@@ -948,7 +947,7 @@ enum cb_err espi_setup(void)
* Step 5: Set host slave config
*/
if (espi_set_general_configuration(cfg, slave_caps) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Slave SET_CONFIGURATION failed!\n");
+ printk(BIOS_ERR, "Slave SET_CONFIGURATION failed!\n");
return CB_ERR;
}
@@ -964,39 +963,39 @@ enum cb_err espi_setup(void)
*/
/* Set up VW first so we can deassert PLTRST#. */
if (espi_setup_vw_channel(cfg, slave_caps) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Setup VW channel failed!\n");
+ printk(BIOS_ERR, "Setup VW channel failed!\n");
return CB_ERR;
}
/* Assert PLTRST# if VW channel is enabled by mainboard. */
if (espi_send_pltrst(cfg, true) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: PLTRST# assertion failed!\n");
+ printk(BIOS_ERR, "PLTRST# assertion failed!\n");
return CB_ERR;
}
/* De-assert PLTRST# if VW channel is enabled by mainboard. */
if (espi_send_pltrst(cfg, false) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: PLTRST# deassertion failed!\n");
+ printk(BIOS_ERR, "PLTRST# deassertion failed!\n");
return CB_ERR;
}
if (espi_setup_periph_channel(cfg, slave_caps) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Setup Periph channel failed!\n");
+ printk(BIOS_ERR, "Setup Periph channel failed!\n");
return CB_ERR;
}
if (espi_setup_oob_channel(cfg, slave_caps) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Setup OOB channel failed!\n");
+ printk(BIOS_ERR, "Setup OOB channel failed!\n");
return CB_ERR;
}
if (espi_setup_flash_channel(cfg, slave_caps) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Setup Flash channel failed!\n");
+ printk(BIOS_ERR, "Setup Flash channel failed!\n");
return CB_ERR;
}
if (espi_configure_decodes(cfg) != CB_SUCCESS) {
- printk(BIOS_ERR, "Error: Configuring decodes failed!\n");
+ printk(BIOS_ERR, "Configuring decodes failed!\n");
return CB_ERR;
}
diff --git a/src/soc/amd/common/block/lpc/spi_dma.c b/src/soc/amd/common/block/lpc/spi_dma.c
index 2c183ee705..97ba2be244 100644
--- a/src/soc/amd/common/block/lpc/spi_dma.c
+++ b/src/soc/amd/common/block/lpc/spi_dma.c
@@ -147,8 +147,7 @@ static bool continue_spi_dma_transaction(const struct region_device *rd,
thread_mutex_unlock(&spi_hw_mutex);
if (spi_dma_has_error()) {
- printk(BIOS_ERR,
- "ERROR: SPI DMA failure: dest: %p, source: %#zx, size: %zu\n",
+ printk(BIOS_ERR, "SPI DMA failure: dest: %p, source: %#zx, size: %zu\n",
transaction->destination, transaction->source,
transaction->transfer_size);
return false;
diff --git a/src/soc/amd/common/block/pci/amd_pci_util.c b/src/soc/amd/common/block/pci/amd_pci_util.c
index 9c80ef8fa4..6c5565f268 100644
--- a/src/soc/amd/common/block/pci/amd_pci_util.c
+++ b/src/soc/amd/common/block/pci/amd_pci_util.c
@@ -97,7 +97,7 @@ void write_pci_cfg_irqs(void)
idx_name = sb_get_apic_reg_association(&limit);
if (pirq_data_ptr == NULL) {
- printk(BIOS_WARNING, "Warning: Can't write PCI IRQ assignments"
+ printk(BIOS_WARNING, "Can't write PCI IRQ assignments"
" because 'mainboard_pirq_data' structure does"
" not exist\n");
return;
diff --git a/src/soc/amd/common/block/pm/pmlib.c b/src/soc/amd/common/block/pm/pmlib.c
index f1b0b27d6a..5ce6b7bd0e 100644
--- a/src/soc/amd/common/block/pm/pmlib.c
+++ b/src/soc/amd/common/block/pm/pmlib.c
@@ -31,7 +31,7 @@ void pm_set_power_failure_state(void)
pwr_fail |= PWR_FAIL_PREV;
break;
default:
- printk(BIOS_WARNING, "WARNING: Unknown power-failure state: %d\n",
+ printk(BIOS_WARNING, "Unknown power-failure state: %d\n",
CONFIG_MAINBOARD_POWER_FAILURE_STATE);
pwr_fail |= PWR_FAIL_OFF;
break;
diff --git a/src/soc/amd/common/block/smu/smu.c b/src/soc/amd/common/block/smu/smu.c
index f48a9d5c45..d68867cae9 100644
--- a/src/soc/amd/common/block/smu/smu.c
+++ b/src/soc/amd/common/block/smu/smu.c
@@ -29,7 +29,7 @@ static int32_t smu_poll_response(bool print_command_duration)
}
} while (!stopwatch_expired(&sw));
- printk(BIOS_ERR, "Error: timeout sending SMU message\n");
+ printk(BIOS_ERR, "timeout sending SMU message\n");
return SMU_MESG_RESP_TIMEOUT;
}