According to IBECC spec ECC Error log register is only valid when
ECC_ERROR_CERRSTS or ECC_ERROR_MERRSTS bits are set.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).
Automated using:
```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Update edac shell comments reflecting devmem move from edac to a
special shell module.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add support for missing EHL SKUs. The information about SKUs is
already public and available in Linux kernel:
https://github.com/torvalds/linux/blob/
38f80f42147ff658aff218edb0a88c37e58bf44f/drivers/edac/
igen6_edac.c#L197-L208
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:
sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
It does not make sense to use branch coverage with macro LOG_ERR().
It is still covered with line coverage.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add __printf_like modifier to validate strings used by shell.
Fixing warnings triggered by this change.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Promote the "edac mem" shell subcommand to a generic "devmem" root shell
command. This command is useful for poking around registers and memory
outside of the EDAC drivers.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Using helper functions decreases function complexity numbers reported
by static code analyzers.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Check errors returned by edac_ecc_error_log_clear() and
edac_parity_error_log_clear().
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Refactor EDAC API making it more clear, removing unneeded typedefs and
using check for optional and assert for mandatory APIs.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
List all supported device IDs found in External Design Specification
Volume 1 which have IBECC supported.
Fixes#33543
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Start using DTS values for PCI Vendor ID and PCI BDF. For the PCI
Device ID we do not use DTS since this would require changing overlay
for different SKU board.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add extra error data information to callback parameter. Add tests for
testing the data provided.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Split setting EDAC IBECC ctrl to setting error_type and
error_trigger to make it easier for other platforms.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>