All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarno Rajala <jarraj@utu.fi>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [BUG] QEMU BIOS - El Torito no emulation boot address incorrect seg:off
Date: Wed, 23 Jul 2008 12:44:48 +0300	[thread overview]
Message-ID: <4886FD90.6040409@utu.fi> (raw)

Hello

I believe I've located a minor bug in QEMU BIOS. According to the El 
Torito specification the no emulation mode should load the boot code to 
the real mode address seg:0 and start executing from there. However, 
QEMU jumps to 0:seg*16, which is the same absolute address, but wrong 
segment:offset.

The QEMU BIOS version I have is

QEMU BIOS - build: 02/13/08
$Revision: 1.194 $ $Date: 2007/12/23 19:46:27 $
Options: apmbios pcibios eltorito rombios32

The following boot code illustrates the problem. It prints JJ to the top 
of the screen on a real PC, but prints JA instead on QEMU. (The boot 
image is set to load into the segment 0x7c8)

test_code:
    call .call
.call:
    pop bx
    mov ax,cs
    shl ax,4
    add ax,bx
   
.l1
    cmp ax,0x7c83
    jne .l1
   
    mov ax,0xb800
    mov es,ax
    mov [es:0],word 0x074a
   
    mov ax,cs
    cmp ax,0x7c8
    jne .l2
    mov [es:2],word 0x074a
    jmp .loopy
.l2
    cmp ax,0
    jne .loopy
    mov [es:2],word 0x0741
   
   
.loopy:
    jmp .loopy

Jarno Rajala

             reply	other threads:[~2008-07-23  9:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23  9:44 Jarno Rajala [this message]
2008-07-23 14:12 ` [Qemu-devel] [BUG] QEMU BIOS - El Torito no emulation boot address incorrect seg:off Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4886FD90.6040409@utu.fi \
    --to=jarraj@utu.fi \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.