From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: Re: [PATCH 0/5] bios: >4G updates Date: Mon, 13 Oct 2008 10:33:09 -0600 Message-ID: <1223915589.7325.58.camel@lappy> References: <1222188118.8138.101.camel@2710p.home> <48DA1F6A.40105@redhat.com> <1222273063.16470.157.camel@lappy> <1222358913.8138.245.camel@2710p.home> <48DFA094.6040208@redhat.com> <48E22A32.7060007@redhat.com> <48E257E7.8000600@redhat.com> <1222809578.9495.24.camel@2710p.home> <48E4BFB6.5020204@redhat.com> <20081012225006.GA23256@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm-devel , gleb@redhat.com To: Kevin O'Connor Return-path: Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:5112 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755420AbYJMQdD (ORCPT ); Mon, 13 Oct 2008 12:33:03 -0400 In-Reply-To: <20081012225006.GA23256@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 2008-10-12 at 18:50 -0400, Kevin O'Connor wrote: > As an aside, is there any interest in using SeaBIOS with kvm? > > SeaBIOS is a port of bochs bios to gcc. I've been using SeaBIOS > (along with coreboot) to boot and provide bios functions on real > hardware. It works fine under qemu also. Sounds interesting to me. The VirtaulBox project has also made improvements to the bochs bios that might be nice to pull in. I'd also like to see the TianoCore EFI image, that ia64 is using, work on x86. There's an x86 version for QEMU on the QEMU downloads page. With the (wip) patch below to increase the bios reserved region to 1MB I can boot to the EFI shell, but KVM is missing some emulation to boot Linux (works with --no-kvm, maybe an ff 6f opcode?). I haven't had a chance to debug it further. Thanks, Alex Increase BIOS memory region to 1MB Signed-off-by: Alex Williamson -- diff --git a/bios/rombios.c b/bios/rombios.c index 818ce63..57e5139 100644 --- a/bios/rombios.c +++ b/bios/rombios.c @@ -4579,17 +4579,17 @@ ASM_END break; case 5: /* 3 pages before the bios, we map the vmx tss pages */ - set_e820_range(ES, regs.u.r16.di, 0xfffbd000L, - 0xfffc0000L, 0, 0, 2); + set_e820_range(ES, regs.u.r16.di, 0xffdfd000L, + 0xffe00000L, 0, 0, 2); regs.u.r32.ebx = 6; regs.u.r32.eax = 0x534D4150; regs.u.r32.ecx = 0x14; CLEAR_CF(); return; case 6: - /* 256KB BIOS area at the end of 4 GB */ + /* 1MB BIOS area at the end of 4 GB */ set_e820_range(ES, regs.u.r16.di, - 0xfffc0000L, 0x00000000L ,0, 0, 2); + 0xffe00000L, 0x00000000L ,0, 0, 2); if (extra_highbits_memory_size || extra_lowbits_memory_size) regs.u.r32.ebx = 7; else diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c index a8cca15..d9850a4 100644 --- a/libkvm/libkvm-x86.c +++ b/libkvm/libkvm-x86.c @@ -42,7 +42,7 @@ static int kvm_init_tss(kvm_context_t kvm) * this address is 3 pages before the bios, and the bios should present * as unavaible memory */ - r = kvm_set_tss_addr(kvm, 0xfffbd000); + r = kvm_set_tss_addr(kvm, 0xffdfd000); if (r < 0) { fprintf(stderr, "kvm_init_tss: unable to set tss addr\n"); return r; -- Alex Williamson HP Open Source & Linux Org.