Skip to content

Loading builds...

Changes

#138 (Mar 12, 2026, 11:32:18 PM)

Revert "clang-format: set ColumnLimit: 0"

This reverts commit 97caf6244398760ed8b0c5c045867b4bea36f0a0.

Reason for revert: we don't want clang-format to actively generate arbitrarily long line lengths.

Change-Id: I49111af334e6967a9c3a63ccb9d179df444d63bb
gerrit at

#137 (Mar 12, 2026, 5:53:38 PM)

ensure libosmocore logging is properly disabled for builds

Change-Id: I169a059d8daff0a3993318a4ea3ab7adcb05fee3
ewild at

#136 (Mar 12, 2026, 4:21:36 PM)

fw source: force reformat once and for all

This commit applies the rules to all files that matter
(obv excluding asf4 code) since it is impossible to modify code
because the code never used the code style enforced by the
linter/clang-format and
1) changing code
2) reformatting code
3) extracting the reformatting changes for the modified lines as a
separate commit
4) commiting standalone reformatting changes
4) commiting the actual code change on top
is a workflow that takes forever and is completely ridiculous because
the whole point of formatter rules is to apply them.

This needs a second commit with .git-blame-ignore-revs to not pollute blame.

Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
ewild at

#135 (Mar 12, 2026, 4:21:36 PM)

fw: add git blame ignore file

Reformatting should not pollute blame, so ignore those revs.

Change-Id: I35b86f52d491c9e28ab0af9e3e3d4fd5f6dbd119
ewild at

#134 (Mar 11, 2026, 12:18:45 AM)

ccid: properly emit wait time ext messages

The CCID message that tells the host that the card
asked for a wait time extension was missing.

This is a bit weird, because it breaks the 1:1
relationship between messages and responses that
usually exists, nor does it consume a bSeq,
so we just emit WT msgs as appropriate.

It is bounded to prevent msgb exhaustion issues.

Closes: OS#6458
Change-Id: Ib69483d453a0e5ebb1bc1885a8f78790a0f10d70
ewild at

#133 (Mar 10, 2026, 11:41:28 PM)

firmware: fix msgb/list mixed irq access handling

This fixes the mishandling of in_progress and the queues in the submit
functions that are in part irq driven, too, and ensures nothing breaks
by preventing concurrent access from irqs to the queues. Applying the
same pattern to all functions/cases is fine either way.

On top of all of tha the out ep was irq driven, so if submit_next_out
fails it was stuck, now fixed by attempted submit from main loop, and of
course the queue manipulation should be irq safe here as well.

Change-Id: I9212bfa7688cb4d3161ba963b854225744128632
ewild at

#132 (Mar 10, 2026, 11:41:25 PM)

ccid: generate proper error for short messages

Change-Id: I3bf0bebd361666a2f3d0341444415a6f25d2b4bf
ewild at

#131 (Mar 10, 2026, 7:28:15 PM)

ccid: Handle the TPDU-length = 4 case according to CCID spec

While ISO7816-3 forbids any TPDU shorter from 5 bytes, the CCID spec
begs to differ and actually permits a host to send us 4-byte TPDUs of
Form 1, giving the responsibility of adding the P3=00h octet to the CCID
implementation.

Let's implement this accordingly.  While at it, also reject TPDUs of
lengths 1, 2 and 3 bytes - just like zero-length TPDUs.

Change-Id: Ia27962bda526af3373b36d637e2b548aa01a3346
Closes: OS#6973
laforge at

#130 (Mar 10, 2026, 4:03:00 PM)

ccid: properly reject PC_to_RDR_{ResetParameters,SetParameters}

As per CCID 1.1 ch 6.2.3 a reader that does not support
these commands can reject them, which we now do, instead of
pretending to accept the params.

This requires https://gitlab.com/wireshark/wireshark/-/issues/20107 to
be properly decoded in wireshark >= 4.4.8 .

As a bonus this fixes the error response in gen_err_resp which so far had superfluous param data attached to it.

Closes: OS#5380
Change-Id: I4d0671c160e9028097397ec47982bafbfdc24f24
ewild at

#129 (Mar 10, 2026, 3:59:44 PM)

ccid: properly reject PC_to_RDR_{ResetParameters,SetParameters}

As per CCID 1.1 ch 6.2.3 a reader that does not support
these commands can reject them, which we now do, instead of
pretending to accept the params.

This requires https://gitlab.com/wireshark/wireshark/-/issues/20107 to
be properly decoded in wireshark >= 4.4.8 .

Closes: OS#5380
Change-Id: I4d0671c160e9028097397ec47982bafbfdc24f24
ewild at

#128 (Mar 10, 2026, 1:34:16 PM)

ccid: properly emit wait time ext messages

The CCID message that tells the host that the card
asked for a wait time extension was missing.

This is a bit weird, because it breaks the 1:1
relationship between messages and responses that
usually exists, nor does it consume a bSeq,
so we just count and emit WT msgs as appropriate.

Closes: OS#6458
Change-Id: Ib69483d453a0e5ebb1bc1885a8f78790a0f10d70
ewild at

#127 (Mar 10, 2026, 1:22:03 PM)

firmware: enable watchdog timer

2s is plenty, and while not perfect it should at
least ensure that hangs that require manual
intervention happen rarely if at all.

At least from a custimer POV having resets in case
something breaks is better than ending up with non
working devices that are stuck.

Change-Id: I1ef1fc70d33492efe0171a7879c1a23f16957195
ewild at

#126 (Mar 10, 2026, 1:22:02 PM)

ccid: properly emit wait time ext messages

The CCID message that tells the host that the card
asked for a wait time extension was missing.

This is a bit weird, because it breaks the 1:1
relationship between messages and responses that
usually exists, nor does it consume a bSeq,
so we just count and emit WT msgs as appropriate.

Closes: OS#6458
Change-Id: Ib69483d453a0e5ebb1bc1885a8f78790a0f10d70
ewild at

#125 (Mar 10, 2026, 10:34:08 AM)

ccid: Fix CCID RDR_to_PC_Parameters (missing bProtocolNum)

Our RDR_to_PC_Parameters message was broken, as it was missing
the bProtocolNum value after the header.  Let's fix that.

Change-Id: I67d5cb876d20b29f4759d5b194606f34b8b966c4
laforge at

#124 (Mar 10, 2026, 10:34:07 AM)

ccid: Fix [unused] RDR_to_PC_Hardware_Error struct definition

Our definition of the message was wrong; it is an interrupt endpoint
message without the full header of the bulk-in endpoint. Luckily the
definition was not used in the code base, so this is not fixing any
problem visible on the protocol level.

Change-Id: Ieb756c37402c4ebea32cc3cd23ba3842f4c0df3e
laforge at

#123 (Feb 27, 2026, 5:31:38 PM)

irq: make default IRQ handler Dummy_Handler weak

To allow overwriting the default handler from the application,
make it weak.

Change-Id: I544e9c84dd538bb744fb799904adc58f9d850465
lynxis at

#122 (Feb 27, 2026, 5:30:30 PM)

main: rework panic handler

When an OSMO_ASSERT() fails it will call the osmo panic handler.
Previous it will always calls into a breakpoint which will require
a power-cycle.

Change the default (for production) to use a system reset.
But still allow calling into breakpoint by setting `break_on_panic` via SWD.

Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718
lynxis at

#121 (Feb 27, 2026, 5:30:30 PM)

irq: make default IRQ handler Dummy_Handler weak

To allow overwriting the default handler from the application,
make it weak.

Change-Id: I83850b8bad54f55bb26e69d7c4bdac7357c21902
lynxis at

#120 (Feb 27, 2026, 5:30:30 PM)

sysmoOCTSIM: define own IRQ handlers

Previous: In case of an fault, nmi or an uncatched IRQ, the OCTSIM
would go into a while(1) loop and would require a power cycle.
Overwrite the default Dummy_Handler with our own handler and
add panic handler as function to allow them to show up as
a different backtrace.

Change-Id: If8476fd4a784312a0597ddd0b7eb54a7ebf94868
lynxis at

#119 (Feb 27, 2026, 8:10:49 AM)

clang-format: set ColumnLimit: 0

While our coding style says "we accept line lengths of up to 120
characters", in practice we oftentimes end up preferring longer lines
(e.g. due to having comments at the end, or to keep them consistent with
similar but shorter lines).

The checkpatch config has already been adjusted to just ignore the line
length completely. Adjust the clang-format config to do the same.

Related: osmo-ci I88fd86ac550fddb3017aeceb647c3d9e75367372
Change-Id: I1f0d511d90a0725f195e08dd6a99eb3d55bd6fc1
Oliver Smith at

#118 (Feb 26, 2026, 5:17:20 PM)

After initialisation: turn user led on

Related: OS#5158
Change-Id: Ide37ea32648536d333bd5051b142eb15959d29bf
lynxis at

#117 (Feb 26, 2026, 5:05:48 PM)

sysmoOCTSIM: define own IRQ handlers

Previous: In case of an fault, nmi or an uncatched IRQ, the OCTSIM
would go into a while(1) loop and would require a power cycle.
Use a generic panic handler

Change-Id: If8476fd4a784312a0597ddd0b7eb54a7ebf94868
lynxis at

#116 (Feb 26, 2026, 5:05:48 PM)

main: rework panic handler

When an OSMO_ASSERT() fails it will call the osmo panic handler.
Previous it will always calls into a breakpoint which will require
a power-cycle.

Change the default (for production) to use a system reset.
But still allow calling into breakpoint by setting `break_on_panic` via SWD.

Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718
lynxis at

#115 (Feb 26, 2026, 5:05:48 PM)

same54: make the default irq handler weak

The default handler for all IRQs is the Dummy_Handler, which is a
simple while(true); wait-loop.

Introduce a weak symbol Default_Handler which alias to the
Dummy_Handler.

This allows replacing the default handler by a single
symbol rather than setting all IRQs seperate to the new handler.

Change-Id: I544e9c84dd538bb744fb799904adc58f9d850465
lynxis at

#114 (Feb 26, 2026, 4:59:50 PM)

After initialisation: turn system led on

Related: OS#5158
Change-Id: Ide37ea32648536d333bd5051b142eb15959d29bf
lynxis at

#113 (Feb 26, 2026, 4:36:01 PM)

dfu: fix integer overflow in delay_us()

delay_us(uint16_t) can't handle us > 65535.
Split the 100 ms into 2 function calls.

Change-Id: Ieaf1109c99662a21927901a2e0e3ddac42aa3d3c
lynxis at

#112 (Feb 25, 2026, 7:26:56 PM)

ensure libosmocore logging is properly disabled for builds

Change-Id: I169a059d8daff0a3993318a4ea3ab7adcb05fee3
ewild at

#111 (Feb 24, 2026, 12:13:21 PM)

ccid_slot_fsm.c: Reject T=0 TPDU > 260 bytes

The CCID v1.1 specification states a T=0 TPDU must not exceed 260 bytes,
so let's properly handle this error case.

Change-Id: Iceb0013adf448fe56c909fd8ccf14a021d8b7331
laforge at

#110 (Feb 24, 2026, 12:13:21 PM)

ccid_device: Reject XfrBlock with zero-length data

While the CCID v1.1 spec seems to declare dwLength == 0 is within
the valid range, it's of course a no-op as we cannot transact a TPDU
that isn't there.

Change-Id: I65df88477e4b1c03dc20a8d41e5cbd1c9f363ba8
laforge at

#109 (Feb 23, 2026, 1:38:28 AM)

main: rework panic handler

When an OSMO_ASSERT() fails it will call the osmo panic handler.
Previous it will always calls into a breakpoint which will require
a power-cycle.

Change the default (for production) to use a system reset.
But still allow calling into breakpoint by setting `break_on_panic` via SWD.

Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718
lynxis at

#108 (Feb 21, 2026, 11:21:25 AM)

main: rework panic handler

When an OSMO_ASSERT() fails it will call the osmo panic handler.
Previous it will always calls into a breakpoint which will require
a power-cycle.

Change the default (for production) to use a system reset.
But still allow calling into breakpoint by setting `break_on_panic` via SWD.

Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718
lynxis at

#107 (Feb 21, 2026, 11:17:44 AM)

main: rework panic handler

When an OSMO_ASSERT() fails it will call the osmo panic handler.
Previous it will always calls into a breakpoint which will require
a power-cycle.

Change the default (for production) to use a system reset.
But still allow calling into breakpoint by setting `break_on_panic` via SWD.

Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718
lynxis at

#106 (Feb 21, 2026, 11:15:59 AM)

main: rework panic handler

When an OSMO_ASSERT() fails it will call the osmo panic handler.
Previous it will always calls into a breakpoint which will require
a power-cycle.

Change the default (for production) to use a system reset.
But still allow calling into breakpoint by setting `break_on_panic` via SWD.

Change-Id: I91c732001e848ec5509bf81af8aac1a2a80eb718
lynxis at

#105 (Feb 21, 2026, 11:12:03 AM)

main: fix crash when ccid_df_write_in() fails

The OSMO_ASSERT(msg->list.next != LLIST_POISON1) are checking msgb
which has been removed from the llist.
All llist members which aren't part of a list have LLIST_POISON1 assigned.

These OSMO_ASSERT()s will always trigger this msgb.

Fixes: a684bc4e38b4 ("Make ch9 usb tests work")
Change-Id: I49c81fba756f3620638b6c6c664f53e4a8758ef9
lynxis at

#104 (Feb 21, 2026, 11:12:01 AM)

main: don't access msgbs after giving them away

Because of IRQ, it is dangerous to access a msgb,
which has been giving away to a queue (ownership transfer).

Further OSMO_ASSERT() should never fail on a queue'd object,
except it has been taken already from an IRQ context.
Fix a potential crash.

Fixes: a684bc4e38b4 ("Make ch9 usb tests work")
Change-Id: I79844f77d5cd75e08b0eb44b22c4ad223cb79dcb
lynxis at

#103 (Feb 21, 2026, 11:08:04 AM)

ccid_common: iso_handle_fsm_events: add missing return

Fix warning about control reaches end of non-void function.

Change-Id: I4066c8a1ab1eadb3d8f8cbaf5aa0afbbb2e5dd80
lynxis at

#102 (Feb 20, 2026, 10:19:03 AM)

ccid: fix rdr_to_pc_parameters and rdr_to_pc_hardware_error

Change-Id: I67d5cb876d20b29f4759d5b194606f34b8b966c4
ewild at