Commit graph

5973 commits

Author SHA1 Message Date
Guennadi Liakhovetski
1497f77cc8 intel: adsp: make SRAM power-off configurable
Currently the code suggests, that setting the SRAM disabling mask to
0 skips powering off SRAM, whereas in fact it's the address of the
mask variable that's checked for NULL. Make this consistent and let
platforms select whether SRAM power down should be selected.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-27 10:44:02 +03:00
Guennadi Liakhovetski
293fa118df intel: adsp: fix firmware image in IMR overwriting
The IMR is used by the firmware to hold its own copy for hot-booting
and for an "L3 heap," used for slow large allocations like loadable
libraries. The beginning of the L3 heap is currently hard-coded and
now the firmware has grown too large to fit into the dedicated area
so that it gets overwritten by heap allocations. This is a critical
bug that needs an urgent solution, for which we increase the offset,
but a real fix must calculate the L3 heap offset automatically.

BugLink: https://github.com/thesofproject/sof/issues/9308
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-27 10:42:27 +03:00
Evgeniy Paltsev
5869926063 arc: nsim: vpx5: fix SoC config issue which leads to cmake error
After recent nsim SoCs & boards reorganization the SOC_SERIES_*
config is missing for vpx5 SoC which leads to cmake errors
when building against nsim/nsim_vpx5 configuration.

Fix that and align soc series name in soc.yml

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-17 16:18:40 -04:00
Alberto Escolar Piedras
c346c77a2a soc/espressif/esp32c6: Do not set HAS_PM or HAS_POWEROFF
The source files required for this features are not present
in the tree for this SOC.
So if CONFIG_PM or CONFIG_POWEROFF are enabled, there would
be a cmake failure.

Let's just indicate these features are not supported in
kconfig.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-16 12:53:09 -04:00
Tomi Fontanilles
2e012668e9 modules: tf-m: nordic: fix unused CMake variable warning
Follow-up to d830446c91 that removed
the use of ${ZEPHYR_BASE}.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-12 20:39:26 -04:00
Jimmy Zheng
f989ed949a driver: interrupt_controller: nuclei_eclic: fixed interrupt level
CLIC should be the first level interrupt controller because it replaces
the basic RISC-V local interrupt.
The interrupt level in CLIC controls preemption between IRQs, rather than
specifying the number of nested interrupt controllers.
Removed CONFIG_MULTI_LEVEL_INTERRUPTS and the incorrect interrupt level.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 16:09:22 -04:00
Guennadi Liakhovetski
46b356a6b0 intel-adsp: fix ACE power-off assembly
A recent commit fb53d2ef8d ("ace: power: replace pseudo-assembly
movi") contained a bug: the Xtensa "movi" assembly instruction must
be written with the immediate argument already shifted left by 8, the
compiler doesn't do that automatically. This still somehow worked on
MTL but failed on LNL. Fix both occurrences.

Fixes: #75700
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-12 05:48:20 -04:00
Sylvio Alves
0c5d5f796f soc: espressif: disable RNG entropy before app runs
SARADC was kept enabled to feed RNG entropy peripheral,
adding instability to Wi-Fi connection. So we disable it
before app runs as RNG driver already got initial entropy values.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-11 16:19:55 -04:00
Nikodem Kastelik
c0d508a142 soc: nordic: common: dmm: fix region alignment getter
Getting the required alignment size for memory region node
and device node needs to be handled by a separate macro.
Otherwise alignment of single byte is reported for any region.
Add a test that checks for this particular issue.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-07-10 08:42:40 -04:00
Aksel Skauge Mellbye
a677e974ef soc: silabs: Include series-specific Kconfig
The series-specific Kconfig files were not included, leading
to RTT not being considered available.

Fixes #75511.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-07-09 08:59:02 +02:00
Sylvio Alves
3163680427 soc: esp32c6: remove idle source file
risc-v idle call is being fetched from arch/ implementation.
This soc file is not used and can be removed.

Fixes #75540

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 12:12:21 -04:00
Andrej Butok
c3dd3c69ac soc: nxp: add flashing configuration
- Added a flash runner configuration for rw, mcx, lpc, kinetis and imxrt,
  used for sysbuild multi-image projects like MCUBoot.
- Solved the mass erase issue.
- The sysbuild project "west flash --erase" command caused
  the mass_erase->flash_img1->reset->mass_erase->
  flash_img2->reset sequence.
  It was fixed to the mass_erase->flash_img1->
  flash_img2->reset sequence.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-07-08 16:04:04 +02:00
Daniel Leung
bebff3fb35 soc: mt8195: remove prompts for SoC kconfigs
This removes the prompts for the mt8195 and related kconfigs,
so these cannot be overridden from command line (though
technically they cannot be disabled as they are being selected).
This also prevents them from appearing in the build .config
file as not being set even when we are being for other SoCs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-08 15:53:08 +02:00
Mark Wang
9a45300ab5 boards: nxp: enable mcux udc on RT1170-EVK
enable clock and usb phy device tree

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Miguel Gazquez
3408694960 drivers: memc: fix Kconfig option MEMC_STM32
This commit fixes a bug with the declaration of the Kconfig option
MEMC_STM32.

The option is defined in two files:
- `drivers/memc/Kconfig.stm32`, wich depends on
   - `MEMC`
   - `DT_HAS_ST_STM32_FMC_ENABLED`
-`soc/st/stm32/Kconfig.defconfig`, wich depends on
   - `MEMC`
   - `SOC_FAMILY_STM32`

So, if you have `CONFIG_MEMC=y` in your Kconfig options and you are on a
STM32 SoC, `CONFIG_MEMC_STM32` will be enabled, even if there is no
STM32 FMC enabled.

This Kconfig option causes the driver for the STM32 FMC to be compiled,
regardless of the presence of an enabled node for the FMC.
However, the driver fails to compile if there is no FMC node in the
devicetree. So, if you compile a project with `CONFIG_MEMC=y` on a board
with an STM32 SoC and no enabled FMC, the build will fail.

This commit deletes the Kconfig declaration in the `Kconfig.defconfig`,
as it isn't useful and is the one provoking the bug.
It also add in the `Kconfig.stm32` the compatible `st,stm32h7-fmc`, wich
use the same driver and so need to be enabled by the same Kconfig
option.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-05 18:43:06 +02:00
Luca Burelli
e35126f83a soc: intel_socfpga_std/cyclonev: enforce ARM_AARCH32_MMU
Currently the code in soc.c depends on the MMU of the CPU being enabled,
but this is not enforced. It is thus possible to cause a build error by
manually disabling it (as is required for some LLEXT tests, see #75289).

Make sure this is averted by explicitly selecting ARM_AARCH32_MMU in the
SoC Kconfig.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-05 18:39:53 +02:00
Guennadi Liakhovetski
fb53d2ef8d ace: power: replace pseudo-assembly movi
When switching off memory banks we cannot use movi with arbitrary
immediate arguments, they will be converted by the compiler to memory
accesses. Only constants within the allowed range should be used.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-04 18:01:02 -04:00
Dat Nguyen Duy
2457f730f4 soc: nxp_s32: disable TCP/UDP checksum only if eth driver enabled
Only disable TCP/UDP software checksum if the ethernet
driver enabled. This is to avoid interfere with net tests
which don't need the on board driver to function

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-07-04 13:36:55 +02:00
Filip Kokosinski
dcc5dd27fa soc/openisa: rely on the CONFIG_RISCV_ISA_EXT_* options for arch string
This commit makes the RV32M1 SoC rely on the default behavior of relying on
the `CONFIG_RISCV_ISA_EXT_*` config options, and removes the
`zephyr_compile_options` override when the standard toolchain is used.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-03 15:06:14 -04:00
Filip Kokosinski
18ddac4acf soc/openisa: enable the C extension
According to the RV32M1 Series Manual, Rev 1.1 RV32M1 series supports the C
extension, and doesn't support the A extension. Apply fixes accordingly.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-03 15:06:14 -04:00
Jamie McCrae
8924d563bb soc: nordic: Fix run once regex issue and add missing entries
Fixes an issue whereby multiple boards would be grouped when using
a regex to group them, and adds missing nRF91 entries to the list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-03 09:33:21 -04:00
Guennadi Liakhovetski
32d05d360b intel_adsp/ace: power: fix firmware panic on MTL
The power_down() function attempts to lock the hpsram_mask on-stack
variable in data cache, which causes an exception. Moving it to .bss
by making it static fixes it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-03 15:31:12 +02:00
Sreeram Tatapudi
e3f4a63ac0 soc: infineon: cyw20829: Updates linker script
Add missed #include <zephyr/toolchain/common.h>
in linker script to fix build error with
samples/subsys/bindesc/hello_bindesc

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Yong Cong Sin
6de21fc1d2 Revert "soc: riscv-privileged: support SoCs without reset vector"
This reverts commit 75f5d98002.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
5ee20e11ef soc: nordic: vpr: select INCLUDE_RESET_VECTOR for default implementation
For SOCs that do not implement a custom `__reset` function,
select `INCLUDE_RESET_VECTOR` so that Zephyr provides a default
implementation that simply jumps to `__initialize`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Krzysztof Chruściński
0825f24910 soc: nordic: nrf54h: DMM shall be applied only to rad&app
cpuppr can only use slow peripherals and uses RAM3 as RAM so
it does not need to use DMM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
5f32265459 soc: nordic: common: dmm: Fix memory utilization
DMM was enforcing cache line alignment all memory regions, including
those which were not cacheable. Fixing it by using memory attribute
from the device tree to determine if alignment needs to be applied.

Because of that memory usage was significantly increased because
even 1 byte buffers (e.g. for uart_poll_out) was consuming 32 bytes
(cache line size).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Alessandro Manganaro
594e614f49 soc/st/stm32/st32wbax: STM32WBA55 BLE Ext Adv Fix
SYSTEM_WORKQUEUE_STACK_SIZE increase is required to fix not
only BLE Ext Adv (70935), but also other BLE use cases according
STM32WBA HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-01 09:04:32 -04:00
Sylvio Alves
f65770c1a1 soc: esp32xx: always use section prologue with alignment
ESP32 requires proper alignment between sections. There are some
scenarios, as reported in #74533, that the section can
get shifted, causing runtime failure.
Making sure SECTION_PROLOGUE is used with ALIGN_WITH_INPUT
will guarantee its consistency.

Fixes #74533

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-28 21:00:11 -04:00
Iuliana Prodan
f91700e629 linker: nxp: adsp: add orphan linker section
Add missing linker section to avoid warning
about orphans when building with host compiler.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-06-28 21:53:01 +02:00
Duy Nguyen
75f1f7e982 drivers: pinctrl: Add pinctrl driver for RA8 series
This is the initial commit to support minimum pinctrl
driver for Renesas MCU RA8M1.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
7195f0de0f soc: renesas: ra: Add initial support for RA8M1 SOC series
Add minimal support for RA8M1 SOC series.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-06-26 13:36:14 -04:00
Marek Matej
6a7c8d789f soc: espressif: Update MCUboot segment size
- Fix the build issues with the insufficient memory for
  the MCUboot.
- Fix the sysbuild with MCUboot tests on all ESP32xx SoCs.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-26 09:01:25 -04:00
Henrik Brix Andersen
771a362f4b soc: nxp: lpc: lpc55xxx: fix CONFIG_LPC55XXX_USB_RAM defaults
Setting a boolean Kconfig option default to "n" after having set it to "y"
does not make the option disabled. Instead, avoid setting default to "y"
for SoCs known not to have dedicated USB RAM.

Fixes: #73912

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-25 21:19:18 -04:00
Alberto Escolar Piedras
6e977ae2d5 lib c/cpp: Move .ctor .init_array handling from C++ to kernel
* Move ctors and init_array from the CPP library
  to the kernel library, as this is common for both C
  and C++ and it is the kernel who is running it.
* Rename the hidden kconfig option CPP_STATIC_INIT_GNU
  STATIC_INIT_GNU instead.
* If STATIC_INIT_GNU is not selected verify there is
  constructors left behind.
* Rename common-rom-cpp.ld to common-rom-init.ld
* Rename z_cpp_init_static to z_init_static,
  and have the kernel always call it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Keith Packard <keithp@keithp.com>
2024-06-25 19:14:37 -04:00
Tomasz Leman
a3835041bd intel_adsp/ace: power: Use MMU reinit API on core context restore
Replace the MMU initialization call with the new MMU re-initialization
API during the core context restore process in the ACE power management
code.

The previous code was directly calling `xtensa_mmu_init()` upon
restoring the core context, which is not appropriate when the MMU
context may have been preserved during low-power states. The new
`xtensa_mmu_reinit()` API is designed to re-establish the MMU context
without overwriting the existing page table, ensuring that any runtime
changes to the MMU configuration are retained.

Changes made in this patch:
- Removed the call to `xtensa_mmu_init()` from the
  `_restore_core_context()` function.
- Added a call to `xtensa_mmu_reinit()` after restoring the
  miscellaneous registers.

This update aligns the ACE power management code with the correct MMU
handling procedures when recovering from low-power states, as per the
recent changes in the Xtensa MMU support.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Ievgen Ganakov
d1b5d7092e intel_adsp: ace30: Correct power control register bitfield definitions
This patch updates the power control and status register bitfield
definitions in the ACE30 PTL ADSP power management header to match the
documented hardware specifications. The previous definitions contained
discrepancies that did not align with the actual hardware layout,
potentially leading to incorrect assumptions and usage within the
firmware.

Changes made in this patch:
- Renamed 'rsvd0' to 'rsvd4' to accurately represent the reserved bits
  starting at bit position 4.
- Removed the 'rsvd6' field, which was incorrectly defined and is not
  present in the hardware register layout.
- Adjusted the bit widths for 'ioxpgs' and 'mlpgs' to correctly reflect
  the number of bits these fields occupy in the hardware.
- Introduced a new 'rsvd15' field in both 'ace_pwrctl2' and
  'ace_pwrsts2' structures to account for the remaining reserved bits,
  ensuring the structure sizes accurately represent the full register
  width.

By correcting these bitfield definitions, the firmware's power
management code will now be consistent with the actual hardware design,
improving reliability and maintainability of the codebase.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-06-25 14:15:27 -04:00
Piotr Pryga
37e5b1055e soc: nrf54l15: Fix HFXO INTCAP code calculation rounding error
The implementation of formula, to calculate HFXO INTCAP code,
had a rounding error. That may lead so small deviation of HFXO
clock accuracy.

The IPS formula uses capacitance values in piko Fartd units.
That requires use of floating point data types. To avoid that
implementation of the formula uses femto Farats (1000 smaller unit).

In the former implementation conversion from femto Farad to piko Farad
was done just after reading of the desired capacitance from DTS.

To make sure the calculations are correct the change of unit must be
done at very end. Also rounding must be applied.

Also the formula was split and more comments were added to make the
implementation clear.

The commit fixes the implementation of the IPS formula.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-06-25 10:26:11 -04:00
Piotr Pryga
f0f5f28f99 soc: nrf54l15: Fix LFXO INTCAP code calculations
There were two errors in calculations of LFXO INTCAP code:
- The value provided by DTS files is internal desired capacitance.
  The value from DTS has to be "encoded" before use in INTCAP
  calculations formula. The formula for encoding is:
  CAPACITANCE_CODE = (<desired_value> - 4pF) / 0.5
  Subtract of 4 is related with lowest value in the allowed range.
  Division by 0.5 is related with change to steps size.
  In former code the subtration of 4pF was missing.

- The mid_val calcuation was wrong due offset_k left shift by 4.
  It should be left shift by 3 to get total left shift of 9.
  That matches the left shift of former part of the equation.
  Final integer value was calculated by right shift 10, it should
  be right shift 9. Then rounding was done by use of mod by (1 << 10)
  It should be mod by (1 << 9) and compared with (1 << 8), that is
  half of 0-512 range.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-06-25 10:26:11 -04:00
Aaron Ye
faf229714a soc: ambiq: apollo4x: remove untestable cache kconfig
This commit removes the untestable data and instruction cache kconfig
which causes CI failure.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-06-25 06:07:08 -04:00
Lingao Meng
302422ad9d everywhere: replace double words
import os
import re

common_words = set([
    'about', 'after', 'all', 'also', 'an', 'and',
     'any', 'are', 'as', 'at',
    'be', 'because', 'but', 'by', 'can', 'come',
    'could', 'day', 'do', 'even',
    'first', 'for', 'get', 'give', 'go', 'has',
    'have', 'he', 'her',
    'him', 'his', 'how', 'I', 'in', 'into', 'it',
    'its', 'just',
    'know', 'like', 'look', 'make', 'man', 'many',
    'me', 'more', 'my', 'new',
    'no', 'not', 'now', 'of', 'one', 'only', 'or',
    'other', 'our', 'out',
    'over', 'people', 'say', 'see', 'she', 'so',
    'some', 'take', 'tell', 'than',
    'their', 'them', 'then', 'there', 'these',
    'they', 'think',
    'this', 'time', 'two', 'up', 'use', 'very',
    'want', 'was', 'way',
    'we', 'well', 'what', 'when', 'which', 'who',
    'will', 'with', 'would',
    'year', 'you', 'your'
])

valid_extensions = set([
    'c', 'h', 'yaml', 'cmake', 'conf', 'txt', 'overlay',
    'rst', 'dtsi',
    'Kconfig', 'dts', 'defconfig', 'yml', 'ld', 'sh', 'py',
    'soc', 'cfg'
])

def filter_repeated_words(text):
    # Split the text into lines
    lines = text.split('\n')

    # Combine lines into a single string with unique separator
    combined_text = '/*sep*/'.join(lines)

    # Replace repeated words within a line
    def replace_within_line(match):
        return match.group(1)

    # Regex for matching repeated words within a line
    within_line_pattern =
	re.compile(r'\b(' +
		'|'.join(map(re.escape, common_words)) +
		r')\b\s+\b\1\b')
    combined_text = within_line_pattern.
		sub(replace_within_line, combined_text)

    # Replace repeated words across line boundaries
    def replace_across_lines(match):
        return match.group(1) + match.group(2)

    # Regex for matching repeated words across line boundaries
    across_lines_pattern = re.
		compile(r'\b(' + '|'.join(
			map(re.escape, common_words)) +
			r')\b(\s*[*\/\n\s]*)\b\1\b')
    combined_text = across_lines_pattern.
		sub(replace_across_lines, combined_text)

    # Split the text back into lines
    filtered_text = combined_text.split('/*sep*/')

    return '\n'.join(filtered_text)

def process_file(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        text = file.read()

    new_text = filter_repeated_words(text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(new_text)

def process_directory(directory_path):
    for root, dirs, files in os.walk(directory_path):
        dirs[:] = [d for d in dirs if not d.startswith('.')]
        for file in files:
            # Filter out hidden files
            if file.startswith('.'):
                continue
            file_extension = file.split('.')[-1]
            if
	file_extension in valid_extensions:  # 只处理指定后缀的文件
                file_path = os.path.join(root, file)
                print(f"Processed file: {file_path}")
                process_file(file_path)

directory_to_process = "/home/mi/works/github/zephyrproject/zephyr"
process_directory(directory_to_process)

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-25 06:05:35 -04:00
Andrej Butok
fdfebdd15b soc: lpc: mcxn: fix the flash_fill() fail.
- Fix flash_fill() for lpc55 and mcxnx4.
- Set FLASH_FILL_BUFFER_SIZE to the minimal size of data
  which can be written to a device (by default is only 32).
- Fix the [flash_map.test_flash_area_erase_and_flatten]
  failed test of tests/subsys/storage/flash_map.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-24 14:49:32 -04:00
Martin Tverdal
78d2ed5428 soc/nordic/nr54l: increase flash erase time define
Time it takes to "erase" one "page" of rram is too low.
Where getting timeouts.
"erase" of rram is done by writing all the words.
one "page" is 4096 bytes meaning 1024 32bit words.
worstcase time it takes to write one 32bit word from
0x00000000 to 0xffffffff is about 42us, giving 42ms
to write 1024 words.

Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
2024-06-24 08:28:13 -04:00
Romain Pelletant
8e6cff0176 soc: esp32: fix unknown defined for linker
* Fix unknown define at link stage when CONFIG_BT is enabled
Solve #74836

Signed-off-by: Romain Pelletant <romain.pelletant@fullfreqs.com>
2024-06-24 14:25:37 +02:00
Sylvio Alves
ee1b13c822 soc: esp32c3: fix tls linking error
Fix linking error due undefined tdata entry.
After #72642, tdata could be undefined due to
missing TLS check.

Fixed #74852

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-24 14:25:18 +02:00
Jordan Yates
07870934e3 everywhere: replace double words
Treewide search and replace on a range of double word combinations:
    * `the the`
    * `to to`
    * `if if`
    * `that that`
    * `on on`
    * `is is`
    * `from from`

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-22 05:40:22 -04:00
Andy Ross
e9c23274af Revert "soc: intel_adsp: only implement FW_STATUS boot protocol for cavs"
This breaks SOF load on MTL devices.  See SOF bug for details:
https://github.com/thesofproject/sof/issues/9243

This reverts commit fa798ce2d5.

Signed-off-by: Andy Ross <andyross@google.com>
2024-06-21 11:52:38 -04:00
Daniel Leung
c44c922198 soc: xtensa/dc233c: remove xtensa_dc233c_stack_ptr_is_sane
The generic stack pointer checker in the architecture code is
enough so we can remove the platform specific one. Besides,
xtensa_dc233c_stack_ptr_is_sane() does not do much checking
either.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-21 09:59:36 +02:00
Sylvio Alves
b38d4300b9 soc: esp32c3: fix TLS flash addressing
When TLS is used, `__tdata_start` is PROVIDED by
"thread-local-storage.ld" using absolute address, which
makes it land in wrong flash address. This causes risc-v startup
code to fail during memcpy/memset.

This PR overrides `__tdata_start` to use ADDR, which will
make sure it is placed in DROM region due to AT keyword.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-20 14:07:54 -04:00
Pieter De Gendt
99366dd2be linker: Add ROM_SECTIONS location
Currently iterable sections as per the documentation are added with
zephyr_linker_sources(SECTIONS ...) after bss/noinit.
This commit allows putting sections after common-rom.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-06-20 12:08:58 -04:00