[coreboot] Building Televideo/TC7010 on Fedora 12

Peter Bannis peterjayb at gmail.com
Sun Feb 14 23:02:37 CET 2010


You are not confused.  It should be
  while(!(inb(PM_BASE + 1) & 0x80))

but the current code has
while(!inb(PM_BASE + 1 & 0x80))

either way incorrect code to read port 0x80 is generated instead of reads to
port (0xe8+1):
L1024:
        /* ,:0.0 */
        /*
         * __builtin_inb,<built-in>:1.0
         * inb,io.h:31.29
         * pc97317_enable_serial,pc97317_early_serial.c:44.19
         * main,romstage.c:43.30
         */
        inb  $128 , %al
        movzx %al, %ebp
        /*
         * pc97317_enable_serial,pc97317_early_serial.c:44.39
         * main,romstage.c:43.30
         */
        test %ebp, %ebp
        jz L1024
.




On Sun, Feb 14, 2010 at 3:05 AM, ron minnich <rminnich at gmail.com> wrote:

> On Sat, Feb 13, 2010 at 10:36 AM, Peter Bannis <peterjayb at gmail.com>
> wrote:
>
> > romcc generates wrong code in pc97317_early_serial_init.c
> >     /* Wait for the clock to stabilise */
> >      while(!inb(PM_BASE + 1 & 0x80))
> >               ;
>
> Should this be
> while(!(inb(PM_BASE + 1) & 0x80))
>
> or some such? You're doing an inb from PM_BASE+1&0x80 as an address?
> I'm confused.
>
> ron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100214/9c8486c6/attachment.html>


More information about the coreboot mailing list