From owner-freebsd-mips@freebsd.org Tue Apr 26 16:40:13 2016 Return-Path: Delivered-To: freebsd-mips@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 10592B1C3AF for ; Tue, 26 Apr 2016 16:40:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 CF604141E for ; Tue, 26 Apr 2016 16:40:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x22a.google.com with SMTP id g8so20811777igr.0 for ; Tue, 26 Apr 2016 09:40:12 -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=i0yyHAM4o7lNqd1f2xzwhoMIx+cHEGMq9/JJza8Hpf4=; b=WE2FkNVfHNBs71Rw0/WSTLleOCpSXGeKDEyQZg+Lim2AlCWpt7zujROYkPad8fgrg4 eFyN6yCbL109dTFnhcY3MKNBVVew/vsykKQ6thKLk6KrEQjz8Wxe6g2QA33R9CGKWtY4 R5pprJQvQmZOh/6vHLAbiVF/W3aAqElw+MYCtQJ9zG9qabQxEFAk2WH52PhxSKHx+CZr IgGyEhJWIXnBctGWNSBeTzAWz+h+dCGGvflZ9LoRtyxuUp698Lm3qHm66WJpIhs8hmeK kXtbHG/GyRF9N+v9Fu8tjIp/989KcLHgkeuIIRXdezHkvLikGHoSL7G4AkcsyxY9Azqs d8Ew== 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=i0yyHAM4o7lNqd1f2xzwhoMIx+cHEGMq9/JJza8Hpf4=; b=Xkd+uBr51GGgPaXY98JMDfUJ/3peRJUQWMxFugAH7oPGfu7c5/Q28tcPuhD/JmGSk1 ebIGTBhv70+hPuyEudZQbJqSFQaQpujny3R4U0ThBpAt052/RmmA69j1agkGZ0Ub8AXF Lx192qrgImoR2fxAhnF3lPz81aWZvP3DXpyKPk7IkP30dDVL/DFpOLtpQlVi0Ik14M8R XztTyCXVTIRfQqICUwZmi+xCdLQlNO18oEIWKqWXRIvHegnFVcsU6nopZBv13OPtdos6 BUuw69xV2C5nnQqRgRBcnMZxV5SRSoSCEjGmp3KCL+PrfTZ+NHGmf3lzLkUZr3paPEMp vj3Q== X-Gm-Message-State: AOPr4FUvFgde6D5GjL6G6U4hWdOsIVsIz4QeMwrGX9TkysU1cYoNBATrqFCulRyAdWmVZUoMjPmiiNtvToyW+g== MIME-Version: 1.0 X-Received: by 10.50.3.129 with SMTP id c1mr19644872igc.22.1461688811731; Tue, 26 Apr 2016 09:40:11 -0700 (PDT) Received: by 10.36.113.3 with HTTP; Tue, 26 Apr 2016 09:40:11 -0700 (PDT) In-Reply-To: References: <122264.6769.qm@web101720.mail.ssk.yahoo.co.jp> <807115.72196.qm@web101707.mail.ssk.yahoo.co.jp> Date: Tue, 26 Apr 2016 09:40:11 -0700 Message-ID: Subject: Re: most significant bit memory resource From: Adrian Chadd To: Warner Losh Cc: Mori Hiroki , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 16:40:13 -0000 Fixed in -HEAD, r298652. Thanks! -a On 26 April 2016 at 06:26, Warner Losh wrote: > Looks like the right fix to get the proper promotion. > > Warner > > On Tue, Apr 26, 2016 at 1:19 AM, Mori Hiroki wrote: >> >> Hi >> >> I check this code work fine. >> >> >> https://github.com/yamori813/freebsd/commit/8ba7f92d2e120a23e415487521b067d2a5606906 >> >> >> Regards. >> >> Hiroki Mori >> >> ----- Original Message ----- >> > From: Adrian Chadd >> > To: Mori Hiroki >> > Cc: "freebsd-mips@freebsd.org" >> > Date: 2016/4/26, Tue 05:22 >> > Subject: Re: most significant bit memory resource >> > >> > Hi >> > , >> > Can you just try typecasting maddr to (u_long) maddr in the call to >> > bus_set_resource() ? That should hopefully be an easy fix. >> > >> > Thanks, >> > >> > >> > -adrian >> > >> > >> > On 24 April 2016 at 16:38, Mori Hiroki wrote: >> >> Hi. >> >> >> >> Current mips/mips/nexus.c code can't use most significant bit memory >> > resource >> >> device. >> >> >> >> cfi0 at mem 0xffffffffbe000000-0xffffffffbfffffff on nexus0 >> >> nexus_alloc_resource: could not reserve resource for cfi0 >> >> device_attach: cfi0 attach returned 6 >> >> >> >> index 45e47ef..a5d52d7 100644 >> >> >> >> --- a/sys/mips/mips/nexus.c >> >> +++ b/sys/mips/mips/nexus.c >> >> @@ -566,7 +566,9 @@ nexus_hinted_child(device_t bus, const char >> >> *dname, int >> > duni >> >> t) >> >> __func__, device_get_nameunit(child), >> >> (void *)(intptr_t)maddr, msize); >> >> >> >> - result = bus_set_resource(child, SYS_RES_MEMORY, 0, >> >> maddr, >> >> +// result = bus_set_resource(child, SYS_RES_MEMORY, 0, >> >> maddr, >> >> +rman_res_t tmpaddr = (u_long)maddr; >> >> + result = bus_set_resource(child, SYS_RES_MEMORY, 0, >> > tmpaddr, >> >> msize); >> >> if (result != 0) { >> >> device_printf(bus, >> >> >> >> cfi0 at mem 0xbe000000-0xbfffffff on nexus0 >> >> cfi0: [256x128KB] >> >> cfid0 on cfi0 >> >> >> >> I check this problem then found my workaround at cfi_core.c. Thanks >> >> Adrian. >> >> >> >> Regards >> >> >> >> Hiroki Mori >> >> >> >> _______________________________________________ >> >> freebsd-mips@freebsd.org mailing list >> >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >> >> To unsubscribe, send any mail to >> > "freebsd-mips-unsubscribe@freebsd.org" >> > >> _______________________________________________ >> freebsd-mips@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-mips >> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > >