FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/stand/README @ 616:4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 30 Aug 2014 22:52:35 +0000 |
parents | 9e605ec89ed0 |
children |
rev | line source |
---|---|
613
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 In their internal development environment, TI had a way to build L1 standalone, |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 i.e., omitting the G23 protocol stack and other large and complex pieces of the |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 full firmware. Such an ability is essential for sane development, and the |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 abundant references to OP_L1_STANDALONE throughout the codebase confirm that TI |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 had it indeed. |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 However, we (FreeCalypso) don't have a way to build an OP_L1_STANDALONE image |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 exactly the way TI did it - we don't have all of the necessary source - the |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 glue pieces specific to this configuration are missing. Nor do we necessarily |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 need to imitate what TI did in this department: it appears that TI's standalone |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 L1 build omitted GPF (with the exception of OS and OSX) and everything that |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 lives in Riviera land, but for us the situation is different: we already have |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 a successful build with Riviera and GPF, but no L1, thus we simply need to add |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 L1 to what we have. Our idea of standalone L1 simply means building without |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 the G23 stack, which we have yet to begin integrating. |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 In the standard firmware build, there is a component called L1 PEI. It is part |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 of the G23 stack, and has header and library dependencies of the latter - thus |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 it is *not* part of the L1 code proper. However, it performs some essential |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 initialization steps, and runs the L1A task. We don't know how TI handled |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 these functions in their standalone L1 build - we don't have that part of their |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 source, not even in the otherwise complete LoCosto version, not even if we were |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 targeting LoCosto hardware. |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 Our solution: we are going to lift l1_pei out of LoCosto's g23m-gsm, and hack |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 up a special version of it that won't have the standard complement of G23 |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 header and library dependencies. It is virtually certain that TI did something |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 different, but our hack-solution should work for our needs. |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 Because our standalone L1 build is a specially stripped-down version of the |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 regular fw build, and not at all like TI's standalone L1, we do NOT define |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 OP_L1_STANDALONE. Instead we have a different preprocessor symbol: |
9e605ec89ed0
gsm-fw/L1/stand: starting work on our version of standalone L1
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 CONFIG_L1_STANDALONE. |
616
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
34 |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
35 The standard version of l1_pei calls vsi_c_open() to get queue handles of |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
36 several G23 stack entities; it connects by name to "PL", "MMI", and if GPRS is |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
37 enabled, also to "GRR", "LLC" and "SND". If we leave these connect-by-name |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
38 calls unchanged in our L1 standalone version, our pei_init() will always return |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
39 PEI_ERROR and never successfully initialize, which would not be very useful. |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
40 If we removed these vsi_c_open() calls and the associated OSX queue setup, the |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
41 first osx_send_prim() addressed to the queue in question will crash, so that |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
42 approach wouldn't be useful either. |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
43 |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
44 What we would like to do is redirect all outbound messages emitted by our |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
45 standalone L1 to the debug serial interface, using GPF's TST entity, just as if |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
46 an L1 REDIRECT or DUPLICATE command was given to a complete GSM fw image. |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
47 However, simply connecting our queues to TST won't work, as TST is not designed |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
48 to receive "internal" protocol stack primitives directly. When the routing |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
49 facility is used to DUPLICATE or REDIRECT a prim to an external entity, the |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
50 code in gpf/frame/route.c sends a special "wrapper" prim to TST, and we need to |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
51 replicate this wrapping in order to achieve the same effect. |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
52 |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
53 Our solution: we are going to construct a special forwarder entity called L1IF, |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
54 and the connect-by-name calls in l1_pei which normally point to PL, MMI etc |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
55 will point to L1IF instead. L1IF will run in the passive body variant, and its |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
56 pei_primitive() function will replicate the routing facility's logic for |
4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
613
diff
changeset
|
57 forwarding PS primitives to TST. Whew! |