EV-64260-BP & GT64260 bi_recs
Quoted 1 line · Mark A. Greer
Forget the last one, here's attempt #3:
I can live with this.
But why is the MAC address in ASCII? Why not simply put the 6 bytes in there? Why the extra burden of parsing the ASCII?
MS
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 5 lines · Michael Sokolov
Quoted 1 line · Mark A. Greer
Forget the last one, here's attempt #3:
I can live with this.
I like it too.
Quoted 2 lines
But why is the MAC address in ASCII? Why not simply put the 6 bytes in there? Why the extra burden of parsing the ASCII?
Yes, it is ASCII. I prefer the actual 6 bytes too but I know others have expressed a strong preference for ASCII when dumping the bi_rec data (although in this example the mac addr is just as easy to read in a hex dump).
Does anyone have a problem if the MAC address is changed to be binary? Come to think of it, since its of BI_DEV_TYPE_GT_ETH we can probably do what we want since it only affects us. Let'see if anyone comes up with a valid reason not to change...
Mark
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 3 lines
But why is the MAC address in ASCII? Why not simply put the 6 bytes in there? Why the extra burden of parsing the ASCII?
Well, I would put the 6 bytes, I beleive he wrote it to make it readable for us ;)
The point of bi_recs is indeed to avoid ascii (to avoid wasting too much space). Or else we would just use a device_tree or an xml tree :)
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines · [email protected] wrote:
Quoted 2 lines
But why is the MAC address in ASCII? Why not simply put the 6 bytes in there? Why the extra burden of parsing the ASCII?
Well, I would put the 6 bytes, I beleive he wrote it to make it readable for us ;)
The point of
bi_recsis indeed to avoid ascii (to avoid wasting too much space). Or else we would just use adevice_treeor an xml tree :
Okay, this may be it, attempt #4:
Example for ev64260:
--------------------
[0] tag: BI_CMD_LINE
size: 36 (4 + 4 + 26 chars + 2 pad)
data: "console=ttyS0,115200 ip=on"
pad: 2[1] tag: BI_MEMSIZE
size: 12
data: 0x33554432 (32 MB)[2] tag: BI_GT64260_BASE
size: 12
data: 0xfc000000[3] tag: BI_DEVICE (embedded enet cltr 0)
size: 52 (8 + 2*12 + 16 + 4 == 52)
[3.0] tag: BI_DEV_TYPE
size: 12
data: BI_DEV_TYPE_GT_ETH
[3.1] tag: BI_DEV_ID
size: 12
data: 0x00000000 (1st enet device)
[3.2] tag: BI_MAC_ADDR
size: 16
data: 0xaabbccddeeff (6 byte MAC addr)
pad: 2
[3.3] 0x00000000 (NULL Termination of BI_STRUCT)[4] tag: BI_DEVICE (embedded enet cltr 1)
size: 52 (8 + 2*12 + 16 + 4 == 52)
[4.0] tag: BI_DEV_TYPE
size: 12
data: BI_DEV_TYPE_GT_ETH
[4.1] tag: BI_DEV_ID
size: 12
data: 0x00000001 (2nd enet device)
[4.2] tag: BI_MAC_ADDR
size: 16
data: 0xgghhiijjkkll (6 byte MAC addr)
pad: 2
[4.3] 0x00000000 (NULL Termination of BI_STRUCT)[5] tag: BI_DEVICE (embedded enet cltr 2)
size: 52 (8 + 2*12 + 16 + 4 == 52)
[5.0] tag: BI_DEV_TYPE
size: 12
data: BI_DEV_TYPE_GT_ETH
[5.1] tag: BI_DEV_ID
size: 12
data: 0x00000002 (3rd enet device)
[5.2] tag: BI_MAC_ADDR
size: 16
data: 0xmmnnooppqqrr (6 byte MAC addr)
pad: 2
[5.3] 0x00000000 (NULL Termination of BI_STRUCT)[6] 0x00000000 (NULL Termination of whole list)
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/