public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [BUG] efi_driver: crash while reading from iSCSI drive
Date: Tue, 22 Oct 2019 22:29:09 +0200	[thread overview]
Message-ID: <1663f155-e50f-f4fd-6eee-0298fda255c0@gmx.de> (raw)
In-Reply-To: <20191007055939.17093-5-takahiro.akashi@linaro.org>

The patch

commit 867400677cda0fac4a411f1549fe3a61bb5ed172
efi_loader: disk: install FILE_SYSTEM_PROTOCOL only if available

breaks booting my Pine A64 LTS board via iPXE and GRUB. But I assume
this is not at the base of the problem.

My iSCSI drive is partitioned like this:

Device        Boot    Start      End  Sectors  Size Id Type
pine-a64-lts1          2048   194559   192512   94M ef EFI   vfat
pine-a64-lts2 *      194560  2148351  1953792  954M 83 Linux ext2
pine-a64-lts3       2148352 25585663 23437312 11.2G 83 Linux ext4
pine-a64-lts4      25585664 67106815 41521152 19.8G 83 Linux ext4

Looking at the debug output below the following questions arise:

Why is ext2 not recognized as a file system?
Why is the system crashing when trying to read 1024 blocks from the ext4
partition?

.config contains CONFIG_FS_EXT4=y

EFI: efi_bl_bind: handle 00000000b9f94560, interface 00000000b8e9f7f8
EFI: efi_bl_read: read 'efiblk#0', from block 0, 1 blocks
EFI: Call: io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: 0 returned by io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: efi_bl_read: r = 0
EFI: efi_bl_bind: block device 'efiblk#0' created
EFI: efi_bl_read: read 'efiblk#0', from block 2048, 1 blocks
EFI: Call: io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: 0 returned by io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: efi_bl_read: r = 0
lib/efi_loader/efi_disk.c(279) efi_fs_exists: 0 returned by
fs_set_blk_dev_with_part(desc, 1)
EFI: efi_bl_read: read 'efiblk#0', from block 194560, 1 blocks
EFI: Call: io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: 0 returned by io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: efi_bl_read: r = 0
EFI: efi_bl_read: read 'efiblk#0', from block 195584, 1024 blocks
EFI: Call: io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: 0 returned by io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: efi_bl_read: r = 0
** Unrecognized filesystem type **
lib/efi_loader/efi_disk.c(279) efi_fs_exists: -1 returned by
fs_set_blk_dev_with_part(desc, 2)
EFI: efi_bl_read: read 'efiblk#0', from block 2148352, 1 blocks
EFI: Call: io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: 0 returned by io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)
EFI: efi_bl_read: r = 0
EFI: efi_bl_read: read 'efiblk#0', from block 2149376, 1024 blocks
EFI: Call: io->read_blocks( io, io->media->media_id, (u64)blknr,
(efi_uintn_t)blkcnt * (efi_uintn_t)io->media->block_size, buffer)

"Synchronous Abort" handler, esr 0x02000000

elr: ffffffff8c0a6028 lr : ffffffff8c0a6000 (reloc)
elr: 0000000000000028 lr : 0000000000000000
x0 : 00000000b9f918f8 x1 : 00000000b9f31004
x2 : 00000000b9f918f8 x3 : 00000000b9f918f8
x4 : 00000000b9f918f8 x5 : 00000000b9f918f8
x6 : 00000000b9f918f8 x7 : 0000000000000000
x8 : 00000000b9f918f8 x9 : 00000000b8ea1038
x10: 0000000000000001 x11: 0000000019100bb0
x12: 0000000000000000 x13: 0000000000000001
x14: 0000000000000002 x15: 0000000000000003
x16: 00000000000000c8 x17: 00000000b9f918f8
x18: 00000000b9f31c30 x19: 00000000b9f918f8
x20: 00000000b8e9ddd0 x21: 00000000b8e99000
x22: 00000000b9f31008 x23: 00000000b9f3105a
x24: 00000000b9f31068 x25: 00000000b9f31110
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000b9f31160

Code: ea000011 ea000000 ea000013 eafffffe (e3a00001)

Looks like we jumped into nowhere land:

All code
========
    0:   ea000011        ands    x17, x0, x0
    4:   ea000000        ands    x0, x0, x0
    8:   ea000013        ands    x19, x0, x0
    c:   eafffffe        bics    x30, xzr, xzr, ror #63
   10:*  e3a00001        .inst   0xe3a00001 ; undefined          <--
trapping instruction

Best regards

Heinrich

  reply	other threads:[~2019-10-22 20:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07  5:59 [U-Boot] [PATCH v4 0/5] efi_loader: disk: install FILE_SYSTEM_PROTOCOL to whole disk AKASHI Takahiro
2019-10-07  5:59 ` [U-Boot] [PATCH v4 1/5] fs: export fs_close() AKASHI Takahiro
2019-10-12 21:24   ` Heinrich Schuchardt
2019-10-07  5:59 ` [U-Boot] [PATCH v4 2/5] fs: clean up around fs_type AKASHI Takahiro
2019-10-12 21:23   ` Heinrich Schuchardt
2019-10-07  5:59 ` [U-Boot] [PATCH v4 3/5] fs: add fs_get_type() for current filesystem type AKASHI Takahiro
2019-10-07  5:59 ` [U-Boot] [PATCH v4 4/5] efi_loader: disk: install FILE_SYSTEM_PROTOCOL only if available AKASHI Takahiro
2019-10-22 20:29   ` Heinrich Schuchardt [this message]
2019-10-23 10:30     ` [U-Boot] [BUG] efi_driver: crash while reading from iSCSI drive AKASHI Takahiro
2019-10-24  3:26       ` Heinrich Schuchardt
2019-10-07  5:59 ` [U-Boot] [PATCH v4 5/5] efi_loader: disk: install file system protocol to a whole disk AKASHI Takahiro
2019-10-12 19:43   ` Heinrich Schuchardt
2019-10-15  7:34     ` AKASHI Takahiro
2019-10-15 11:07       ` Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1663f155-e50f-f4fd-6eee-0298fda255c0@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox