From: "Chan Kim" <ckim@etri.re.kr>
To: <kernelnewbies@kernelnewbies.org>
Subject: Meaning of 'no-map' in reserved-memory, and accessing a memory region from two OSes using physical adderss
Date: Tue, 27 Dec 2022 15:48:32 +0900 [thread overview]
Message-ID: <0bad01d919bf$3caa4520$b5fecf60$@etri.re.kr> (raw)
Hello all,
In the device tree, I have declared a reserved-memory node and a child node
inside it.
And I have put 'no-map' property to that reserved memory and a device node
uses that reserved memory.
But in the driver for the device, when I use the memremap'ed virtual
address, the read/write runs ok.
But using physical memory, it crashes.
I thought with 'no-map' property, I could just use the physical address but
it turned out I can't.
The document on reserved-memory says this about the 'no-map' property.
(in Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt)
no-map (optional) - empty property
- Indicates the operating system must not create a virtual mapping
of the region as part of its standard mapping of system memory,
nor permit speculative access to it under any circumstances other
than under the control of the device driver using the region.
I can't understand what 'the OS must not create a virtual mapping of the
region as part of its standard mapping of system memory'.
Any reserved-memory is excluded from the usage of OS, then, what does this
'no-map' mean?
The memremap function just ran without error and I could use the region with
returned virtual address.
The thing I want to do is accessing the memory region with physical address,
and I hope another OS which connects to our board using PCIe link (our side
is endpoint) can also access the region with the PCIe mapped physical
address (by itself declaring the region as reserved-memory). Is this kind
things impossible?
Thank you for reading
Best regards,
Chan Kim
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
reply other threads:[~2022-12-27 6:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-all 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='0bad01d919bf$3caa4520$b5fecf60$@etri.re.kr' \
--to=ckim@etri.re.kr \
--cc=kernelnewbies@kernelnewbies.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).