robert wrote:
> Hi all, allow the code to explain:
>
> *((volatile unsigned char *) 0xe00e0f3c) = 0x00800000;
>
> If curious, this code is in local_bus_init() , in the u-boot
> bootloader for linux for a ppc proccessor.
This is a non-Standard piece of code using implementation-defined
cast magic to convert an integer (fx:OT which /probably/ expresses an
address in some piece of Linux ppc kernel address space) to a
pointer-to-volatile-unsigned-char, and then stores an integer
value almost certainly too big to be represented by an unsigned
char -- I'd expect it to be truncated to zero -- into that location.
It's magic. For what it really does, you'd have to ask in a more
specific newsgroup. Or perhaps in a PPC manual.
--
Far-Fetched Hedgehog
"A facility for quotation covers the absence of original thought." /Gaudy Night/
|