All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niek Linnenbank <nieklinnenbank@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Qemu-block <qemu-block@nongnu.org>,
	"Sai Pavan Boddu" <sai.pavan.boddu@xilinx.com>,
	"Bin Meng" <bin.meng@windriver.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Cleber Rosa" <crosa@redhat.com>, "Bin Meng" <bmeng.cn@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [RFC PATCH 1/4] Revert "hw/sd: Fix incorrect populated function switch status data structure"
Date: Sat, 24 Oct 2020 23:07:36 +0200	[thread overview]
Message-ID: <CAPan3WrDHYzJb1fONHiOBWtEMW9Bg6jVt+tuvXC5XsF_CcDjbQ@mail.gmail.com> (raw)
In-Reply-To: <20201023131808.3198005-2-f4bug@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 4361 bytes --]

Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com>

On Fri, Oct 23, 2020 at 3:18 PM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:

> This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a.
>
> Currently booting U-Boot on the Orange Pi PC we get:
>
>   console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
>   ...
>   console: Autoboot in 1 seconds, press <Space> to stop
>   console: =>
>   console: => setenv extraargs 'printk.time=0 console=ttyS0,115200
> loglevel=7 nosmp systemd.default_timeout_start_sec=9000
> systemd.mask=armbian-zram-config.service
> systemd.mask=armbian-ramlog.service'
>   console: => boot
>   console: unable to select a mode
>   console: Device 0: unknown device
>   console: BOOTP broadcast 1
>   console: DHCP client bound to address 10.0.2.15 (12 ms)
>   console: *** Warning: no boot file name; using '0A00020F.img'
>   console: Using ethernet@1c30000 device
>   console: TFTP from server 10.0.2.2; our IP address is 10.0.2.15
>   console: Filename '0A00020F.img'.
>   console: Load address: 0x42000000
>   console: Loading: *
>   console: TFTP error: 'Access violation' (2)
>   console: Not retrying...
>   console: missing environment variable: pxeuuid
>   console: missing environment variable: bootfile
>   ...
>
> With commit b638627c723 reverted:
>
>   console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
>   ...
>   console: Autoboot in 1 seconds, press <Space> to stop
>   console: =>
>   console: => setenv extraargs 'printk.time=0 console=ttyS0,115200
> loglevel=7 nosmp systemd.default_timeout_start_sec=9000
> systemd.mask=armbian-zram-config.service
> systemd.mask=armbian-ramlog.service'
>   console: => boot
>   console: switch to partitions #0, OK
>   console: mmc0 is current device
>   console: Scanning mmc 0:1...
>   console: Found U-Boot script /boot/boot.scr
>   console: 3967 bytes read in 16 ms (241.2 KiB/s)
>   console: ## Executing script at 43100000
>   console: U-boot loaded from SD
>   console: Boot script loaded from mmc
>   console: 153 bytes read in 10 ms (14.6 KiB/s)
>   console: 11185760 bytes read in 6698 ms (1.6 MiB/s)
>   console: 7788240 bytes read in 2966 ms (2.5 MiB/s)
>   console: Found mainline kernel configuration
>   console: 32121 bytes read in 50 ms (627 KiB/s)
>   console: 4185 bytes read in 23 ms (176.8 KiB/s)
>   console: Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
>   console: ## Executing script at 45000000
>   console: ## Loading init Ramdisk from Legacy Image at 43300000 ...
>   console: Image Name:   uInitrd
>   console: Image Type:   ARM Linux RAMDisk Image (gzip compressed)
>   console: Data Size:    11185696 Bytes = 10.7 MiB
>   console: Load Address: 00000000
>   console: Entry Point:  00000000
>   console: Verifying Checksum ... OK
>   console: ## Flattened Device Tree blob at 43000000
>   console: Booting using the fdt blob at 0x43000000
>   console: Loading Ramdisk to 49555000, end 49fffe20 ... OK
>   console: Loading Device Tree to 494e4000, end 49554fff ... OK
>   console: Starting kernel ...
>   console: Uncompressing Linux... done, booting the kernel.
>
> Fixes: b638627c723 ("hw/sd: Fix incorrect populated function switch status
> data structure")
> Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/sd/sd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index c3febed2434..c17197785bc 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -823,12 +823,11 @@ static void sd_function_switch(SDState *sd, uint32_t
> arg)
>      sd->data[11] = 0x43;
>      sd->data[12] = 0x80;       /* Supported group 1 functions */
>      sd->data[13] = 0x03;
> -
>      for (i = 0; i < 6; i ++) {
>          new_func = (arg >> (i * 4)) & 0x0f;
>          if (mode && new_func != 0x0f)
>              sd->function_group[i] = new_func;
> -        sd->data[16 - (i >> 1)] |= new_func << ((i % 2) * 4);
> +        sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4);
>      }
>      memset(&sd->data[17], 0, 47);
>      stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));
> --
> 2.26.2
>
>

-- 
Niek Linnenbank

[-- Attachment #2: Type: text/html, Size: 5430 bytes --]

  reply	other threads:[~2020-10-24 21:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 13:18 [RFC PATCH 0/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC Philippe Mathieu-Daudé
2020-10-23 13:18 ` [RFC PATCH 1/4] Revert "hw/sd: Fix incorrect populated function switch status data structure" Philippe Mathieu-Daudé
2020-10-24 21:07   ` Niek Linnenbank [this message]
2020-10-23 13:18 ` [RFC PATCH 2/4] tests/acceptance: Allow running Orange Pi test using cached artifacts Philippe Mathieu-Daudé
2020-10-24 21:06   ` Niek Linnenbank
2020-10-23 13:18 ` [RFC PATCH 3/4] tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method Philippe Mathieu-Daudé
2020-10-23 13:18 ` [RFC PATCH 4/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC Philippe Mathieu-Daudé
2020-10-24 21:00   ` Niek Linnenbank
2020-10-25  2:17     ` Bin Meng
2020-10-25 23:35       ` Niek Linnenbank
2020-10-25 20:17         ` Philippe Mathieu-Daudé
2020-10-23 17:42 ` [RFC PATCH 0/4] " Bin Meng
2020-10-23 17:56   ` Philippe Mathieu-Daudé
2020-10-24  1:06     ` Bin Meng
2020-10-24  7:34       ` Philippe Mathieu-Daudé
2020-10-24  8:47         ` Paolo Bonzini
2020-10-24 15:03         ` Bin Meng
2020-10-26  8:49 ` Philippe Mathieu-Daudé

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=CAPan3WrDHYzJb1fONHiOBWtEMW9Bg6jVt+tuvXC5XsF_CcDjbQ@mail.gmail.com \
    --to=nieklinnenbank@gmail.com \
    --cc=bin.meng@windriver.com \
    --cc=bmeng.cn@gmail.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sai.pavan.boddu@xilinx.com \
    --cc=wainersm@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.