All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] [BIOS] support BCV for rombios
@ 2008-12-08 11:35 Akio Takebe
  2008-12-11  0:02 ` Sebastian Herbszt
  0 siblings, 1 reply; 7+ messages in thread
From: Akio Takebe @ 2008-12-08 11:35 UTC (permalink / raw)
  To: xen-devel, bochs-developers

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 573 bytes --]

Hi,

This patch supports BCV for PCI device.
If we use this patch in Xen, we would need some more fixes.
This patch just support BCV.
We could boot a full virtualize guest from a Pass through device
with VT-d on Xen.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>

Ref:
- XenSummit Asia 2008
  http://www.xen.org/files/xensummit_tokyo/24_Hitoshi%20Matsumoto_en.pdf
- BIOS Boot Specification
  http://www.phoenix.com/NR/rdonlyres/56E38DE2-3E6F-4743-835F-B4A53726ABED/0/specsbbs101.pdf

Best Regards,

Akio Takebe

[-- Attachment #2: bcv_bochs.patch --]
[-- Type: application/octet-stream, Size: 1304 bytes --]

Index: rombios.c
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
retrieving revision 1.209
diff -c -r1.209 rombios.c
*** rombios.c	2 Jun 2008 20:08:10 -0000	1.209
--- rombios.c	8 Dec 2008 10:09:53 -0000
***************
*** 10194,10199 ****
--- 10194,10223 ----
    mov  ax, 2[bx]
    cmp  ax, #0x506e
    jne  no_bev
+ 
+   mov  ax, 0x16[bx] ;; 0x16 is the offset of Boot Connection Vector
+   cmp  ax, #0x0000
+   je   no_bcv
+ 
+   ;; Option ROM has BCV. Run it now.
+   push cx       ;; Push seg
+   push ax       ;; Push offset
+ 
+   ;; Point ES:DI at "$PnP", which tells the ROM that we are a PnP BIOS.
+   mov  bx, #0xf000
+   mov  es, bx
+   lea  di, pnp_string
+   /* jump to BCV function entry pointer */
+   mov  bp, sp   ;; Call ROM BCV routine using seg:off on stack
+   db   0xff     ;; call_far ss:[bp+0]
+   db   0x5e
+   db   0
+   cli           ;; In case expansion ROM BIOS turns IF on
+   add  sp, #2   ;; Pop offset value
+   pop  cx       ;; Pop seg value (restore CX)
+   ja   no_bev
+ 
+ no_bcv:
    mov  ax, 0x1a[bx] ;; 0x1A is also the offset into the expansion header of...
    cmp  ax, #0x0000  ;; the Bootstrap Entry Vector, or zero if there is none.
    je   no_bev

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-18  6:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08 11:35 [Patch] [BIOS] support BCV for rombios Akio Takebe
2008-12-11  0:02 ` Sebastian Herbszt
2008-12-11  4:57   ` Michael Brown
2008-12-11  5:55     ` [Bochs-developers] " Akio Takebe
2008-12-11  6:14   ` Akio Takebe
2008-12-17 20:59     ` Sebastian Herbszt
2008-12-18  6:17       ` [Bochs-developers] " Akio Takebe

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.