Detect the presence of CLFLUSH instruction and cache line size at
runtime. It is still possible to set them manually via kconfig options
if the values are known.
Change-Id: I00bda1de4c5c241826ead6f43b887b99a963cc7b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
ARC targets now have access to the address types 'paddr_t' and 'vaddr_t'.
Change-Id: I2cccddbdd76771529e4501aaee6cb2a2b640013e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
ARM targets now have access to the address types 'paddr_t' and 'vaddr_t'.
Change-Id: Ic7225647f3776d4afa853cf2c4a19699b656866a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This makes the types 'paddr_t' and 'vaddr_t' available via nanokernel.h.
Change-Id: I75b81356566e2063979f2ec46f326d606638efa2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Adds an input hook to be used by the interrupt handler uart_console_isr().
This hook permits the console input to detect a character escape sequence
that can be used to override the console's default input behavior.
This input hook can be set using the following API:
void uart_irq_input_hook_set(struct device *dev,
int (*hook)(struct device *, uint8_t));
The hook returns 1 if the handler should stop processing the character,
and 0 if it should not stop.
Change-Id: I95e7da75e07fb6caaca2d45e80bfc4334a43c0ac
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Remove goals that call scripts we do not have or support.
Change-Id: Ic6f1d2b620e20f7355e1dec0a2454239fad8f123
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
CONFIG_GCOV_KERNEL comes from Linux, we do not use this feature
in Zephyr.
Change-Id: Ibef77ac4b26f2831b2fbba25e2a4d72899d75974
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
These tests ensure the functions manipulate data as expected.
They do not currently test atomicity.
Change-Id: I3646b3a55ffb895c56dbb0d0bc39da5e1138e7a5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This was kept around since it used to be necessary for x86, and we
want our APIs to keep partity across arches, but with the x86 IRQ
refactoring this is no longer needed.
Change-Id: Iacd61f4c4d3cc33b4a15bfa083e106ba6d5da942
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The simple uart drivers expects configuration options to be defined in
board.h and fails on platforms that do not provide such options.
Throw an error if needed configuration options are not provided.
Change-Id: I8c938868171eb8c1382075275ad96379cfc05a5a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Allows to remove the both edges support from the DW GPIO driver.
Change-Id: I9e39cca320aeac5d10aafe7a83641917ad004fe6
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Removing unsupported features that we inherited from Linux kbuild
Change-Id: I7cf19f913b0a7ba6195d2cb9c04b426144bdebb9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Lots of code that is not being used by Zephyr but makes debugging and find
issues related to zephyr very difficult.
Change-Id: If8f6515d68f64b03cc881a9c3cde48c0451fe3b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Application source code is not a core component of the kernel.
Remove from core-y and put the application tree in its own category.
Change-Id: I1d6f479829eb58b9a49baf90aaf9f74187660b86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Removing many of the typedefs that are only used once to lessen the
checkpatch warning about creating new typedefs. A handful have been
behind as they would require a more invasive change to the code. It
has yet to be determined if this is a worthwhile endavour.
Change-Id: Ibeb29e0a1d37e8121218fccf0d986cbebd226e85
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
This simplify the handling quite a bit while the application can still
prevent the buffer to be freed by referencing it if necessary.
Change-Id: I5ed0e96e8d9e349b79ba31ba9568af61181e1065
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Since segmentation is not enable the maximum SDU/MTU that could be
received is MPS - 2 since the first 2 bytes are used to inform the
SDU length.
Change-Id: I93b2f5b5bd5897870799db130d82476e520ee927
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Follow the same conventions as for all other HCI commands that are
part of the init sequence.
Change-Id: Ia88b66044d903be103b9ce9fdc2a026a38ac551a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Groups logically the sequence of hci initialization.
Change-Id: I6b465e79e809ce6514b8d6cc7563e4ee9775d324
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
It doesn't make sense to derive MPS from buffer tailroom since that a
signalling header, futhermore the buffer from signalling and data can
now have different sizes so instead just calculate the MPS based on
maximum buffer size.
Change-Id: Ieaac94b575c5d21711e0cb4b2685913977f057f3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Right now we don't rely on this value being set, but we might in the
future.
Change-Id: Icc560b6935582a9e6dc268d21ce0784773aa480d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This check was trying to optimize the CID allocation, but it adds
little value and was actually broken because of the wrong CID passed
to the lookup function.
Change-Id: I793be0c5eeccb931cea4a5430991d4e692926da6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Make it clear why we're checking for non-zero rx CID.
Change-Id: I07a44cf1a0f28c540b191e24aba4d0519c338eaf
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For an LE L2CAP Connect Response with a failure error code the core
specification states:
"The DCID, MTU, MPS and Initial Credits fields shall be ignored when
the result field indicates the connection was refused."
This means that there's no point in setting any specific value to it,
i.e. it can be left to 0 as set by memset.
Change-Id: Iead8039c7b60e1cf766e9ab14691e83fe9813288
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The test causes random failure so remove it temporarily.
Change-Id: I0b74877ad27d673099d0eecb191b6978bf9b40ee
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
L2CAP_LE_DYN_CID_END is still a valid CID so we should include it in
the search.
Change-Id: I5ead169fd9114c5d418e2e4f504d82faca8b1afa
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When receiving an LE L2CAP Connect Request we should verify that the
proposed remote CID is within the dynamic CID range, and if not return
the appropriate error.
Change-Id: I54ca2431f0f622f96bc2c3acbd3de7ca4c92713a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If we receive a connect request for an SCID that's already allocated
we should return the appropriate "SCID in use" error for it instead of
"No resources".
Change-Id: I1c1e1bba7059c8a37a8cc01c4bb2f3fbd7aab67d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Even if a buffer can't hold the needed amount of data we should still
cleanly discard the bytes so that the driver doesn't loose sync of the
next packet boundary. This way we also get to remove the now
unnecesary 'failed' label.
Change-Id: Ic921fbf6c0ddef4a7721cee7fa3e01a31b127778
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This store the original MTU sent by the remote instead of limiting it to
the amount the buffer can allocate since buffer sizes can now be
different and it was anyway wrong to assume the size of buffer used for
signalling would be the same as in data packets.
Change-Id: I52c7e4946ae949a0068ce28a00d2b427a48a1b51
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Buffer received over L2CAP dynamic channels needs to be unref by the
application once they are done with it.
Change-Id: If210be1c538cf0b550dd03094d007b6851cdfbf4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit fixes this compile error if network buffer debugging
is activated.
CC net/buf.o
net/buf.c: In function 'net_buf_unref':
net/buf.c:40:31: error: expected expression before 'if'
#define NET_BUF_ASSERT(cond) (if (!(cond)) { \
^
net/buf.c:81:2: note: in expansion of macro 'NET_BUF_ASSERT'
NET_BUF_ASSERT(buf->ref > 0);
^
Change-Id: Id4248806a5df571663e47eab581164a16df0cd1b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The structs are private so there's no need for long name-spacing.
Also, the bt_hci_data is only used for commands, so just call it
cmd_data.
Change-Id: I924a5b8a8cbcb9eb56038a83c03bcbcf7e79b6e0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The HCI commands and events have slightly different requirements
(e.g. max sizes, or the fact that events don't need any user data) so
it makes sense to keep them separate. The total count is kept at 8 (2
+ 6) but the ACL_OUT count is modified to not exceed the event count
(to avoid inability of handling bursts of Number of Completed Packets
events). The ACL_IN count is also modified to keep these symmetric for
now.
Change-Id: Ia1915a596424425525b6df67e0ddce47a7f618f3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The BT_BUF_ACL_IN_MAX was a left-over that shouldn't be used anymore.
Change-Id: Ifa15e00e7e72f56670961ca7830595a2b4301093
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
BLUETOOTH_DEBUG and BLUETOOTH_DEBUG_HCI_CORE options are also useful
for Broadcaster and Observer roles and should not depends on connection
support.
Change-Id: Ice1142f3dcc5d73e5460449cc1444a1345eb624a
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This is also useful for Broadcaster and Observer roles and shouldn't
depend on connection support.
Change-Id: I85003253455c3949344e26d24a5fb3a718115947
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Networking code is in net directory in other parts of the
code base so rename network -> net in samples/microkernel/apps
directory.
Change-Id: Ic89d4616a28b4079f90351938f9798c7bf61ce05
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Networking code is in net directory in other parts of the
code base so rename network -> net in samples/nanokernel/apps
directory.
Change-Id: I5684f569f75aa0a9d66128cf786e60ced79fbaf0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Networking code is in net directory in other parts of the
code base so rename network -> net in samples directory.
Change-Id: I0ca0188c6844b0957270398d08b85a3153819e97
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>