The address was being truncated because we were using
32-bit registers. CONFIG_MMU is always enabled on 64-bit,
remove the #ifdef.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We need to produce a binary set of page tables wired together
by physical address. Add build system logic to use the script
to produce them.
Some logic for running build scripts that produce artifacts moved
out of IA32 into common CMake code.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This produces a set of page tables with system RAM
mapped for read/write/execute access by supervisor
mode, such that it may be installed in the CPU
in the earliest boot stages and mutable at runtime.
These tables optionally support a dual physical/virtual
mapping of RAM to help boot virtual memory systems.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Private macros/function for converting a virtual address
to a physical address. Only works for a specific range
of virtual addresses (the permanent SRAM mappings).
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The x86 ports are linked at their physical address and
the arch_mem_map() implementation currently requires
virtual = physical. This will be removed later.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If CONFIG_MMU is active, choose whether to separate text,
rodata, and ram into their own page-aligned regions so that
they have have different MMU permissions applied.
If disabled, all RAM pages will have RWX permission to
supervisor mode, but some memory may be saved due to lack
of page alignment padding between these regions.
This used to always happen. This patch adds the Kconfig,
linker script changes to come in a subsequent patch.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This test covers private interfaces that don't exist any more.
This will be replaced by tests of arch_mem_map() that are not
x86-specific.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This test is against infrastructure that no longer exists.
It will be replaced by generic tests for the mapping APIs.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This reverts commit 680f401ef2.
3rd party code in modules is failing due to this enforcment. We need a
away to exclude module code to support such options.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Various API involves functions and data that are conditionally
enabled. Zephyr practice is to exclude data (always) and function
(sometimes) declarations at build time using the enabling preprocessor
macro. This meets functional needs, but blocks generation of the API
documentation as Doxygen will not see the declarations.
Document the need to extend Doxygen's PREDEFINED setting to generate
the documentation.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Provide a location for recommended practices that are not related to
coding style. Initialize it with information about the expected
design for callbacks.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Gaps in Kconfig flexibility make it necessary to provide
instance-specific driver configuration through devicetree properties
in certain cases. Because these are not hardware characteristics or
configuration they should be marked as zephyr-specific.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The Kconfig options that formerly controlled this capability have been
removed so rework the "exception" (there is no "precedence" anymore).
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When try build updatehub using overlay-dtls.conf system fail with
cannot create privkey.der.inc file, permission denied. Add missing
gen_dir cmake definition. Update updatehub sample test config to
run missing dtls build test.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Fix conditional compilations that fail when combinations
of Broadcaster, Observer, Peripheral and/or Central are
selected to build an application.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilations that fail when combinations
of Broadcaster, Observer, Peripheral and/or Central are
selected to build an application.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add encode utility mocre for 16 and 32 bits UUIDs that can be
used to in combination with BT_DATA_BYTES to include UUIDs
in advertising data.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add defines for UUID values so that they can be used without
declaring a full bt_uuid struct.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
If `CONFIG_BT_CENTRAL` was enabled and the device was not scanning
or connected, then `bt_le_per_adv_sync_create` would not start
scanning for periodic advertisers.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Mark the ram version of the ccc_cfg as free after ccc has been
stored when a bonded device disconnects.
If the device use lazy loading of settings then ccc_cfg was not
cleaned up properly when a bonded device disconnects. This
resulted in the ccc system ran out of ccc_cfg resources after
having disconnected CONFIG_BT_MAX_CONN times.
Signed-off-by: Kim Sekkelund <ksek@oticon.com>
Step1: Move bt_gatt_disconnected() to avoid forward declarations which
otherwise would be needed by a fix to lazy loading cleanup on
disconnect in step 2.
Signed-off-by: Kim Sekkelund <ksek@oticon.com>
Since bt_l2cap_send_cb can fail returning its error is not enough as
the buffer has been modified to add the headers, so this save the state
before calling bt_conn_send_cb and takes a reference so it can be
restored its original state in case of error.
Fixes#27434
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add both .conf and .overlay files for the nRF51 dongle, which is still
used and was missing configuration files.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Leave the SPI CS GPIO handling to the SPI controller driver and make SPI
CS GPIO optional for SDHC disk access via SPI.
The SPI SDHC implementation relies on SPI_HOLD_ON_CS so we need to
explicitly release the SPI controller driver after ending transmissions
to force the CS line to be de-asserted.
Fixes#27444.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Zephyr release 2.1 changed the default settings back end from FCB to
NVS in all Bluetooth samples for performance and reliability reasons.
Update the settings documentation to provide a clue to developers
trying to decide which to use.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The nRF5340 PDK board target for nRF5340 Network MCU
needs to include the "ENG-A" .dtsi header. The
commit is fixing this.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In the SoC that comes on the nRF5340 DK the number of MPU
regions in the nRF5340 Network MCU is 8, instead of 16. We
fix this in DTS by introducing different .dtsi headers for the
different SoC part variants: the nrf340 Engineering A (first
SoC revision, present in the nRF5340 PDK) and the nrf5340
(second SoC revision, present on nRF5340 DK).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Use non-default frequency 25MHz and Quad mode to ensure
frequency configuration is taking effect.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Fix incorrect register update that results in unintentionally
in default eSPI frequency (20MHz) whenver IO mode is changed.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This PR updates the hal_nordic module revision, to switch to nrfx 2.3.0
and adds new configuration option to enable two stage LFCLK start
sequence.
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
This is an extension to the existing FOR_EACH family of macros that
has a couple of twists that make it more useful in certain contexts,
as explained in the docstring.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler
to tells gcc that this happens intentionally.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Option -Wimplicit-fallthrough as the name suggests raises a warning when
there is an implicit fallthrough in a switch clause. This warning does
not happen when the last statement is a return or a call to a function
declared with noreturn attribute.
This flag helps to enforce two MISRA-C rules (not completely), 16.1 and
16.3
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Adds some code to allow QEMU to crash without failing the test.
This is required for testing coredump code as it will certainly
cause QEMU to crash.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
There is a potential that QEMUHandler.handle() returns before
the testing harness finishes processing all the output from QEMU.
Simply wait for the harness thread to finish before returning.
Also, fix the return code in the debug message as it should be
the return code from Popen().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds the necessary bits in arch code, and Python scripts
to enable coredump support for ARM Cortex-M.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a very primitive coredump mechanism under subsys/debug
where during fatal error, register and memory content can be
dumped to coredump backend. One such backend utilizing log
module for output is included. Once the coredump log is converted
to a binary file, it can be used with the ELF output file as
inputs to an overly simplified implementation of a GDB server.
This GDB server can be attached via the target remote command of
GDB and will be serving register and memory content. This allows
using GDB to examine stack and memory where the fatal error
occurred.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>