Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2016 16:19:40 +0900 (JST)
From:      Mori Hiroki <yamori813@yahoo.co.jp>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: most significant bit memory resource
Message-ID:  <807115.72196.qm@web101707.mail.ssk.yahoo.co.jp>
In-Reply-To: <CAJ-Vmok%2BJ3njCfmJ8e7hduDR9yo51=heD65Dnjy0nm8TK139RA@mail.gmail.com>
References:  <122264.6769.qm@web101720.mail.ssk.yahoo.co.jp> <CAJ-Vmok%2BJ3njCfmJ8e7hduDR9yo51=heD65Dnjy0nm8TK139RA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi=0A=0AI check this code work fine.=0A=0Ahttps://github.com/yamori813/free=
bsd/commit/8ba7f92d2e120a23e415487521b067d2a5606906=0A=0A=0ARegards.=0A=0AH=
iroki Mori=0A=0A----- Original Message -----=0A> From: Adrian Chadd <adrian=
.chadd@gmail.com>=0A> To: Mori Hiroki <yamori813@yahoo.co.jp>=0A> Cc: "free=
bsd-mips@freebsd.org" <freebsd-mips@freebsd.org>=0A> Date: 2016/4/26, Tue 0=
5:22=0A> Subject: Re: most significant bit memory resource=0A> =0A> Hi=0A> =
,=0A> Can you just try typecasting maddr to (u_long) maddr in the call to=
=0A> bus_set_resource() ? That should hopefully be an easy fix.=0A> =0A> Th=
anks,=0A> =0A> =0A> -adrian=0A> =0A> =0A> On 24 April 2016 at 16:38, Mori H=
iroki <yamori813@yahoo.co.jp> wrote:=0A>>  Hi.=0A>> =0A>>  Current mips/mip=
s/nexus.c code can't use most significant bit memory =0A> resource=0A>>  de=
vice.=0A>> =0A>>  cfi0 at mem 0xffffffffbe000000-0xffffffffbfffffff on nexu=
s0=0A>>  nexus_alloc_resource: could not reserve resource for cfi0=0A>>  de=
vice_attach: cfi0 attach returned 6=0A>> =0A>>  index 45e47ef..a5d52d7 1006=
44=0A>> =0A>>  --- a/sys/mips/mips/nexus.c=0A>>  +++ b/sys/mips/mips/nexus.=
c=0A>>  @@ -566,7 +566,9 @@ nexus_hinted_child(device_t bus, const char *dn=
ame, int =0A> duni=0A>>  t)=0A>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0  _=
_func__, device_get_nameunit(child),=0A>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0  (void *)(intptr_t)maddr, msize);=0A>> =0A>>  -=A0 =A0 =A0 =A0 =A0 =
=A0 =A0  result =3D bus_set_resource(child, SYS_RES_MEMORY, 0, maddr,=0A>> =
 +//=A0 =A0 =A0 =A0 =A0 =A0  result =3D bus_set_resource(child, SYS_RES_MEM=
ORY, 0, maddr,=0A>>  +rman_res_t tmpaddr =3D (u_long)maddr;=0A>>  +=A0 =A0 =
=A0 =A0 =A0 =A0 =A0  result =3D bus_set_resource(child, SYS_RES_MEMORY, 0, =
=0A> tmpaddr,=0A>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0  msize);=0A>> =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0  if (result !=3D 0) {=0A>> =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0  device_printf(bus,=0A>> =0A>>  cfi0 at mem=
 0xbe000000-0xbfffffff on nexus0=0A>>  cfi0: [256x128KB]=0A>>  cfid0 on cfi=
0=0A>> =0A>>  I check this problem then found my workaround at cfi_core.c. =
Thanks Adrian.=0A>> =0A>>  Regards=0A>> =0A>>  Hiroki Mori=0A>> =0A>>  ____=
___________________________________________=0A>>  freebsd-mips@freebsd.org =
mailing list=0A>>  https://lists.freebsd.org/mailman/listinfo/freebsd-mips=
=0A>>  To unsubscribe, send any mail to =0A> "freebsd-mips-unsubscribe@free=
bsd.org"=0A> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?807115.72196.qm>