From patchwork Sat Jul 24 16:16:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 114073 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6OGGbix021717 for ; Sat, 24 Jul 2010 16:16:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444Ab0GXQQe (ORCPT ); Sat, 24 Jul 2010 12:16:34 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:54446 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755413Ab0GXQQe (ORCPT ); Sat, 24 Jul 2010 12:16:34 -0400 Received: by vws3 with SMTP id 3so1242637vws.19 for ; Sat, 24 Jul 2010 09:16:33 -0700 (PDT) Received: by 10.220.59.202 with SMTP id m10mr2760978vch.163.1279988193068; Sat, 24 Jul 2010 09:16:33 -0700 (PDT) Received: from localhost (207-172-165-101.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com [207.172.165.101]) by mx.google.com with ESMTPS id d19sm409189vcs.25.2010.07.24.09.16.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Jul 2010 09:16:32 -0700 (PDT) Date: Sat, 24 Jul 2010 12:16:30 -0400 From: "Kevin O'Connor" To: Mohammed Gamal Cc: kvm@vger.kernel.org, seabios@seabios.org Subject: Re: [RFC PATCH v3 0/3] Add segment limit checks to emulator Message-ID: <20100724161630.GA15361@morn.localdomain> References: <1278888970-2936-1-git-send-email-m.gamal005@gmail.com> <4C3AB59B.60705@redhat.com> <4C3B14E2.8050404@redhat.com> <20100724154522.GA13246@morn.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100724154522.GA13246@morn.localdomain> User-Agent: Mutt/1.5.20 (2009-12-10) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 24 Jul 2010 16:16:37 +0000 (UTC) diff --git a/src/misc.c b/src/misc.c index 354df87..108c332 100644 --- a/src/misc.c +++ b/src/misc.c @@ -156,8 +156,8 @@ u64 rombios32_gdt[] VAR16VISIBLE __aligned(8) = { GDT_LIMIT(BUILD_BIOS_SIZE-1) | GDT_CODE | GDT_BASE(BUILD_BIOS_ADDR), // 16 bit data segment base=0x0 limit=0xffff (SEG32_MODE16_DS) GDT_LIMIT(0x0ffff) | GDT_DATA, - // 16 bit code segment base=0 limit=0xffffffff (SEG32_MODE16BIG_CS) - GDT_LIMIT(0xfffff) | GDT_CODE | GDT_G, + // 16 bit code segment base=0xf0000 limit=0xffffffff (SEG32_MODE16BIG_CS) + GDT_LIMIT(0xfffff) | GDT_CODE | GDT_G | GDT_BASE(BUILD_BIOS_ADDR), // 16 bit data segment base=0 limit=0xffffffff (SEG32_MODE16BIG_DS) GDT_LIMIT(0xfffff) | GDT_DATA | GDT_G, }; diff --git a/src/romlayout.S b/src/romlayout.S index 54e5a4d..a469596 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -105,7 +105,7 @@ transition16big: movw %ax, %fs movw %ax, %gs - ljmpl $SEG32_MODE16BIG_CS, $(BUILD_BIOS_ADDR + 1f) + ljmpw $SEG32_MODE16BIG_CS, $1f .code16gcc 1: