From owner-freebsd-current@freebsd.org Tue Apr 5 00:58:47 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F344DB01C56 for ; Tue, 5 Apr 2016 00:58:47 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD925156C; Tue, 5 Apr 2016 00:58:47 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-ig0-x233.google.com with SMTP id kb1so8126630igb.0; Mon, 04 Apr 2016 17:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=9fFGQl36PdBksJO2b9RlKtESnhmQrRe/OIJbmJ8u93g=; b=ytF8TsCHu8nTQszEUVD20g8cHkdEQHYtBI3IgNsKuNt08vosjkv2TeNzC5tHyxoO5p G1dJUZa14gFtoBuMM6jHQdnxl5/GJG8ymoahamxfsxScnOgMUQRxbXNhlU7IFuJjT8bI ZPPTZs1Fjoes4ClwKzPF1BQFw9NaVvsY4ogNSFSjA5us5vBWPVQ4wtsKWAl3UMHEeSV7 rRApdA7UsAQCcgruSitsoWVMPOfS0Hmopn6bLkytIlePFEvn0H32dfYcuueHz5XJhh1M Y30OVJJ3tozQIs/4VNAgBV75WfyBV1+70/dNwqGl/BrAlOKNefk8EufpJpprkddp+AuB Y/eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=9fFGQl36PdBksJO2b9RlKtESnhmQrRe/OIJbmJ8u93g=; b=k3X36ZzGJvYUnD5qvfx6CrxABLVjp/ZBzrdla+MkRbBG2bL+p12O0D4gdh/0UcO99p jmFcrgRUV4+LXvXcomMl7Qh13NU/fhSIjkbk7t+o3dhEfyvwIsfGvW/OMiB0Nrm2k46o 7JIgmPr1ZxR5GNtacaxfTanOCbGmLf8hQSsaE2i54aDtLuvXnJcF20Pe0XHCSXV3S0MD DbT9M4TnglC6wDQY/Um8ETnKvJ+fUg/a71/m4Gfwfh8Byci8lSYoonGX24olQNHoF010 gvSvPo2teCLCa5/EEK5V+vdwf9lQJA5C/vz/b42lFNuk120pj6nR4j1yP3yRuWjp0kLr inJg== X-Gm-Message-State: AD7BkJI5/9MabqX+6B2/auI8Rmd+s/ezNV2r5CanZeMjli2V9vm49SFbA/hhwxLasCfBALpKaNWzBnkUBs4ywQ== MIME-Version: 1.0 X-Received: by 10.50.66.132 with SMTP id f4mr6242951igt.83.1459817927125; Mon, 04 Apr 2016 17:58:47 -0700 (PDT) Received: by 10.107.153.206 with HTTP; Mon, 4 Apr 2016 17:58:47 -0700 (PDT) In-Reply-To: <9376230.YZMFsgSvTf@ralph.baldwin.cx> References: <20160401170458.GV1741@kib.kiev.ua> <9376230.YZMFsgSvTf@ralph.baldwin.cx> Date: Mon, 4 Apr 2016 20:58:47 -0400 Message-ID: Subject: Re: accessing a PCIe register from userspace through kmem or other ways ? From: Ryan Stone To: John Baldwin Cc: FreeBSD Current , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2016 00:58:48 -0000 On Mon, Apr 4, 2016 at 6:45 PM, John Baldwin wrote: > I suspect Ryan might be referring to BARs outside of the DMAP which we > only populate to Maxmem IIRC. /dev/mem should work for those. > Unfortunately I no longer have access to the systems so I can't really confirm. I had a debug tool that attempted to read PCI device registers through /dev/mem, and on these systems (which were running a 8.2 derivative) the reads from /dev/mem failed with some kind of error. The one detail that I do remember is that the errors started happening after we enabled the use of 64-bit BARs in the BIOS and the addresses assigned to the BARs were quite large -- I believe well beyond the bounds of real memory.