From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.groups.io with SMTP id smtpd.web09.5712.1616330827420953455 for ; Sun, 21 Mar 2021 05:47:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@solid-run-com.20150623.gappssmtp.com header.s=20150623 header.b=pf7AKgAb; spf=pass (domain: solid-run.com, ip: 209.85.218.51, mailfrom: jon@solid-run.com) Received: by mail-ej1-f51.google.com with SMTP id a7so16848483ejs.3 for ; Sun, 21 Mar 2021 05:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solid-run-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=lyENHWhuyGFCH+MGgov0P275hO4m7APi3XugWgOIrDU=; b=pf7AKgAbhFdoV7R1Ub/wVG7eMiiX2DWpkN8OTWSVU3+2tVnywfvMzG25XHMKyDmilG puSgjdaMy/pRms1yamGWh2INqYUKA53k9mil9Qs9UTKTcoiWNXTvGkKE7+QKNjiVptgQ bb7he82g961I7chNGE2utrlY397gmhsNuKSDD7l6pvLYbEVgWJejNGmq/lVfK8S5KXp6 INNEx0zOOrTEZqia6T1Qjz43jniBhPOmiYf4tHp8ptzvNzZ1Hw1m4suwcIPKf07adkIz CK7rYtzK8vgmptoYS4LJQVr9oU4MdVs3FgUDekNkFfdavEH6zgsZuxLD+i+LuHC2T7qH MwLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lyENHWhuyGFCH+MGgov0P275hO4m7APi3XugWgOIrDU=; b=f4KLAvE9qzCxRUF71FDMbmySPoKfBEfOzoLOglAhv6HvL1mgbIlY17b0lLl7mk1r2a EaiaZVs32QiOt8sjXx54CNr/X1Ofc/QVl6SjrGlj9+T28jTjK66HjBrgbUgePjJWL0/J Yy2vzxWqxyZPHWPdw+KTneL80VLAwp3lP+Mhx71R62p9jeyIlE6sPMdHGuyG1xCMFNwy 8HcND/uAzLOVozfcw2TVeKS7XCf9FQ8h3XxQswI94Ux4m9EvMUhR4PcVBlhhh2jSwgY5 ZE7/3ZxiNNF8zMpQxVEBBfgrzcJxiwQq6pG98z8tO3H+0Zn9SHMtoO+OKd9EY4aVozzQ O9Ww== X-Gm-Message-State: AOAM531pjR3Klyd0CI+Q7GX8ULLplTR/nKumCHNvtCdhtIbZTFZFfPFL wsVXfUOQG65uHRzZ/hpAiUebAca44TLVLGRABN3YMKLZhKuSLO/U X-Google-Smtp-Source: ABdhPJyWd6C4Z0jFhSG0m2IxjgEOUaqF1rdyf23yFULPULR+BYNE1FfL++M5T0qsdz4lIMwNsDy6kAPJKCMRH1OvvMw= X-Received: by 2002:a17:906:14d4:: with SMTP id y20mr14384763ejc.190.1616330825352; Sun, 21 Mar 2021 05:47:05 -0700 (PDT) MIME-Version: 1.0 From: "Jon Nettleton" Date: Sun, 21 Mar 2021 13:46:29 +0100 Message-ID: Subject: SR-IOV setup in edk2 To: devel@edk2.groups.io Content-Type: text/plain; charset="UTF-8" I am looking for some example code, or direction in how SR-IOV functions are expected to be picked up by the platform pcie host library so it can setup required bits like LUTs. Currently the HostLib is getting the gEfiPciIoProtocolGuid event and then setting the controller up based on the BDF. I see that PciScanBus is detecting the VF's and calling PciAllocateBusNumber(). PCI-IOV ScanBus - SubBusNumber - 0x2 PciBus: Discovered PPB @ [00|00|00] However my setup function is only ever triggered with the real device BDF's...Is it up to me to check for the VFs if SR-IOV is enabled and set them up manually? Is there another event I should be listening to that will be triggered for VF's vs PF's? Any pointers would be very helpful. -Jon