[coreboot] [Patch] remove some warnings
Myles Watson
mylesgw at gmail.com
Thu Mar 18 00:05:34 CET 2010
On Wed, Mar 17, 2010 at 4:16 PM, Stefan Reinauer <stepan at coresystems.de>wrote:
> On 3/17/10 11:11 PM, Stefan Reinauer wrote:
> > On 3/17/10 10:33 PM, Myles Watson wrote:
> >
> >> +#ifndef __ROMCC__
> >> +#include <lib.h> /* Prototypes */
> >> +#endif
> >>
> > I think the ifndef __ROMCC__ should go into lib.h just as __PRE_RAM__
> did..
> >
> >
> > Acked-by: Stefan Reinauer <stepan at coresystems.de>
> >
> Sorry, got to N-Ack again....
>
> unsigned char AmlCode[] =
> {
> 0x44,0x53,0x44,0x54,0xE6,0x27,0x00,0x00, /* 00000000 "DSDT.'.." */
> 0x02,0x7C,0x41,0x4D,0x44,0x20,0x20,0x20, /* 00000008 ".|AMD " */
> 0x4D,0x41,0x48,0x4F,0x47,0x41,0x4E,0x59, /* 00000010 "MAHOGANY" */
> ....
> }
>
>
> and in another file it looks like this:
>
> -extern unsigned char AmlCode[];
> +extern void* AmlCode;
>
>
> So AmlCode is used as a void * pointing to the address 0x54445344
>
> which is definitely not what you want...
>
You're right. And that's definitely not what I expected to happen. It
seems like there ought to be a correct way to do this. I'll keep looking.
Thanks,
Myles
>
>
> Even though it might appear that char *foo and char foo[] are the same
> in C, they're in fact not.
>
>
> Stefan
>
>
> --
> coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
> Tel.: +49 761 7668825 • Fax: +49 761 7664613
> Email: info at coresystems.de • http://www.coresystems.de/
> Registergericht: Amtsgericht Freiburg • HRB 7656
> Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
>
>
> --
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100317/d711f2bb/attachment.html>
More information about the coreboot
mailing list