All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Lee <troy_lee@aspeedtech.com>
To: <openbmc@lists.ozlabs.org>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: Supporting new interfaces in phosphor-ipmi-flash
Date: Tue, 9 Feb 2021 09:06:55 +0000	[thread overview]
Message-ID: <20210209090655.GA1147175@aspeedtech.com> (raw)
In-Reply-To: <20210201073724.GA2623538@aspeedtech.com>

Hi Team,

While I'm evaluating the performance for the design, I notice that the
maximum IPMI through/put over KCS / IPMB / LAN is about 120 command per
second. Does anyone know where the bottleneck is?

If we wants to send 64MB image through 4K memory buffer, it takes 2^14
ipmi blobWrite commands. With the through/put mentioned above, it will
need about 2 min to send just "IPMI" commands. The image copy to memory
just takes few seconds. I'd like to know if I could do anything to
improve the IPMI through/put.

Thanks,
Troy Lee

The 02/01/2021 15:37, Troy Lee wrote:
> Hi Andrew,
> 
> You make a very good point, I should propose the design document before
> finilize the implementation. 
> 
> For option 2, we need to coordinate a 4K buffer from device tree, let's
> say:
> 
> ```
> reserved-memory {
>     pcie_ssm_memory: region@98000000 {
>         no-map;
>         reg = <0x98000000 0x00001000>; /* 4K */
>     };
> };
> 
> pcie_ssm {
>     compatible = "aspeed,ast2600-pcie-sharedmem";
>     status = "okay";
>     memory-region = <&pcie_ssm_memory>;
> };
> ```
> 
> When initialing the pcie-sharedmem driver, the driver will fills the
> reserved memory address into:
>  - SCUC48 if the soc is AST2600
>  - SCU194 if the soc is AST2500
> 
> When the host runs burn_my_bmc (phosphor-ipmi-flash/tool), bmc will open 
> the window when recieve blobSessionOpen command by setting:
>  - SCUC24[8] to 1 if the soc is AST2600
>  - SCU184[8] to 1 if the soc is AST2500
> 
> The host start copy firmware image into VGA PCIe BAR[1]+0xE000 with 4K
> size, then host issues a blobWrite to BMC. BMC copys the firmware data
> from reserved memory region then acknowledge the host ipmi command. This
> procedure will run repeatedly until all firmware image are sented.
> 
> The host sends a blobSession close to close the shared memory
> window, then follows by a blobCommit to indicate the file is copyed.
> 
> 
> Sequence diagram:
> ```
>  +-------------+                                         +------------+
>  | burn my bmc |                                         | ipmi hostd |
>  +-------------+                                         +------------+
>         |                                                       |
>         |             blobOpen                                  |
>         +------------------------------------------------------>+
>         |                                                       |
>         |             blobSessionOpen                          +-+
>         +----------------------------------------------------->| |
>         |                                                      | +-+ IOCTL OpenWindow
>         |                            +-----------------+       | | | SCUC24[8] = 1
>         |                            | PCIe Shared Mem |       | | | (SCU184[8] = 1)
>         |                            | BAR[1] + 0xE000 <-------+ <-+
>         |                            +-----------------+       | |
>         |                                     |                | |
>         |             blobSession ACK         |                | |
>         +<-----------------------------------------------------+-+
>         |                                     |                 |
> +---------------------------------------------------------------------+
> |loop/  |                                     |                 |     |
> +---+   | memcpy(BAR[1]+0xE000, IMG+offset, size)               |     |
> |       +------------------------------------>+                 |     |
> |       |             blobWrite               |                +-+    |
> |       +----------------------------------------------------->| |    |
> |       |                                     |    memcpy()    | |    |
> |       |                                     +<---------------+ |    |
> |       |             blobWrite ACK           |                | |    |
> |       +<-----------------------------------------------------+-+    |
> |       |                                     |                 |     |
> |       |                                     |                 |     |
> |       |                                     |                 |     |
> +---------------------------------------------------------------------+
>         |                                     |                 |
>         |             blobSessionClose        |                +-+
>         +----------------------------------------------------->+ +-+ IOCTL CloseWindow
>         |                                     |                | | | SCUC24[8] = 0
>         |                                     |                | | | (SCU184[8] = 0)
>         |                                     |                | +<+
>         |                                     |                | |
>         |                                     X<---------------+-+
>         |             blobCommit                                |
>         +------------------------------------------------------->
>         |                                                       |
>         |                                                       |
>         |                                                       |
>         +                                                       +
> ```
> 
> Thanks,
> Troy Lee

  reply	other threads:[~2021-02-09  9:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  9:43 Supporting new interfaces in phosphor-ipmi-flash Troy Lee
2021-01-27 16:04 ` Patrick Venture
2021-01-27 17:48   ` Benjamin Fair
2021-01-28  7:15     ` Troy Lee
2021-01-27 23:14 ` Andrew Jeffery
2021-01-28  7:29   ` Troy Lee
2021-01-31 23:19     ` Andrew Jeffery
2021-02-01  7:37       ` Troy Lee
2021-02-09  9:06         ` Troy Lee [this message]
2021-02-14 23:26           ` Andrew Jeffery
2021-02-18  6:24             ` Troy Lee

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=20210209090655.GA1147175@aspeedtech.com \
    --to=troy_lee@aspeedtech.com \
    --cc=openbmc@lists.ozlabs.org \
    /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.