summaryrefslogtreecommitdiff
path: root/usr/src/grub
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2015-10-19 11:08:18 -0400
committerDan McDonald <danmcd@omniti.com>2015-10-19 11:10:35 -0400
commit7232236b5511ebe9b3343a5e1ab57a898e709218 (patch)
tree80a1e1a033a4018528bccdaeb04003d8850022c9 /usr/src/grub
parent33d794d10eebfa2727ac1fc98fe0dd6c68f627dc (diff)
downloadillumos-joyent-7232236b5511ebe9b3343a5e1ab57a898e709218.tar.gz
6165 grub incorrectly interprets result of INT 15h, AX=EC00h
Reviewed by: Josef Sipek <jeffpc@illumos.org> Reviewed by: Toomas Soome <tsoome@illumos.org> Reviewed by: Andrew Stormont <andyjstormont@illumos.org> Approved by: Dan McDonald <danmcd@omniti.com>
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");