annotate scripts/cfg-template @ 220:0ed36de51973

ABB semaphore protection overhaul The ABB semaphone protection logic that came with TCS211 from TI was broken in several ways: * Some semaphore-protected functions were called from Application_Initialize() context. NU_Obtain_Semaphore() called with NU_SUSPEND fails with NU_INVALID_SUSPEND in this context, but the return value wasn't checked, and NU_Release_Semaphore() would be called unconditionally at the end. The latter call would increment the semaphore count past 1, making the semaphore no longer binary and thus no longer effective for resource protection. The fix is to check the return value from NU_Obtain_Semaphore() and skip the NU_Release_Semaphore() call if the semaphore wasn't properly obtained. * Some SPI hardware manipulation was being done before entering the semaphore- protected critical section. The fix is to reorder the code: first obtain the semaphore, then do everything else. * In the corner case of L1/DSP recovery, l1_abb_power_on() would call some non-semaphore-protected ABB & SPI init functions. The fix is to skip those calls in the case of recovery. * A few additional corner cases existed, all of which are fixed by making ABB semaphore protection 100% consistent for all ABB functions and code paths. There is still one remaining problem of priority inversion: suppose a low- priority task calls an ABB function, and some medium-priority task just happens to preempt right in the middle of that semaphore-protected ABB operation. Then the high-priority SPI task is locked out for a non-deterministic time until that medium-priority task finishes its work and goes back to sleep. This priority inversion problem remains outstanding for now.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Apr 2021 20:55:25 +0000
parents b55b47f49638
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 [board.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 BOARD 41
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 [chipset.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 ANLG_FAM 2
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 ANLG_PG 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 CHIPSET var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 [debug.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 TI_NUC_MONITOR 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 TI_PROFILER var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 [dio.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 DIOIL_CONFIG 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 [ffs.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 TARGET 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 _RVF 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 [l1sw.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 AMR var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 CUST 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 DCO_ALGO 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 IDS var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 L1_12NEIGH 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 L1_EOTD 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 L1_EOTD_QBIT_ACC 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 L1_GPRS var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 L1_GTT 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 L1_MIDI 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 L1_VOICE_MEMO_AMR var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 MELODY_E2 var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 OP_L1_STANDALONE 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 OP_RIV_AUDIO 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 ORDER2_TX_TEMP_CAL 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 RAZ_VULSWITCH_REGAUDIO 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 SECURITY 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 SPEECH_RECO var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 TESTMODE 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 TRACE_TYPE 4
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 VCXO_ALGO 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 [r2d.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 R2D_ASM 0
6
b55b47f49638 FC Tourmaline R2D_EMBEDDED_LCD config change
Mychaela Falconia <falcon@freecalypso.org>
parents: 5
diff changeset
52 R2D_EMBEDDED_LCD var
5
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 R2D_LCD_TEST 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 [rf.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 RF var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 RF_FAM var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 RF_PA var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 RF_PG var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 [rv.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 RVTOOL 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 TEST 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 _GSM 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 [swconfig.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 ALR 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 BT 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 DP 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 DWNLD 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 GSMLITE 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 L1_DYN_DSP_DWNLD var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 LONG_JUMP 3
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 MOVE_IN_INTERNAL_RAM 1
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 OP_WCP 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 PMODE var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 RVDATA_INTERNALRAM 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 SRVC var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 TR_BAUD_CONFIG var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 WCP_PROF 0
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 [sys.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 DSP var
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 STD 6
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 [trace.cfg]
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 LAYER_DBG 0xFFFFFFFF
3bb135e72ac9 scripts/cfg-template: import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 TRACE_LEVEL_FILTER 5