How to load ucodes

Started by roleo, 11. Jan 2010, 13:53

previous topic - next topic
Go Down

roleo

11. Jan 2010, 13:53 Last Edit: 11. Jan 2010, 17:09 by roleo
Hi @all.

I would like to understand how the loading of ucodes works.
I have a Pirelli HY100, now I'm using the azbox porting from mce2222 that works properly with llad.ko and em8xxx.ko.

I would like to understand:
1 - Why I can't use the original Pirelli modules (llad and em8xxx) rather than azbox?
If I use the Pirelli modules, the insmod operation completes successfully but the GUI doesn't appear (via scart).

2 - Why I can't load Pirelli xrpc files extracted from /dev/mtd*?
The irq_handler works but all other modules return a RM_BUSY error.
I tried with xrpc command (only llad.ko insmodded and /dev/em8xxx0 absent) and with ruaxrpc command (both llad.ko and em8xxx.ko insmodded).

3 - The loading procedure of xrpc files before the kernel start is only used to load the boot splash? Or is it mandatory for the audio/video decoding during the normal operations?

Thank you.

roleo

mce2222


1 - Why I can't use the original Pirelli modules (llad and em8xxx) rather than azbox?
If I use the Pirelli modules, the insmod operation completes successfully but the GUI doesn't appear (via scart).


for some reason SigmaDesigns likes to break APIs, that means that the software needs to be compiled with the MRUA version that matches the ucode version. They are always released as a bundle.
however if the ucodes are version 2.8.0.5 then you have a slight chance that software compiled for MRUA 2.8.0.1 will work (at least most of it)
but as soon as you have a difference in the third number then it will not work for sure.



2 - Why I can't load Pirelli xrpc files extracted from /dev/mtd*?
The irq_handler works but all other modules return a RM_BUSY error.
I tried with xrpc command (only llad.ko insmodded and /dev/em8xxx0 absent) and with ruaxrpc command (both llad.ko and em8xxx.ko insmodded).


that is indeed a very good question. the pirelli box is the only box currently know where xrpc ucodes do not work. and they do not work with the original pirelli software either !! so when you boot the box with the unmodified firmware then you will see that it tries to load them but fails.
I guess only pirelli can answer what they have done to the SMP to break this. at least it is not the default behavior of the chip.

the only difference between xrpc ucodes and those embedded into kernel modules is that the xrpc ucodes are encrypted. my guess is that they somehow uploaded a new encryption key into the SMP but they don't have the xrpc ucodes with the correct encryption since only Sigma can create valid ucodes. but this is speculation and there is probably no way to ever find out why it is like that.


3 - The loading procedure of xrpc files before the kernel start is only used to load the boot splash? Or is it mandatory for the audio/video decoding during the normal operations?


the xrpc ucodes are partly needed if boot splash screen should be displayed. If I remember correct then it is only the irq_handler.
but if the ucodes are loaded during boot, then they are already prepared for later use.
during the Linux startup they only need to be started with  xrpc -ustart x y

but it is not mandatory to load them at boot time... they can also be loaded from linux like this:
xrpc xrpc_xload_audio_ucode_SMP8634_2.8.XXX.Y.mips.bin
xrpc xrpc_xload_video_ucode_SMP8634_2.8.XXX.Y.mips.bin
xrpc xrpc_xload_demux_ucode_SMP8634_2.8.XXX.Y.mips.bin
xrpc xrpc_xload_irq_handler_SMP8634_2.8.XXX.Y.mips.bin
xrpc -ustart 2 4
xrpc -ustart 1 0
xrpc -ustart 1 1
xrpc -ustart 0 2
xrpc -ustart 0 3

... anyway, on the Pirelli box this just doesn't work.

roleo

Thanks so much for your explanation :)

roleo

JackTheVendicator

@mce2222
Is it possible to change the ucode key in the SMP chip?

mce2222

I am pretty sure that it is possible to do that, at least for Sigma, but I haven't seen any documentation that covered this. I think there is only some reference that different encryption keys can be stored in the CPU and you can use these keys to decrypt selfmade xload binaries. but the ucodes are special xloads with additional restrictions.
therefore even if you could change the encryption key... it would not help at all, because all xrpc ucodes need to be signed by Sigma

q2sire


I am pretty sure that it is possible to do that, at least for Sigma, but I haven't seen any documentation that covered this. I think there is only some reference that different encryption keys can be stored in the CPU and you can use these keys to decrypt selfmade xload binaries. but the ucodes are special xloads with additional restrictions.
therefore even if you could change the encryption key... it would not help at all, because all xrpc ucodes need to be signed by Sigma

Hi, I'm trying to follow an alternative route.
I'm studying netbox 8160 ver.5.1.16 and I understand that operates like the pirelli (all inside em8xxx).
NLC and I zfeet helped me to open the fw but probably there are some problems to be overcome:

  • the pirelli boot uses yamon but netgem not

  • kernel pirelli is 2.6 while netgem is 2.4


The goal is to understand whether the netgem application can run on USB (with a little effort)



Go Up