From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 92322220EE08A for ; Mon, 4 Dec 2017 00:31:33 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 00:36:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,358,1508828400"; d="scan'208";a="10201629" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.42]) by fmsmga001.fm.intel.com with ESMTP; 04 Dec 2017 00:36:02 -0800 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Jiewen Yao , Star Zeng , Eric Dong , Ruiyu Ni Date: Mon, 4 Dec 2017 16:35:54 +0800 Message-Id: <20171204083556.19416-3-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20171204083556.19416-1-jian.j.wang@intel.com> References: <20171204083556.19416-1-jian.j.wang@intel.com> Subject: [PATCH v2 2/4] MdeModulePkg/PageTablePool.h: Page table pool GUID definition file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 08:31:33 -0000 > v2: > newly added This file is added to definition of gPageTablePoolGuid. In addition, following structure type is defined to describe the page table pool information which can be used by different drivers to allocate memory for new page tables. It's supposed to be at the start address of each separated pool. The NextPool field is used to link all the pools together which helps to track and manage all the page tables easily. typedef struct { EFI_GUID Signature; EFI_PHYSICAL_ADDRESS NextPool; UINT64 Offset; UINT64 FreePages; } PAGE_TABLE_POOL_HEADER; Cc: Jiewen Yao Cc: Star Zeng Cc: Eric Dong Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Include/Guid/PageTablePool.h | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 MdeModulePkg/Include/Guid/PageTablePool.h diff --git a/MdeModulePkg/Include/Guid/PageTablePool.h b/MdeModulePkg/Include/Guid/PageTablePool.h new file mode 100644 index 0000000000..103739a9db --- /dev/null +++ b/MdeModulePkg/Include/Guid/PageTablePool.h @@ -0,0 +1,53 @@ +/** @file + GUID used to identify the memory pool used for page table. + +Copyright (c) 2017, Intel Corporation. All rights reserved.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __PAGE_TABLE_POOL_H__ +#define __PAGE_TABLE_POOL_H__ + +/// +/// GUID value used to identify page table pool. +/// +/// [18347A49-F48B-4012-671D-7023765C92AD] +/// +#define PAGE_TABLE_POOL_GUID \ + { \ + 0x18347A49, 0xF48B, 0x4012, {0x67, 0x1D, 0x70, 0x23, 0x76, 0x5C, 0x92, 0xAD} \ + } + +/// +/// A structure at the header of first page in each page table pool. +/// +typedef struct { + /// + /// Signature used to identify the memory pool used for page table. + /// + EFI_GUID Signature; + /// + /// The address pointing to the header of next page table pool. + /// + EFI_PHYSICAL_ADDRESS NextPool; + /// + /// The offset (in bytes) of free pages in current pool. + /// + UINT64 Offset; + /// + /// The number of free pages. + /// + UINT64 FreePages; +} PAGE_TABLE_POOL_HEADER; + +extern EFI_GUID gPageTablePoolGuid; + +#endif //__PAGE_TABLE_POOL_H__ -- 2.14.1.windows.1