From: Jian J Wang <jian.j.wang@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiewen Yao <jiewen.yao@intel.com>,
Star Zeng <star.zeng@intel.com>, Eric Dong <eric.dong@intel.com>,
Ruiyu Ni <ruiyu.ni@intel.com>
Subject: [PATCH v2 2/4] MdeModulePkg/PageTablePool.h: Page table pool GUID definition file
Date: Mon, 4 Dec 2017 16:35:54 +0800 [thread overview]
Message-ID: <20171204083556.19416-3-jian.j.wang@intel.com> (raw)
In-Reply-To: <20171204083556.19416-1-jian.j.wang@intel.com>
> 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 <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
---
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.<BR>
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+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
next prev parent reply other threads:[~2017-12-04 8:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 8:35 [PATCH v2 0/4] Enable page table write protection Jian J Wang
2017-12-04 8:35 ` [PATCH v2 1/4] MdeModulePkg/MdeModulePkg.dec: Add new PCDs and Guid Jian J Wang
2017-12-04 8:35 ` Jian J Wang [this message]
2017-12-04 8:35 ` [PATCH v2 3/4] MdeModulePkg/DxeIpl: Mark page table as read-only Jian J Wang
2017-12-04 8:35 ` [PATCH v2 4/4] UefiCpuPkg/CpuDxe: Enable protection for newly added page table Jian J Wang
2017-12-04 9:11 ` [PATCH v2 0/4] Enable page table write protection Zeng, Star
2017-12-04 9:26 ` Wang, Jian J
2017-12-05 2:26 ` Yao, Jiewen
2017-12-05 6:26 ` Wang, Jian J
2017-12-05 2:31 ` Yao, Jiewen
2017-12-05 6:41 ` Wang, Jian J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171204083556.19416-3-jian.j.wang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox