From owner-freebsd-ports-bugs@freebsd.org Thu Mar 7 18:43:10 2019 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDDAF1510DC9 for ; Thu, 7 Mar 2019 18:43:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3A76CF8A for ; Thu, 7 Mar 2019 18:43:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 4243E1510DC8; Thu, 7 Mar 2019 18:43:09 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E3E11510DC7 for ; Thu, 7 Mar 2019 18:43:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 947066CF89 for ; Thu, 7 Mar 2019 18:43:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id DAC0417BBD for ; Thu, 7 Mar 2019 18:43:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x27Ih7k8064681 for ; Thu, 7 Mar 2019 18:43:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x27Ih76j064680 for ports-bugs@FreeBSD.org; Thu, 7 Mar 2019 18:43:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 236373] mmio doesn't work on mmio Date: Thu, 07 Mar 2019 18:43:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ralfpeg@hotmail.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 18:43:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236373 Bug ID: 236373 Summary: mmio doesn't work on mmio Product: Ports & Packages Version: Latest Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: ralfpeg@hotmail.de this test program should set all gpio pins to high level. it does, with different memory address, on raspbian. i guess there's something wrong with= the port. #include #include #include #include #include #include int main() { volatile void *gpfs0; //general purpose function select 0 int memfd; volatile uint32_t *gpfsr0; //general purpose function select regist= er volatile uint32_t *gposr0; //general purpose output set register volatile uint32_t *gpocr0; //general purpose output clear register //open fd to physical memory memfd =3D open("/dev/mem", O_RDWR|O_SYNC); if(memfd =3D=3D -1) { printf("error opening /dev/mem\n"); return 1; } //mapping into memory gpfs0 =3D mmap(NULL, sysconf(_SC_PAGE_SIZE), PROT_READ | PROT_WRITE, MAP_SHARED, memfd, 0x7e200000); if(gpfs0 =3D=3D MAP_FAILED) { printf("map failed: %d\n", errno); return 1; }=20=20=20=20=20=20=20 gpfsr0 =3D gpfs0; //GPIO Function select 0=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 gposr0 =3D gpfs0 + 0x1c; //GPIO Output Set 0 //gposr1 =3D gpfs0 + 32; //GPIO Output Set 0 gpocr0 =3D gpfs0 + 0x28; //GPIO Output Clear 0 // gpocr1 =3D gpfs0 + 44; //GPIO Output Clear 0 *gpfsr0 =3D 0111111111; *gposr0 =3D 0xffffffff; munmap((void *) gpfs0, sysconf(_SC_PAGE_SIZE)); //printf("%ld\n", sysconf(_SC_PAGE_SIZE)); printf("finish\n"); return 0; } --=20 You are receiving this mail because: You are the assignee for the bug.=