From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BE3C581D36 for ; Wed, 2 Nov 2016 15:31:10 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 02 Nov 2016 15:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,436,1473145200"; d="scan'208";a="27097753" Received: from lthomas5-mobl2.amr.corp.intel.com (HELO localhost) ([10.252.143.202]) by orsmga004.jf.intel.com with ESMTP; 02 Nov 2016 15:31:12 -0700 MIME-Version: 1.0 To: =?utf-8?q?Marvin_H=C3=A4user?= , "edk2-devel@lists.01.org" Message-ID: <147812587193.13829.15857238630348474715@jljusten-ivb> From: Jordan Justen In-Reply-To: Cc: "lersek@redhat.com" References: User-Agent: alot/0.3.7 Date: Wed, 02 Nov 2016 15:31:11 -0700 Subject: Re: [PATCH v1 1/1] OvmfPkg/ResetVector: Depend on PCD values of the page tables. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 22:31:10 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The "v1 1/1" isn't needed in the subject. For the first version of a single patch series, I would expect to just see [PATCH]. (Obviously this is not too important.) Email headers seem to indicate that you aren't using git send-email. This will cause troubles if someday you have a multi-patch series. On 2016-11-02 11:00:34, Marvin H=C3=A4user wrote: > = > diff --git a/OvmfPkg/ResetVector/Ia32/PageTables64.asm b/OvmfPkg/ResetVec= tor/Ia32/PageTables64.asm > = > ; > ; Top level Page Directory Pointers (1 * 512GB entry) > ; > - mov dword[0x800000], 0x801000 + PAGE_PDP_ATTR > + mov dword[OVMF_SEC_PAGE_TABLES_BASE], OVMF_SEC_PAGE_TABLES_BASE = + 0x1000 + PAGE_PDP_ATTR > = > ; > ; Next level Page Directory Pointers (4 * 1GB entries =3D> 4GB) > ; > - mov dword[0x801000], 0x802000 + PAGE_PDP_ATTR > - mov dword[0x801008], 0x803000 + PAGE_PDP_ATTR > - mov dword[0x801010], 0x804000 + PAGE_PDP_ATTR > - mov dword[0x801018], 0x805000 + PAGE_PDP_ATTR > + mov dword[OVMF_SEC_PAGE_TABLES_BASE + 0x1000], OVMF_SEC_PAGE_TAB= LES_BASE + 0x2000 + PAGE_PDP_ATTR > + mov dword[OVMF_SEC_PAGE_TABLES_BASE + 0x1008], OVMF_SEC_PAGE_TAB= LES_BASE + 0x3000 + PAGE_PDP_ATTR > + mov dword[OVMF_SEC_PAGE_TABLES_BASE + 0x1010], OVMF_SEC_PAGE_TAB= LES_BASE + 0x4000 + PAGE_PDP_ATTR > + mov dword[OVMF_SEC_PAGE_TABLES_BASE + 0x1018], OVMF_SEC_PAGE_TAB= LES_BASE + 0x5000 + PAGE_PDP_ATTR These line are too long. I guess you can use '\' at the end of a line to continue it, or maybe add a PT_ADDR() macro that adds in OVMF_SEC_PAGE_TABLES_BASE. > diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb b/OvmfPkg/ResetVector/= ResetVector.nasmb > index 31ac06a..b47f647 100644 > --- a/OvmfPkg/ResetVector/ResetVector.nasmb > +++ b/OvmfPkg/ResetVector/ResetVector.nasmb > @@ -53,6 +53,12 @@ > %include "Ia32/SearchForSecEntry.asm" > = > %ifdef ARCH_X64 > + %ifndef OVMF_SEC_PAGE_TABLES_BASE > + #include > + %define OVMF_SEC_PAGE_TABLES_BASE FixedPcdGet32 (PcdOvmfSecPageTable= sBase) > + %define OVMF_SEC_PAGE_TABLES_SIZE FixedPcdGet32 (PcdOvmfSecPageTable= sSize) > + %endif > + > %include "Ia32/Flat32ToFlat64.asm" > %include "Ia32/PageTables64.asm" > %endif > diff --git a/OvmfPkg/ResetVector/ResetVectorCode.asm b/OvmfPkg/ResetVecto= r/ResetVectorCode.asm > index 052c821..5b49387 100644 > --- a/OvmfPkg/ResetVector/ResetVectorCode.asm > +++ b/OvmfPkg/ResetVector/ResetVectorCode.asm > @@ -40,6 +40,15 @@ > %include "Ia32/SearchForSecEntry.asm" > = > %ifdef ARCH_X64 > + %ifndef OVMF_SEC_PAGE_TABLES_BASE > + ; > + ; This range should match with PcdOvmfSecPageTablesBase and > + ; PcdOvmfSecPageTablesSize which are declared in the FDF files. > + ; > + %define OVMF_SEC_PAGE_TABLES_BASE 0x800000 > + %define OVMF_SEC_PAGE_TABLES_SIZE 6 * 0x1000 I thought we were using the PCDs? -Jordan