* include/grub/cmos.h: Handle high CMOS addresses on sparc64.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-02 23:59:05 +01:00
parent 1d5a880fe4
commit 83e1a1a137
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2013-03-02 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/cmos.h: Handle high CMOS addresses on sparc64.
2013-03-02 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/mips/loongson/cmos.h: Fix high CMOS addresses.

View File

@ -103,8 +103,8 @@ grub_cmos_read (grub_uint8_t index, grub_uint8_t *val)
if (err)
return err;
}
grub_cmos_port[0] = index;
*val = grub_cmos_port[1];
grub_cmos_port[((index & 0x80) >> 6) | 0] = index & 0x7f;
*val = grub_cmos_port[((index & 0x80) >> 6) | 1];
return GRUB_ERR_NONE;
}
@ -118,8 +118,8 @@ grub_cmos_write (grub_uint8_t index, grub_uint8_t val)
if (err)
return err;
}
grub_cmos_port[0] = index;
grub_cmos_port[1] = val;
grub_cmos_port[((index & 0x80) >> 6) | 0] = index;
grub_cmos_port[((index & 0x80) >> 6) | 1] = val;
return GRUB_ERR_NONE;
}