public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] introduce MAX_ALLOC_ADDRESS to limit boot time allocations
@ 2018-12-07 11:22 Ard Biesheuvel
  2018-12-07 11:22 ` [RFC PATCH 1/7] MdePkg/Base: introduce MAX_ALLOC_ADDRESS Ard Biesheuvel
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2018-12-07 11:22 UTC (permalink / raw)
  To: edk2-devel
  Cc: Ard Biesheuvel, Michael D Kinney, Liming Gao, Jian J Wang, Hao Wu,
	Leif Lindholm, Laszlo Ersek, Eric Auger, Andrew Jones,
	Philippe Mathieu-Daude

Since modifying MAX_ADDRESS to limit the memory used at boot time has
turned out to be intractible, this series proposes another approach to do
the same, by introducing MAX_ALLOC_ADDRESS for firmware internal use.

I tested these patches with ArmVirtQemu in the following way:
- limit MAX_ALLOC_ADDRESS to 0xFFFFFFFF (4 GB)
- build QEMU_EFI.fd
- run it under mach-virt with 4 GB of DRAM and highmem=off

This runs as expected, and produces a memory map ending in the following
lines

BS_Data    00000000FFFFD000-00000000FFFFFFFF 0000000000000003 0000000000000008
Available  0000000100000000-000000013FFFFFFF 0000000000040000 0000000000000008

which proves that the memory above the limit is recorded and reported by
the OS, but left untouched by the firmware memory allocation routines.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>
Cc: Philippe Mathieu-Daude <philmd@redhat.com>

Ard Biesheuvel (7):
  MdePkg/Base: introduce MAX_ALLOC_ADDRESS
  MdeModulePkg/Dxe/Gcd: disregard memory above MAX_ALLOC_ADDRESS
  MdeModulePkg/Dxe/Page: take MAX_ALLOC_ADDRESS into account
  ArmPkg/ArmMmuLib: take MAX_ALLOC_ADDRESS into account
  ArmPlatformPkg/MemoryInitPeim: take MAX_ALLOC_ADDRESS into account
  ArmVirtPkg/MemoryInitPeiLib: split memory HOB based on
    MAX_ALLOC_ADDRESS
  MdePkg/ProcessorBind AARCH64: limit MAX_ALLOC_ADDRESS to 48 bits

 MdePkg/Include/AArch64/ProcessorBind.h        |  5 ++
 MdePkg/Include/Base.h                         |  4 ++
 .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |  2 +-
 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c |  4 +-
 .../ArmVirtMemoryInitPeiLib.c                 |  8 +--
 MdeModulePkg/Core/Dxe/Gcd/Gcd.c               |  8 +--
 MdeModulePkg/Core/Dxe/Mem/Page.c              | 52 +++++++++----------
 7 files changed, 46 insertions(+), 37 deletions(-)

-- 
2.19.2



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-12-10 14:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 11:22 [RFC PATCH 0/7] introduce MAX_ALLOC_ADDRESS to limit boot time allocations Ard Biesheuvel
2018-12-07 11:22 ` [RFC PATCH 1/7] MdePkg/Base: introduce MAX_ALLOC_ADDRESS Ard Biesheuvel
2018-12-07 12:53   ` Laszlo Ersek
2018-12-07 11:22 ` [RFC PATCH 2/7] MdeModulePkg/Dxe/Gcd: disregard memory above MAX_ALLOC_ADDRESS Ard Biesheuvel
2018-12-07 11:23 ` [RFC PATCH 3/7] MdeModulePkg/Dxe/Page: take MAX_ALLOC_ADDRESS into account Ard Biesheuvel
2018-12-10  2:04   ` Wang, Jian J
2018-12-10  7:22     ` Ard Biesheuvel
2018-12-10 14:52       ` Gao, Liming
2018-12-10 14:53         ` Ard Biesheuvel
2018-12-10 14:57           ` Gao, Liming
2018-12-07 11:23 ` [RFC PATCH 4/7] ArmPkg/ArmMmuLib: " Ard Biesheuvel
2018-12-07 12:42   ` Laszlo Ersek
2018-12-07 11:23 ` [RFC PATCH 5/7] ArmPlatformPkg/MemoryInitPeim: " Ard Biesheuvel
2018-12-07 12:46   ` Laszlo Ersek
2018-12-07 12:47     ` Ard Biesheuvel
2018-12-07 12:48       ` Ard Biesheuvel
2018-12-07 11:23 ` [RFC PATCH 6/7] ArmVirtPkg/MemoryInitPeiLib: split memory HOB based on MAX_ALLOC_ADDRESS Ard Biesheuvel
2018-12-07 12:47   ` Laszlo Ersek
2018-12-07 11:23 ` [RFC PATCH 7/7] MdePkg/ProcessorBind AARCH64: limit MAX_ALLOC_ADDRESS to 48 bits Ard Biesheuvel
2018-12-07 12:51   ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox