summaryrefslogtreecommitdiff
path: root/usr/src/grub
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2015-10-20 11:54:39 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2015-10-20 11:54:39 +0000
commit02c7f563c4b8524795f570372f240e7d94d1e4aa (patch)
tree06d80c11784906cd4dac4cd28f7d5f8b37223982 /usr/src/grub
parentbf4e36204b30585f000823d7db32998886c08543 (diff)
parentf2f1e74250739faac0cdf175c8a7ae4480770789 (diff)
downloadillumos-joyent-02c7f563c4b8524795f570372f240e7d94d1e4aa.tar.gz
[illumos-gate merge]
commit f2f1e74250739faac0cdf175c8a7ae4480770789 5780 Truncated coredumps (fix lint) commit 7232236b5511ebe9b3343a5e1ab57a898e709218 6165 grub incorrectly interprets result of INT 15h, AX=EC00h commit 33d794d10eebfa2727ac1fc98fe0dd6c68f627dc 5780 Truncated coredumps
Diffstat (limited to 'usr/src/grub')
-rw-r--r--usr/src/grub/grub-0.97/stage2/expand.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/grub/grub-0.97/stage2/expand.c b/usr/src/grub/grub-0.97/stage2/expand.c
index 43f8b1f0d7..ead71c6e6b 100644
--- a/usr/src/grub/grub-0.97/stage2/expand.c
+++ b/usr/src/grub/grub-0.97/stage2/expand.c
@@ -108,18 +108,18 @@ detect_target_operating_mode(void)
* call left CF clear, nonzero otherwise.
*/
ret = get_target_operating_mode();
- ah = ret & 0xff;
- ret >>= 8;
+ ah = ret >> 8;
+ ret &= 0xff;
if (ah == 0x86 && ret != 0) {
grub_printf("[BIOS 'Detect Target Operating Mode' "
"callback unsupported on this platform]\n");
- return (1); /* unsupported, ignore */
+ return (1); /* unsupported, ignore */
}
if (ah == 0 && ret == 0) {
grub_printf("[BIOS accepted mixed-mode target setting!]\n");
- return (1); /* told the bios what we're up to */
+ return (1); /* told the bios what we're up to */
}
if (ah == 0 && ret != 0) {
@@ -190,7 +190,7 @@ amd64_config_cpu(void)
}
if (maxeax < 1)
- return (0); /* no additional functions, not an AMD64 */
+ return (0); /* no additional functions, not an AMD64 */
else {
uint_t family, model, step;
@@ -232,7 +232,7 @@ amd64_config_cpu(void)
}
}
- if (BITX(xtdfeatures, 29, 29)) /* long mode */
+ if (BITX(xtdfeatures, 29, 29)) /* long mode */
isamd64++;
else
grub_printf("amd64: CPU does NOT support long mode\n");