]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/cmos.h: Handle high CMOS addresses on sparc64.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 2 Mar 2013 22:59:05 +0000 (23:59 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 2 Mar 2013 22:59:05 +0000 (23:59 +0100)
ChangeLog
include/grub/cmos.h

index 93a8a93ddbfb000f4a42256994bae9aec220f260..ea872293041829bca94241b26f83cbb101e4ce3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index aa2b233ece1ed3bed901b6fd537704ccc33f6564..56ccc71a917e3ab3fa8b2710a2f36fc3f6e5cc5b 100644 (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;
 }