Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 364E5C10F1B for ; Tue, 27 Dec 2022 06:49:07 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1pA3lY-0006NV-2q; Tue, 27 Dec 2022 01:48:48 -0500 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (Exim 4.96) (envelope-from ) id 1pA3lV-0006KK-17 for kernelnewbies@kernelnewbies.org; Tue, 27 Dec 2022 01:48:46 -0500 Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 27 Dec 2022 15:48:34 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send001-relay.gov-dooray.com with SMTP id a3d58bea63aa9542; Tue, 27 Dec 2022 15:48:34 +0900 DKIM-Signature: a=rsa-sha256; b=qpwUUShjLwehwGwYMH7FGbT3NAQOENKwVGK+qyDDi8wxcqbOL4eZLE8hQ8nqaQVEhokFklGr6s v/sTjBrSTVXDqsXV1N8XtsUB9RSYftI3PJCYrDYhV/p3mS4eJg2NkIbB01aQJA/nHPcxWfXYjhEm NkCxG3oST0WXKrlnkNw9d2Av74VqYwnUzIhKherioUynpWTqsFE9+pR5VSlfQFHCgot6TqEdiSIa 00h/QA4dTuLkO1ND1JoMjbYHsGpHpRWotxJLiB4X63/KtT2P1n5aYd0vOuQT5zJ8AKZIUcx5cA3W d7E5BNtoFptSQsARx9Og0uoQsOzPDLsyle9yaLyg==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=NWJUPXYlolxbjVS5RH8La3FR/dIdR+Qj8X4iCGciYmU=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id ac88c72263aa9542; Tue, 27 Dec 2022 15:48:34 +0900 From: "Chan Kim" To: 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 Message-ID: <0bad01d919bf$3caa4520$b5fecf60$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AdkZvkB1w57KF4k3TVm4lWO9xQvBtA== X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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