Date: Tue, 26 Apr 2016 09:40:11 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: Mori Hiroki <yamori813@yahoo.co.jp>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: most significant bit memory resource Message-ID: <CAJ-Vmonm-KGRF008HHFa3FJ9O6MQ74sSxw_wLy1fkjfO=dUEXA@mail.gmail.com> In-Reply-To: <CANCZdfoZdhu7YRMBAo-fQq-W9OJ_918wKicCwFLA9e84tA%2B68g@mail.gmail.com> References: <122264.6769.qm@web101720.mail.ssk.yahoo.co.jp> <CAJ-Vmok%2BJ3njCfmJ8e7hduDR9yo51=heD65Dnjy0nm8TK139RA@mail.gmail.com> <807115.72196.qm@web101707.mail.ssk.yahoo.co.jp> <CANCZdfoZdhu7YRMBAo-fQq-W9OJ_918wKicCwFLA9e84tA%2B68g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Fixed in -HEAD, r298652. Thanks! -a On 26 April 2016 at 06:26, Warner Losh <imp@bsdimp.com> wrote: > Looks like the right fix to get the proper promotion. > > Warner > > On Tue, Apr 26, 2016 at 1:19 AM, Mori Hiroki <yamori813@yahoo.co.jp> wrote: >> >> Hi >> >> I check this code work fine. >> >> >> https://github.com/yamori813/freebsd/commit/8ba7f92d2e120a23e415487521b067d2a5606906 >> >> >> Regards. >> >> Hiroki Mori >> >> ----- Original Message ----- >> > From: Adrian Chadd <adrian.chadd@gmail.com> >> > To: Mori Hiroki <yamori813@yahoo.co.jp> >> > Cc: "freebsd-mips@freebsd.org" <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 <yamori813@yahoo.co.jp> 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" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmonm-KGRF008HHFa3FJ9O6MQ74sSxw_wLy1fkjfO=dUEXA>