From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akio Takebe Subject: Re: [Bochs-developers] [Patch] [BIOS] support BCV for rombios Date: Thu, 18 Dec 2008 15:17:50 +0900 Message-ID: <4949EB0E.80902@jp.fujitsu.com> References: <0C959291A7343takebe_akio@jp.fujitsu.com> <15C95B57B24361takebe_akio@jp.fujitsu.com> <049E3278669E4B7BAD0653C10B0C5731@FSCPC> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090301090007090000010203" Return-path: In-Reply-To: <049E3278669E4B7BAD0653C10B0C5731@FSCPC> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Sebastian Herbszt Cc: bochs-developers@lists.sourceforge.net, xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------090301090007090000010203 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sebastian Herbszt wrote: > Akio Takebe wrote: >> Hi, >> >>>> + /* 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 >>> >>> ja? not jmp? >>> >> Oops. yes jmp. > > Can you please resend a fixed version? > > Thanks > Sebastian > > Sorry, and thank you for your review. I updeted our patch. Signed-off-by: Akio Takebe Signed-off-by: Kouya Shimura Best Regards, Akio Takebe --------------090301090007090000010203 Content-Type: text/x-diff; name="bcv_bochs.2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bcv_bochs.2.patch" Index: bios/rombios.c =================================================================== RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v retrieving revision 1.222 diff -u -r1.222 rombios.c --- bios/rombios.c 15 Dec 2008 06:05:52 -0000 1.222 +++ bios/rombios.c 18 Dec 2008 06:15:52 -0000 @@ -10251,6 +10251,30 @@ 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) + jmp 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 --------------090301090007090000010203 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------090301090007090000010203--