lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Dec 2020 20:40:21 -0800
From:   Max Zhen <max.zhen@...inx.com>
To:     Xu Yilun <yilun.xu@...el.com>,
        Sonal Santan <sonal.santan@...inx.com>
CC:     <linux-kernel@...r.kernel.org>, <linux-fpga@...r.kernel.org>,
        <lizhih@...inx.com>, <michal.simek@...inx.com>,
        <stefanos@...inx.com>, <devicetree@...r.kernel.org>
Subject: Re: [PATCH Xilinx Alveo 7/8] fpga: xrt: Alveo management physical
 function driver

Hi Yilun,


On 12/1/20 7:00 PM, Xu Yilun wrote:
> 
> 
>> +static int xmgmt_main_event_cb(struct platform_device *pdev,
>> +     enum xrt_events evt, void *arg)
>> +{
>> +     struct xmgmt_main *xmm = platform_get_drvdata(pdev);
>> +     struct xrt_event_arg_subdev *esd = (struct xrt_event_arg_subdev *)arg;
>> +     enum xrt_subdev_id id;
>> +     int instance;
>> +     size_t fwlen;
>> +
>> +     switch (evt) {
>> +     case XRT_EVENT_POST_CREATION: {
>> +             id = esd->xevt_subdev_id;
>> +             instance = esd->xevt_subdev_instance;
>> +             xrt_info(pdev, "processing event %d for (%d, %d)",
>> +                     evt, id, instance);
>> +
>> +             if (id == XRT_SUBDEV_GPIO)
>> +                     xmm->gpio_ready = true;
>> +             else if (id == XRT_SUBDEV_QSPI)
>> +                     xmm->flash_ready = true;
>> +             else
>> +                     BUG_ON(1);
>> +
>> +             if (xmm->gpio_ready && xmm->flash_ready) {
>> +                     int rc;
>> +
>> +                     rc = load_firmware_from_disk(pdev, &xmm->firmware_blp,
>> +                             &fwlen);
>> +                     if (rc != 0) {
>> +                             rc = load_firmware_from_flash(pdev,
>> +                                     &xmm->firmware_blp, &fwlen);
> 
> I'm curious that before the shell metadata is loaded, how the QSPI
> subdev is enumerated and get to work? The QSPI DT info itself is
> stored in metadata, is it?

No, it is not from the shell metadata. The QSPI subdev info is 
discovered from a rom located on the PCIE BAR pointed to by VSEC cap 
found in config space.

> 
> I didn't find the creation of leaf platform devices, maybe I can find
> the answer in the missing Patch #5?

Leaf driver is children of partition driver. They are created in 
xrt_part_create_leaves() in xrt-partition.c.

Thanks,
Max

> 
> Thanks,
> Yilun
> 
>> +                     }
>> +                     if (rc == 0 && is_valid_firmware(pdev,
>> +                         xmm->firmware_blp, fwlen))
>> +                             (void) xmgmt_create_blp(xmm);
>> +                     else
>> +                             xrt_err(pdev,
>> +                                     "failed to find firmware, giving up");
>> +                     xmm->evt_hdl = NULL;
>> +             }
>> +             break;
>> +     }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ