diff options
-rw-r--r-- | common/acpi.c | 12 | ||||
-rw-r--r-- | common/button.c | 4 | ||||
-rw-r--r-- | common/charge_state_v2.c | 12 | ||||
-rw-r--r-- | common/event_log.c | 2 | ||||
-rw-r--r-- | common/host_command_controller.c | 4 | ||||
-rw-r--r-- | common/keyboard_scan.c | 22 | ||||
-rw-r--r-- | common/mkbp_input_devices.c | 2 | ||||
-rw-r--r-- | common/port80.c | 6 | ||||
-rw-r--r-- | core/cortex-m/ec.lds.S | 9 | ||||
-rw-r--r-- | core/cortex-m0/ec.lds.S | 1 | ||||
-rw-r--r-- | core/nds32/ec.lds.S | 1 | ||||
-rw-r--r-- | core/riscv-rv32i/ec.lds.S | 1 | ||||
-rw-r--r-- | include/common.h | 10 |
13 files changed, 32 insertions, 54 deletions
diff --git a/common/acpi.c b/common/acpi.c index 941a8b2e56..d697eb7cd9 100644 --- a/common/acpi.c +++ b/common/acpi.c @@ -28,17 +28,17 @@ #define CPRINTS(format, args...) cprints(CC_LPC, format, ## args) /* Last received ACPI command */ -static uint8_t __bss_slow acpi_cmd; +static uint8_t acpi_cmd; /* First byte of data after ACPI command */ -static uint8_t __bss_slow acpi_addr; +static uint8_t acpi_addr; /* Number of data writes after command */ -static int __bss_slow acpi_data_count; +static int acpi_data_count; /* Test byte in ACPI memory space */ -static uint8_t __bss_slow acpi_mem_test; +static uint8_t acpi_mem_test; #ifdef CONFIG_DPTF -static int __bss_slow dptf_temp_sensor_id; /* last sensor ID written */ -static int __bss_slow dptf_temp_threshold; /* last threshold written */ +static int dptf_temp_sensor_id; /* last sensor ID written */ +static int dptf_temp_threshold; /* last threshold written */ /* * Current DPTF profile number. diff --git a/common/button.c b/common/button.c index 03bdb1234f..d30115066d 100644 --- a/common/button.c +++ b/common/button.c @@ -31,9 +31,9 @@ struct button_state_t { int debounced_pressed; }; -static struct button_state_t __bss_slow state[BUTTON_COUNT]; +static struct button_state_t state[BUTTON_COUNT]; -static uint64_t __bss_slow next_deferred_time; +static uint64_t next_deferred_time; #if defined(CONFIG_CMD_BUTTON) || defined(CONFIG_HOSTCMD_BUTTON) #define CONFIG_SIMULATED_BUTTON diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c index abfabda7a3..e767ec8d83 100644 --- a/common/charge_state_v2.c +++ b/common/charge_state_v2.c @@ -191,8 +191,8 @@ BUILD_ASSERT(ARRAY_SIZE(prob_text) == NUM_PROBLEM_TYPES); */ static void problem(enum problem_type p, int v) { - static int __bss_slow last_prob_val[NUM_PROBLEM_TYPES]; - static timestamp_t __bss_slow last_prob_time[NUM_PROBLEM_TYPES]; + static int last_prob_val[NUM_PROBLEM_TYPES]; + static timestamp_t last_prob_time[NUM_PROBLEM_TYPES]; timestamp_t t_now, t_diff; if (last_prob_val[p] != v) { @@ -848,7 +848,7 @@ static void update_dynamic_battery_info(void) uint8_t tmp; int send_batt_status_event = 0; int send_batt_info_event = 0; - static int __bss_slow batt_present; + static int batt_present; tmp = 0; if (curr.ac) @@ -1027,7 +1027,7 @@ static int update_static_battery_info(void) static void update_dynamic_battery_info(void) { - static int __bss_slow batt_present; + static int batt_present; uint8_t tmp; int send_batt_status_event = 0; int send_batt_info_event = 0; @@ -1282,7 +1282,7 @@ static void show_charging_progress(void) /* Calculate if battery is full based on whether it is accepting charge */ test_mockable int calc_is_full(void) { - static int __bss_slow ret; + static int ret; /* If bad state of charge reading, return last value */ if (curr.batt.flags & BATT_FLAG_BAD_STATE_OF_CHARGE || @@ -1306,7 +1306,7 @@ test_mockable int calc_is_full(void) static int charge_request(int voltage, int current) { int r1 = EC_SUCCESS, r2 = EC_SUCCESS, r3 = EC_SUCCESS, r4 = EC_SUCCESS; - static int __bss_slow prev_volt, prev_curr; + static int prev_volt, prev_curr; if (!voltage || !current) { #ifdef CONFIG_CHARGER_NARROW_VDC diff --git a/common/event_log.c b/common/event_log.c index 95e44413bc..dc2c4ec2d7 100644 --- a/common/event_log.c +++ b/common/event_log.c @@ -15,7 +15,7 @@ #define UNIT_SIZE sizeof(struct event_log_entry) #define UNIT_COUNT (CONFIG_EVENT_LOG_SIZE/UNIT_SIZE) #define UNIT_COUNT_MASK (UNIT_COUNT - 1) -static struct event_log_entry __bss_slow log_events[UNIT_COUNT]; +static struct event_log_entry log_events[UNIT_COUNT]; BUILD_ASSERT(POWER_OF_TWO(UNIT_COUNT)); /* diff --git a/common/host_command_controller.c b/common/host_command_controller.c index c602213e29..befa1865a6 100644 --- a/common/host_command_controller.c +++ b/common/host_command_controller.c @@ -192,8 +192,8 @@ int pd_host_command(int command, int version, static int command_pd_mcu(int argc, char **argv) { char *e; - static char __bss_slow outbuf[128]; - static char __bss_slow inbuf[128]; + static char outbuf[128]; + static char inbuf[128]; int command, version; int i, ret, tmp; diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c index 6584a55d84..071b441cfa 100644 --- a/common/keyboard_scan.c +++ b/common/keyboard_scan.c @@ -95,34 +95,34 @@ static uint32_t boot_key_value = BOOT_KEY_NONE; uint8_t keyboard_cols = KEYBOARD_COLS_MAX; /* Debounced key matrix */ -static uint8_t __bss_slow debounced_state[KEYBOARD_COLS_MAX]; +static uint8_t debounced_state[KEYBOARD_COLS_MAX]; /* Mask of keys being debounced */ -static uint8_t __bss_slow debouncing[KEYBOARD_COLS_MAX]; +static uint8_t debouncing[KEYBOARD_COLS_MAX]; /* Keys simulated-pressed */ -static uint8_t __bss_slow simulated_key[KEYBOARD_COLS_MAX]; +static uint8_t simulated_key[KEYBOARD_COLS_MAX]; #ifdef CONFIG_KEYBOARD_LANGUAGE_ID -static uint8_t __bss_slow keyboard_id[KEYBOARD_IDS]; +static uint8_t keyboard_id[KEYBOARD_IDS]; #endif /* Times of last scans */ -static uint32_t __bss_slow scan_time[SCAN_TIME_COUNT]; +static uint32_t scan_time[SCAN_TIME_COUNT]; /* Current scan_time[] index */ -static int __bss_slow scan_time_index; +static int scan_time_index; /* Index into scan_time[] when each key started debouncing */ -static uint8_t __bss_slow scan_edge_index[KEYBOARD_COLS_MAX][KEYBOARD_ROWS]; +static uint8_t scan_edge_index[KEYBOARD_COLS_MAX][KEYBOARD_ROWS]; /* Minimum delay between keyboard scans based on current clock frequency */ -static uint32_t __bss_slow post_scan_clock_us; +static uint32_t post_scan_clock_us; /* * Print all keyboard scan state changes? Off by default because it generates * a lot of debug output, which makes the saved EC console data less useful. */ -static int __bss_slow print_state_changes; +static int print_state_changes; /* Must init to 0 for scanning at boot */ -static volatile uint32_t __bss_slow disable_scanning_mask; +static volatile uint32_t disable_scanning_mask; /* Constantly incrementing counter of the number of times we polled */ static volatile int kbd_polls; @@ -477,7 +477,7 @@ static int check_keys_changed(uint8_t *state) int any_pressed = 0; int c, i; int any_change = 0; - static uint8_t __bss_slow new_state[KEYBOARD_COLS_MAX]; + static uint8_t new_state[KEYBOARD_COLS_MAX]; uint32_t tnow = get_time().le.lo; /* Save the current scan time */ diff --git a/common/mkbp_input_devices.c b/common/mkbp_input_devices.c index e058c9d320..43dc1b1612 100644 --- a/common/mkbp_input_devices.c +++ b/common/mkbp_input_devices.c @@ -181,7 +181,7 @@ DECLARE_EVENT_SOURCE(EC_MKBP_EVENT_SYSRQ, sysrq_get_next_event); /************************ Keyboard press simulation ************************/ #ifndef HAS_TASK_KEYSCAN /* Keys simulated-pressed */ -static uint8_t __bss_slow simulated_key[KEYBOARD_COLS_MAX]; +static uint8_t simulated_key[KEYBOARD_COLS_MAX]; uint8_t keyboard_cols = KEYBOARD_COLS_MAX; /* For boards without a keyscan task, try and simulate keyboard presses. */ diff --git a/common/port80.c b/common/port80.c index 5d4a6b12ac..231181cad8 100644 --- a/common/port80.c +++ b/common/port80.c @@ -22,10 +22,10 @@ typedef uint32_t port80_code_t; #else typedef uint16_t port80_code_t; #endif -static port80_code_t __bss_slow history[CONFIG_PORT80_HISTORY_LEN]; -static int __bss_slow writes; /* Number of port 80 writes so far */ +static port80_code_t history[CONFIG_PORT80_HISTORY_LEN]; +static int writes; /* Number of port 80 writes so far */ static uint16_t last_boot; /* Last code from previous boot */ -static int __bss_slow scroll; +static int scroll; #ifdef CONFIG_BRINGUP #undef CONFIG_PORT80_PRINT_IN_INT diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index b97f17382c..dd3811bb78 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -408,16 +408,7 @@ SECTIONS __deferred_until = .; . += (__deferred_funcs_end - __deferred_funcs) * (8 / 4); __deferred_until_end = .; - } > IRAM - .bss.slow : { - /* Region of RAM reclaimed from the little firmware(LFW). */ - *(.bss.slow) - /* - * Not replacing the loader, so .bss.slow is part of .bss. - * It needs to be followed by __bss_end so that .bss.slow - * will be zeroed by init. - */ . = ALIGN(4); __bss_end = .; } > IRAM diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S index 031cb6b1b3..a04b92f5ff 100644 --- a/core/cortex-m0/ec.lds.S +++ b/core/cortex-m0/ec.lds.S @@ -264,7 +264,6 @@ SECTIONS *(.bss.system_stack) /* Rest of .bss takes care of its own alignment */ *(.bss) - *(.bss.slow) /* * Reserve space for deferred function firing times. diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S index da65f1a1f0..fbc5ceaafd 100644 --- a/core/nds32/ec.lds.S +++ b/core/nds32/ec.lds.S @@ -248,7 +248,6 @@ SECTIONS *(.bss.task_scratchpad) /* Rest of .bss takes care of its own alignment */ *(.bss) - *(.bss.slow) /* * Reserve space for deferred function firing times. diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S index 9e7acd684b..21c3de1143 100644 --- a/core/riscv-rv32i/ec.lds.S +++ b/core/riscv-rv32i/ec.lds.S @@ -318,7 +318,6 @@ SECTIONS . = ALIGN(4); /* Rest of .bss takes care of its own alignment */ *(.bss) - *(.bss.slow) /* * Reserve space for deferred function firing times. diff --git a/include/common.h b/include/common.h index 373663ea88..8ee0688365 100644 --- a/include/common.h +++ b/include/common.h @@ -126,16 +126,6 @@ #endif /* - * Place the object in the .bss.slow region. - * - * On boards with unoptimized RAM there is no penalty and it simply is appended - * to the .bss section. - */ -#ifndef __bss_slow -#define __bss_slow __attribute__((section(".bss.slow"))) -#endif - -/* * Place a read-only object into a ROM resident section. If supported by the * EC chip, the object is part of the flash image but not copied into RAM * automatically. Users may only access the data using the include/init_rom.h |