From owner-freebsd-arm@FreeBSD.ORG Mon Mar 16 21:45:23 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BEE368A for ; Mon, 16 Mar 2015 21:45:23 +0000 (UTC) Received: from nm4-vm3.bullet.mail.gq1.yahoo.com (nm4-vm3.bullet.mail.gq1.yahoo.com [98.136.218.162]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21C30C3D for ; Mon, 16 Mar 2015 21:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s2048; t=1426542126; bh=6aRHd53Kv9RE0v/WW0KSuTbTLJ+I0ibSlMJlwMRVzhg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=SVraERawhfpv+3uPsGO6LQB1R/3LhNV6KblsZSZoCKXTqawHZOjS5NyN4WcAEkjaAk69V+/bOuAbKdBVOuZfU0SLzIChI7sWUkMucI21/rJks8231FFX04JLrugZTNPKH/jkx+BLY/f1or9iPfYqYtja/tZabCAXHS6GlhzQh65UHYlkBUq9iiYvJfM3qDl8adz+tt8Ve9hrtH7lsVdS8wJ2IABNgNlrY4z5eWZEEk9En519Egtpi6IlW3QEvDWm8lRUCllm2wdNtvNRL9r6MfKpDYYJUmc+TxXe2IZ5k2xfzXjFbnHSj+8Rxun4FASyW/lLeKSk7qSRDBlFNaHeGQ== Received: from [98.137.12.56] by nm4.bullet.mail.gq1.yahoo.com with NNFMP; 16 Mar 2015 21:42:06 -0000 Received: from [98.138.104.116] by tm1.bullet.mail.gq1.yahoo.com with NNFMP; 16 Mar 2015 21:42:06 -0000 Received: from [127.0.0.1] by smtp225.mail.ne1.yahoo.com with NNFMP; 16 Mar 2015 21:42:06 -0000 X-Yahoo-Newman-Id: 637543.92508.bm@smtp225.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: omEwP7YVM1kv_9DZyIsAV5rWUUSVXxNmS7TWRhNsOsHXLm7 EvvY3KzQSAoYytISr2FnhP43r4XtNwhFuDS3Jq2W3vdKTolPD7It8rcRF4Gw yhKP6j0WqFIKxVA_HqzPXwz2ozVgw1BLFyceevFGKRwt1V9d5p4wkALHfC58 sFSZCHh7nJ9aO2uzxhb159dyaDm66Fep8Q7dCgX7zuOAKBrJ3eTo6rblcTAx kpnD8Uxvk3r0MmojnnKj1Vm5MTPO_7Yogulz36bxJgpcHSlIQgDJsrANi7_a O8TV.OB39hl7heP8eL_geW6hH6_1u2DveERb9DDOqM6x5ztPrtEbIw.jhayv iHqdd2xCP3RQNZMLLpB8IjyHhgaAjISYwZXszIGD_WHKss6bltuR23sLDime 24K4U05SmXuu_b3QAVB58.F1uLkjnY5xR9fUjcsY_HhtqLkWEUOeT5rlcUFT 5p7PDCFaTFLAJV5PUlkrAiCU_M0K3fSoqEjhCv9s3gR0.scmSABOJd2J4Mg5 o4_0nrWbDNNUdIIMZ3nrxsor3S_Uz7gGl59aMSIJIA.25StiXYJhd3g-- X-Yahoo-SMTP: tUxoRneswBA21azLM.3ybMESf0mC2bFhTbmt0VU5ervH0kqi5lo- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: hexdumping /dev/mem From: Thomas Skibo In-Reply-To: Date: Mon, 16 Mar 2015 14:42:04 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <29227F8C-4A83-4C95-9CD2-BA14E797A882@sbcglobal.net> References: To: =?utf-8?Q?Mat=C3=ADas_Perret_Cantoni?= X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2015 21:45:23 -0000 > On Mar 16, 2015, at 1:00 PM, Mat=C3=ADas Perret Cantoni = wrote: >=20 > Hello! >=20 > I'm trying to read a 32 bit register of the System Level Control > Registers of the ZedBoard (Zynq-7000 SoC) from a running FreeBSD. I > thought that I could simply do it with hexdump(1) to avoid writing a > driver since I only need to read it once. I've tried: >=20 >=20 > #hexdump -s 0xF8000910 -n 4 /dev/mem >=20 >=20 > and I get this message: >=20 > hexdump: /dev/mem: Invalid argument >=20 >=20 > Reading some archives in this mailing list I've found that "the arm > version of /dev/mem is not functionally equivalent to that of amd64 or > i386. Arm disallows access to non-DRAM addresses through /dev/mem=E2=80= =9D. That=E2=80=99s correct. /dev/mem only reads from memory not devices. I always use kdb to peek/dump registers. You have to translate the = device addresses (use =E2=80=9Cshow devmap=E2=80=9D to see the = mappings). But, once you know the kernel virtual addresses of the registers, you = might be able to hexdump them through /dev/kmem. (I don=E2=80=99t have = a Zedboard in front of me to try that.) >=20 > Is there any other way of doing this? Maybe the whole idea of using > hexdump for this isn't really good. >=20 >=20 >=20 > Thanks in advance. > Regards, > Matias. > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" ------- Thomas Skibo thomasskibo@sbcglobal.net