Supporting new interfaces in phosphor-ipmi-flash

Troy Lee troy_lee at aspeedtech.com
Tue Feb 9 20:06:55 AEDT 2021


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 at 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


More information about the openbmc mailing list