Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753413AbbKXPs0 (ORCPT ); Tue, 24 Nov 2015 10:48:26 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33006 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753314AbbKXPsY (ORCPT ); Tue, 24 Nov 2015 10:48:24 -0500 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 24 Nov 2015 15:48:24 +0000 Message-ID: Subject: Re: read physical address space From: alan hopes To: yalin wang Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 898 Lines: 25 Thanks Yalin. Yeah, got it.. So, it means I can't directly access physical address, its only the responsibility of MMU to access it. Even if I have a physical address, I need to convert it to kernel virtual address to access it to maintain consistency with other general user-mode memory access operation. Thanks Alan. On Tue, Nov 17, 2015 at 4:28 PM, yalin wang wrote: > you should access it like this: > printk ( *(int*)kmap(pays_to_page(pays_addr))); > > pays address must be mapped into virtual address before access it . >> On Nov 17, 2015, at 23:21, alan hopes wrote: >> >> phys_addr > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/