aspeed-adc driver kpanic

Patrick Williams patrick at stwcx.xyz
Tue Oct 5 09:25:17 AEDT 2021


On Mon, Oct 04, 2021 at 07:26:04PM +0000, Peter Delevoryas wrote:

> Oh yeah, this is probably not the driver’s fault, this is the fault of my QEMU
> patches. I only allowed 32-bit aligned reads. I bet if you apply this additional
> diff, it won’t crash

FWIW, applying this did get me past the kernel panic.  I don't really care about
any of the data right now.  I was trying to test something out in userspace.

> diff --git a/hw/adc/aspeed_adc.c b/hw/adc/aspeed_adc.c
> index fcd93d6853..58e3f18c6c 100644
> --- a/hw/adc/aspeed_adc.c
> +++ b/hw/adc/aspeed_adc.c
> @@ -234,9 +234,9 @@ static const MemoryRegionOps aspeed_adc_engine_ops = {
>      .write = aspeed_adc_engine_write,
>      .endianness = DEVICE_LITTLE_ENDIAN,
>      .valid = {
> -        .min_access_size = 4,
> +        .min_access_size = 1,
>          .max_access_size = 4,
> -        .unaligned = false,
> +        .unaligned = true,
>      },
>  };

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20211004/29b5e7bf/attachment.sig>


More information about the openbmc mailing list