public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tomas Pilar (tpilar)" <tpilar@solarflare.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Hiding physical memory from OS and VT-d/IOMMU
Date: Fri, 3 Mar 2017 16:32:53 +0000	[thread overview]
Message-ID: <08cbd2c5-5d7e-bdc7-cf74-e5c48edf86c0@solarflare.com> (raw)

Hi,


I am trying to implement a message-box communication protocol between
PCIe devices in the same host without the assistance of the OS. For
irreducible reasons, I can't use PCIe endpoint-to-endpoint communication
so I thought I could create a DMA based message-box protocol where in
UEFI driver probe (during DXE) I blot out some physical memory (by
leaking a page of memory allocated as EfiRuntimeServicesData) that the
devices will then use to communicate even when the OS loads.


This runs into a problem when VT-d/IOMMU is involved because it still
stops the device from DMA into that page, even though the OS shouldn't
touch the page as it's been allocated using EfiRuntimeServicesData.


So my query is: Can I achieve this by allocating the box as a different
memory type (such as EfiUnusableMemory or EfiReservedMemoryType) and if
not, what would be a better way of doing this?


Cheers,

Tom

The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.


             reply	other threads:[~2017-03-03 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 16:32 Tomas Pilar (tpilar) [this message]
2017-03-03 17:06 ` Hiding physical memory from OS and VT-d/IOMMU Andrew Fish
2017-03-03 18:03   ` Tomas Pilar (tpilar)

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=08cbd2c5-5d7e-bdc7-cf74-e5c48edf86c0@solarflare.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