linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ACPI flow for reserved memory
@ 2022-03-03 11:07 Bharat Kumar Gogada
  2022-03-04 17:14 ` Sudeep Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Bharat Kumar Gogada @ 2022-03-03 11:07 UTC (permalink / raw)
  To: linux-acpi; +Cc: linux-kernel

Hi All,

In device tree we have several ways to 
reserve memory (https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt).   

Can anyone please help equivalent flow for ACPI.

Regards,
Bharat

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

* Re: ACPI flow for reserved memory
  2022-03-03 11:07 ACPI flow for reserved memory Bharat Kumar Gogada
@ 2022-03-04 17:14 ` Sudeep Holla
  2022-03-07 17:49   ` Sami Mujawar
  0 siblings, 1 reply; 3+ messages in thread
From: Sudeep Holla @ 2022-03-04 17:14 UTC (permalink / raw)
  To: Bharat Kumar Gogada; +Cc: linux-acpi, Sudeep Holla, Sami Mujawar, linux-kernel

Hi Bharat,

I am not UEFI expert but I was sure there would be some options for this.
Checking with Sami(cc-ed), confirmed the same.

On Thu, Mar 03, 2022 at 11:07:54AM +0000, Bharat Kumar Gogada wrote:
> Hi All,
> 
> In device tree we have several ways to 
> reserve memory (https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt).   
> 
> Can anyone please help equivalent flow for ACPI.

@Sami, please share any details you may have.

-- 
Regards,
Sudeep

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

* Re: ACPI flow for reserved memory
  2022-03-04 17:14 ` Sudeep Holla
@ 2022-03-07 17:49   ` Sami Mujawar
  0 siblings, 0 replies; 3+ messages in thread
From: Sami Mujawar @ 2022-03-07 17:49 UTC (permalink / raw)
  To: Sudeep Holla, Bharat Kumar Gogada; +Cc: linux-acpi, linux-kernel, nd

Hi Bharat,

The UEFI specification version 2.9, section 7.2 Memory Allocation Services, EFI_BOOT_SERVICES.GetMemoryMap(), page 172 states the following:
"... Regions that are backed by physical hardware, but are not supposed to be accessed by the OS, must be returned as EfiReservedMemoryType. ..."

This can be achieved by adding the memory region as Reserved Memory in the firmware. 
Example:

Status = gDS->AddMemorySpace (
                             EfiGcdMemoryTypeReserved,
                             ReservedMemBase,
                             ReservedMemSize,
                            EFI_MEMORY_UC
                            );
  if (EFI_ERROR (Status)) {
    DEBUG ((
      DEBUG_ERROR,
      "Failed to add memory space. Status = %r\n",
      Status
      ));
    return Status;
  }

Hope this helps. Please let me know if you have any further queries.

Regards,

Sami Mujawar

On 04/03/2022, 17:14, "Sudeep Holla" <sudeep.holla@arm.com> wrote:

    Hi Bharat,

    I am not UEFI expert but I was sure there would be some options for this.
    Checking with Sami(cc-ed), confirmed the same.

    On Thu, Mar 03, 2022 at 11:07:54AM +0000, Bharat Kumar Gogada wrote:
    > Hi All,
    > 
    > In device tree we have several ways to 
    > reserve memory (https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt).   
    > 
    > Can anyone please help equivalent flow for ACPI.

    @Sami, please share any details you may have.

    -- 
    Regards,
    Sudeep


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

end of thread, other threads:[~2022-03-07 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 11:07 ACPI flow for reserved memory Bharat Kumar Gogada
2022-03-04 17:14 ` Sudeep Holla
2022-03-07 17:49   ` Sami Mujawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).