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@gmail.com wrote:
On Sat, Feb 13, 2010 at 10:36 AM, Peter Bannis peterjayb@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