Re: [Redbutton-devel] Problems running on arm platform...
Brought to you by:
skilvington
|
From: Simon K. <s.k...@er...> - 2010-01-26 17:06:31
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
from past experience with ARM processors, I would guess the reason the
wrong value is getting read is because it is not aligned on a 4-byte
boundary in memory - in theory the fix should be fairly trivial - change
the biop_uint32 function to take a pointer to the uint32 rather than the
actual value - but it means changing every instance in the code where
the biop_uint32 function is called.
try adding this function to the biop.c file:
uint32_t
biop_puint32(uint8_t byte_order, uint8_t *raw)
{
uint8_t *p = raw;
uint32_t val;
if(byte_order == BIOP_BIGENDIAN)
val = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
else
val = (p[3] << 24) + (p[2] << 16) + (p[1] << 8) + p[0];
return val;
}
then change line 278 from:
if(biop_uint32(profile_bo, *((uint32_t *) profile.data)) !=
TAG_ObjectLocation)
to:
if(biop_puint32(profile_bo, profile.data)) != TAG_ObjectLocation)
if that fixes the first fatal error, then do the equivalent change for
every other call to biop_uint32... there's only about 9 in total - let
me know if it works and if you need a hand - if it fixes it I'll update
the code.
Stuart Hopkins wrote:
> Hi,
> I've been trying to get rb-download to work on an arm platform
> (Sheevaplug) but it's having some trouble decoding the data. The
> standard error message I get is:
>
> Expecting BIOP::ObjectLocation
>
> However after some hacking around with the C code it looks like a
> conversion problem in biop_uint32. Some details below:
>
>
> Waiting for tuner to lock on
> Retuned
> original_network_id=9018
> PMT PID: 4163
> PID=600 video stream_type=0x2
> PID=600 component_tag=1
> PID=601 component_tag=2
> PID=601 audio stream_type=0x3
> PID=602 component_tag=6
> PID=605 component_tag=5
> PID=605 descriptor=0x59
> 0x00000000 65 6e 67 10 00 01 00 01 eng.....
> PID=1005 component_tag=110
> PID=1005 carousel_id=1
> PID=1005 boot_priority_hint=0
> UK application_type_code (0x0101)
> Set boot_pid=1005 carousel_id=1
> Adding PID 1005 to filter
> PID=1006 component_tag=111
> PID=1007 component_tag=112
> PID=650 component_tag=101
> PID=651 component_tag=102
> PID=652 component_tag=103
> Carousel ID=1
> Boot PID=1005
> Video PID=600
> Audio PID=601
> Listening on 0.0.0.0:10101
> DownloadServerInitiate
> BIOP::ServiceGatewayInfo
> 0x00000000 00 00 00 04 73 72 67 00 00 00 00 01 49 53 4f 06
> ....srg.....ISO.
> 0x00000010 00 00 00 28 00 02 49 53 4f 50 0a 00 00 00 01 00
> ...(..ISOP......
> 0x00000020 ac 01 00 01 01 49 53 4f 40 12 01 00 00 00 16 00
> .....ISO@.......
> 0x00000030 65 0a 00 01 80 00 00 42 03 93 87 00 00 00 00 00
> e......B........
>
>
> The conversion error appears to be:
>
> 49530002 - 49534F50
>
> where the first value is the converted result, and the last value is
> what it expects. You can see that in the hex dump above that value is
> there, and the same goes for the DSM::ConnBinder value later on (if I
> override the fatal error).
>
> I'm pretty rubbish at C, but i'm hoping someone on the devel list can
> shed some insight, or possibly a patch, to fix this :-) I'm willing to
> test any patches that people can provide etc.
>
> Regards
>
> Stuart
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Redbutton-devel mailing list
> Red...@li...
> https://lists.sourceforge.net/lists/listinfo/redbutton-devel
>
>
- --
Simon Kilvington
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAktfHFoACgkQmt9ZifioJSzlSgCbBLTqRE8ltS6U/0pS3FbKeA7R
DFQAn2bNyHGUDSHKqQwpFzoU7TVyJkhr
=Tepe
-----END PGP SIGNATURE-----
|