Date: Tue, 17 Jan 2017 21:06:13 -0800 From: Thomas Skibo <thomasskibo@yahoo.com> To: Warner Losh <imp@bsdimp.com> Cc: Kurt Jaeger <pi@opsec.eu>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: u-boot ports for Zedboard and Zybo Message-ID: <25A1C780-3BC1-4745-9DBD-D2716E6ED7D2@yahoo.com> In-Reply-To: <CANCZdfqScpotLM07XfSM4kDu7fM4EOGbOWJVgANVEJfC4Up=5g@mail.gmail.com> References: <640059E8-B9DD-4289-BA59-2E02A4D91F87@yahoo.com> <20170116173329.GH13006@home.opsec.eu> <B648E0C0-4DE4-4809-8FEC-FE9735DC178A@yahoo.com> <CANCZdfrfurQaQXviNJ4Q=FwVgtFGuBEqQgOLtV5HuVzOT=fRMg@mail.gmail.com> <58C09F42-D34B-4B84-A894-7147613214B9@yahoo.com> <CANCZdfqScpotLM07XfSM4kDu7fM4EOGbOWJVgANVEJfC4Up=5g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_692E24D6-2F57-47B3-8EAF-92E39DBAEA13 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 17, 2017, at 5:04 PM, Warner Losh <imp@bsdimp.com> wrote: >=20 > Does that mean you have a fix? :) I'm happy to add stuff to the u-boot > ports branch (or do pull requests, which atm are a little > complicated). >=20 > Warner I managed to get it working but I am seeing some funny u-boot warnings = (CACHE: Misaligned operation=E2=80=A6). I=E2=80=99ll keep tinkering with it over the next few days. I=E2=80=99ve = attached my changes but I can=E2=80=99t test it on any of the other = boards. =E2=80=94Thomas --Apple-Mail=_692E24D6-2F57-47B3-8EAF-92E39DBAEA13 Content-Disposition: attachment; filename=patch.u-boot-bsdimp.txt Content-Type: text/plain; name="patch.u-boot-bsdimp.txt" Content-Transfer-Encoding: quoted-printable diff --git a/api/api_storage.c b/api/api_storage.c index d6e475b9c4..d3bbe71756 100644 --- a/api/api_storage.c +++ b/api/api_storage.c @@ -334,10 +334,5 @@ lbasize_t dev_read_stor(void *cookie, void *buf, = lbasize_t len, lbastart_t start if (!dev_stor_is_valid(type, dd)) return 0; =20 - if ((dd->block_read) =3D=3D NULL) { - debugf("no block_read() for device 0x%08x\n", cookie); - return 0; - } - - return dd->block_read(dd, start, len, buf); + return blk_dread(dd, start, len, buf); } diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 8dd8061c46..b76a4ee02e 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -286,8 +286,8 @@ static int efi_disk_create_eltorito(struct blk_desc = *desc, } =20 static int efi_disk_create_mbr(struct blk_desc *desc, - const struct blk_driver *cur_drvr, - int diskid) + const char *if_typename, + int diskid) { int disks =3D 0; char devname[32] =3D { 0 }; /* dp->str is u16[32] long */ @@ -298,10 +298,10 @@ static int efi_disk_create_mbr(struct blk_desc = *desc, return 0; =20 while (!part_get_info(desc, part, &info)) { - snprintf(devname, sizeof(devname), "%s%d:%d", = cur_drvr->if_typename, + snprintf(devname, sizeof(devname), "%s%d:%d", = if_typename, diskid, part); =20 - efi_disk_add_dev(devname, cur_drvr->if_typename, desc, = diskid, &info, 1); + efi_disk_add_dev(devname, if_typename, desc, diskid, = &info, 1); part++; disks++; } @@ -340,7 +340,7 @@ int efi_disk_register(void) * El Torito images show up as block devices in an EFI = world, * so let's create them here */ - disks +=3D efi_disk_create_mbr(desc, dev, desc->devnum); + disks +=3D efi_disk_create_mbr(desc, if_typename, = desc->devnum); disks +=3D efi_disk_create_eltorito(desc, if_typename, desc->devnum, = dev->name); } @@ -377,7 +377,7 @@ int efi_disk_register(void) * El Torito images show up as block devices * in an EFI world, so let's create them here */ - disks +=3D efi_disk_create_mbr(desc, cur_drvr, = i); + disks +=3D efi_disk_create_mbr(desc, = if_typename, i); disks +=3D efi_disk_create_eltorito(desc, = if_typename, i, devname); =20 --Apple-Mail=_692E24D6-2F57-47B3-8EAF-92E39DBAEA13--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25A1C780-3BC1-4745-9DBD-D2716E6ED7D2>