* Instead of a common system call entry function, we instead create a
table mapping system call ids to handler skeleton functions which are
invoked directly by the architecture code which receives the system
call.
* system call handler prototype specified. All but the most trivial
system calls will implement one of these. They validate all the
arguments, including verifying kernel/device object pointers, ensuring
that the calling thread has appropriate access to any memory buffers
passed in, and performing other parameter checks that the base system
call implementation does not check, or only checks with __ASSERT().
It's only possible to install a system call implementation directly
inside this table if the implementation has a return value and requires
no validation of any of its arguments.
A sample handler implementation for k_mutex_unlock() might look like:
u32_t _syscall_k_mutex_unlock(u32_t mutex_arg, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, void *ssf)
{
struct k_mutex *mutex = (struct k_mutex *)mutex_arg;
_SYSCALL_ARG1;
_SYSCALL_IS_OBJ(mutex, K_OBJ_MUTEX, 0, ssf);
_SYSCALL_VERIFY(mutex->lock_count > 0, ssf);
_SYSCALL_VERIFY(mutex->owner == _current, ssf);
k_mutex_unlock(mutex);
return 0;
}
* the x86 port modified to work with the system call table instead of
calling a common handler function. fixed an issue where registers being
changed could confuse the compiler has been fixed; all registers, even
ones used for parameters, must be preserved across the system call.
* a new arch API for producing a kernel oops when validating system call
arguments added. The debug information reported will be from the system
call site and not inside the handler function.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
gitlint was complaining about use of the word "title"
in PR #1512 doc: fix link title in linux installation guide
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Previous description of counter_set_alarm() was insufficient and
could be ambiguously interpreted.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
Fixes a tx_pkts slab leak since the cloned pkt was referencing the
original pkt slab but was not originated from it (net_pkt_unref uses
pkt->slab when releasing the pkt).
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Removing internal boolean in order to use the proper error code hold in
spi_context which was relevantly added in commit 6c717095b8.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Because a next networking API call will lead to a crash. Given that
logging can be easily disabled (disabled by default so far!), don't
be shy and call by the name (i.e. error).
Jira: ZEP-2105
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
If the IP address string is empty, then it is no use trying
to parse it. This was seen when handling DNS server strings when
user has made a mistake and defined the DNS server addresses
incorrectly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Updated debug pin mapping so that the outputs are on P3 pin
head on all nRF5x Development Kits.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixed the configuration of NRF_CCM for 2M PHY connections.
Now faster 2M data rate mode will be used when a connection
is in 2M PHY.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use correct NRF_AAR enable macro defines from Nordic MDK.
Old code funtionally worked fine even though not setting
the correct enable value.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixed a bug in the implementation of Connection Parameter
Request Procedure when initiated in master role caused the
connection to terminate with reason LL response timeout.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Based on work by Chunlin Han <chunlin.han@linaro.org>.
This defines the interfaces that architectures will need to implement in
order to support memory domains in either MMU or MPU hardware.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The status in the Command Complete event was uninitialized, leading to
incorrect contents of the event parsed by the Host. Correctly initialize
the status to success.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
RCC_HCLK_DIV1 translates to 0x0 while apb_psc uses the value defined
by CONFIG_CLOCK_STM32_APB1/2_PRESCALER (range from 1 to 16).
Manually check if the defined prescaler is 1 or not and use that to
calculate the correct timer clock.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Add support for TIM3 as it is widely available and pins available via
headers on several devices.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
During testing it was discovered that directed advertising
timeout is missing implementation to handle the timeout
happening while next event is already in preparation.
The consequence was that after the event ticker expired,
the counter is shutdown, stalling the setup PPI from
starting the erroneous advertising, leaving the controller
in an invalid hung state.
This has been fixed by correctly handling the cases, stop
between prepare and event, and stop inside radio advertising
event. The fix takes care of putting the radio active
callback and HF clock in the correct states.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adjust length of the packet before setup_ipv4_header() which actually
might increase packet size if there is not enough space available.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Previous approach allowed only single word update for single
function call. Updating context in ISR was inefficient for
controllers supporting automatic multiple data packets transaction.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
Tweaks to the zephyr-doc-theme for improving the API layout
should be applied to the read-the-docs (RTD) theme too.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fixing regression, address family is now called sa_family.
The testcase.yaml file was missing so no tests were actually run.
After making test to run, it was also failing because link address
was accessed before first fragment was set. This caused null pointer
access.
Fixes#1474
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
I2C device drivers which support DTS have their default boot
configuration provided by DTS. The legacy I2C_x_DEFAULT_CFG
option in Kconfig is no longer required. This patch hides
this option from the Kconfig menu for I2C device drivers which
support DTS.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Whenever a buffer is sent to the driver via bt_raw using bt_send() the
buffer might not be consumed if an error is returned. In that case
unreference the buffer to avoid leaking the already allocated net_buf.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Whenever the HCI ACL flow control is violated by the Host, a Data Buffer
Overflow event is now issued by the Controller (if enabled) to notify
the Host of the buffer overrun.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Create support for registering a callback that will be called
if the device leaves or joins IPv6 multicast group.
Jira: ZEP-1673
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Commit cd35742a2 missed one unref too many on pending packet which was
triggering a crash which commit 0b8434f08 tried to fix, but it generates
a leak when there is not pending entries left in arp core. Finally,
fixing what cd35742a2 should have done: removing the extra unecessary
unref after sending the pending packet.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
xtensa uses more stack than other arches, enable the sentinel since we
don't currently have HW-assisted stack checking on this arch.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This new image has the following additions:
- gperf
- cmake
- Zephyr SDK 0.9.2-rc4 for initial testing (in addition to 0.9.1)
- Various python modules needed for building and CI
Signed-off-by: Anas Nashif <anas.nashif@intel.com>