diff options
Diffstat (limited to 'wiki/open-iov.org/index.php?title=GPU_Firmware&action=edit.html')
| -rw-r--r-- | wiki/open-iov.org/index.php?title=GPU_Firmware&action=edit.html | 357 |
1 files changed, 357 insertions, 0 deletions
diff --git a/wiki/open-iov.org/index.php?title=GPU_Firmware&action=edit.html b/wiki/open-iov.org/index.php?title=GPU_Firmware&action=edit.html new file mode 100644 index 0000000..94593d2 --- /dev/null +++ b/wiki/open-iov.org/index.php?title=GPU_Firmware&action=edit.html @@ -0,0 +1,357 @@ +<!DOCTYPE html> +<html class="client-nojs" lang="en" dir="ltr"> +<head> +<meta charset="UTF-8"/> +<title>View source for GPU Firmware - Open-IOV</title> +<script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":!0,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"fab52176f138feb2bde33e74","wgCSPNonce":!1,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":!1,"wgNamespaceNumber":0,"wgPageName":"GPU_Firmware","wgTitle":"GPU Firmware","wgCurRevisionId":23779,"wgRevisionId":0,"wgArticleId":94,"wgIsArticle":!1,"wgIsRedirect":!1,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"GPU_Firmware","wgRelevantArticleId":94,"wgIsProbablyEditable":!1,"wgRelevantPageIsProbablyEditable":!1,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks": +"en"},"wgEditSubmitButtonLabelPublish":!1};RLSTATE={"site.styles":"ready","noscript":"ready","user.styles":"ready","user":"ready","user.options":"loading","skins.vector.styles.legacy":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready"};RLPAGEMODULES=["mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","skins.vector.legacy.js","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader"];</script> +<script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@1hzgi",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); +});});</script> +<link rel="stylesheet" href="load.php%3Flang=en&modules=ext.visualEditor.desktopArticleTarget.noscript|skins.vector.styles.legacy&only=styles&skin=vector.css"/> +<script async="" src="load.php%3Flang=en&modules=startup&only=scripts&raw=1&skin=vector"></script> +<meta name="generator" content="MediaWiki 1.37.1"/> +<meta name="robots" content="noindex,nofollow"/> +<meta name="format-detection" content="telephone=no"/> +<link rel="shortcut icon" href="favicon.ico.html"/> +<link rel="search" type="application/opensearchdescription+xml" href="opensearch_desc.php" title="Open-IOV (en)"/> +<link rel="EditURI" type="application/rsd+xml" href="api.php%3Faction=rsd"/> +<link rel="alternate" type="application/atom+xml" title="Open-IOV Atom feed" href="./index.php%3Ftitle=Special:RecentChanges&feed=atom"/> +</head> +<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-GPU_Firmware rootpage-GPU_Firmware skin-vector action-edit skin-vector-legacy"><div id="mw-page-base" class="noprint"></div> +<div id="mw-head-base" class="noprint"></div> +<div id="content" class="mw-body" role="main"> + <a id="top"></a> + <div id="siteNotice"></div> + <div class="mw-indicators"> + </div> + <h1 id="firstHeading" class="firstHeading" >View source for GPU Firmware</h1> + <div id="bodyContent" class="vector-body"> + + <div id="contentSub">← <a href="index.php/GPU_Firmware.html" title="GPU Firmware">GPU Firmware</a></div> + <div id="contentSub2"></div> + + <div id="jump-to-nav"></div> + <a class="mw-jump-link" href="index.php%3Ftitle=GPU_Firmware&action=edit.html#mw-head">Jump to navigation</a> + <a class="mw-jump-link" href="index.php%3Ftitle=GPU_Firmware&action=edit.html#searchInput">Jump to search</a> + <div id="mw-content-text" class="mw-body-content"><p>You do not have permission to edit this page, for the following reason: +</p> +<div class="permissions-errors"> +<p>The action you have requested is limited to users in the group: <a href="https://open-iov.org/index.php?title=Open-IOV:Administrators&action=edit&redlink=1" class="new" title="Open-IOV:Administrators (page does not exist)">Administrators</a>. +</p> +</div><hr /> +<p>You can view and copy the source of this page. +</p><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1"> + +GPUs have become highly complex systems containing a number of different embedded controllers. This page will attempt to document embedded GPU firmware and support for IO virtualization through various firmware functions.<blockquote>An absence of critical technical documentation has historically slowed growth and adoption of developer ecosystems for GPU virtualization. + +This [https://creativecommons.org/licenses/by/4.0/ CC-BY-4.0] licensed content can either be used with attribution, or used as inspiration for new documentation, created by GPU vendors for public commercial distribution as developer documentation. + +Where possible, this documentation will clearly label dates and versions of observed-but-not-guaranteed behaviour vs. vendor-documented stable interfaces/behaviour with guarantees of forward or backward compatibility.</blockquote> + +== Intel == + +=== Firmware Images === +This section will cover firmware images used in Intel GPUs.[[File:Screen Shot 2022-11-18 at 4.14.32 PM.png|alt=Figure 1: The FSP Binary Layout from Intel® Firmware Support Package External Architecture Specification.|thumb|Figure 1: The FSP Binary Layout from Intel® Firmware Support Package External Architecture Specification. [https://cdrdv2.intel.com/v1/dl/getContent/736809 Source]]] + +==== Intel Firmware Support Package (FSP) ==== +Much like CPUs Intel's GPUs also contain a Firmware Support Package (FSP). + +The Coreboot project provides public domain information on the FSP [https://doc.coreboot.org/soc/intel/fsp/index.html here]. + +===== FSP Configuration ===== +In the context of GPUs the FSP configures several functions of the device. + +Those functions are as follows: +{| class="wikitable" +|+GPU Firmware Support Package +!FSP Parameter +!Possible Values +|- +|GFSP Status +|0x00 +|- +|FIVR SSC Value +|*.*% +|- +|FIVR RFI Value +|*.*MHz +|- +|GT Subsystem Vendor ID +|0x8086 +|- +|GT Subsystem Device ID +|0x** +|- +|HDA Subsystem Vendor ID +|0x0000 +|- +|HDA Subsystem Device ID +|0x0000 +|- +|P2SB Enable +|Yes/No +|- +|LMEBAR +|Max +|- +|GTMMADDR Prefetch Capability +|Prefetch Enabled +|- +|[https://open-iov.org/index.php/Merged_Drivers Display Present] +|Enabled/Disabled +|- +|I2C For Third Party Devices +|Enabled/Disabled +|- +|I2C Device Address 1 +|0x0000 +|- +|I2C Device Address 2 +|0x0000 +|- +|I2C Bus Speed +|Standard mode (0 to 100Kbps) +|} + +====== Editing FSP Configuration ====== +The FSP configuration editor can be downloaded [https://github.com/tianocore/edk2/tree/master/IntelFsp2Pkg/Tools/ConfigEditor here] and it's user manual is available [https://github.com/tianocore/edk2/blob/master/IntelFsp2Pkg/Tools/UserManuals/ConfigEditorUserManual.md here]. + +===== FSP Binary Format ===== +The FSP's binary layout is detailed within the [https://cdrdv2.intel.com/v1/dl/getContent/736809 Intel® FSP External Architecture Specification v2.4] on page 14. + +==== Known Firmware Package Variations ==== +Some firmware packages may include an **End of Manufacturing Flash Protection Mode** status of Protected or Unprotected. +[[File:Figure 2- Firmware status information for an Intel DG2 device..png|alt=Figure 2: Firmware status information for an Intel DG2 device.|thumb|Figure 2: Firmware status information for an Intel DG2 device.]] +Similar [https://eclypsium.com/2022/09/19/firmware-security-realizations-part-3-spi-write-protections/ SPI Write Protection] functionality is made available through Intel CPUs under [[wikipedia:System_Management_Mode|System Management Mode (SMM)]]. + +=== Embedded Controllers === +This section will cover firmware images as they apply to various embedded controllers within the Intel GPU. + +==== GuC ==== +The Graphics micro (µ) Controller (GuC) is an embedded controller contained within Intel's embedded and discrete graphics (DG*) series GPUs. + +===== Hardware Architecture ===== + +''The following section is supported by [https://igor-blue.github.io/2021/02/10/graphics-part1.html igor-blue.github.io] (see reference [https://open-iov.org/index.php/GPU_Firmware#References_(Talks_&_Reading_Material) 1], [https://open-iov.org/index.php/GPU_Firmware#References_(Talks_&_Reading_Material) 2]):'' + +''"The GuC - an embedded [https://www.wikiwand.com/en/I486 i486] core that supports graphics scheduling, power management and firmware attestation."'' +===== Software Architecture ===== + +''The following section is supported by [https://igor-blue.github.io/2021/02/10/graphics-part1.html igor-blue.github.io] (see reference [https://open-iov.org/index.php/GPU_Firmware#References_(Talks_&_Reading_Material) 1], [https://open-iov.org/index.php/GPU_Firmware#References_(Talks_&_Reading_Material) 2]):'' + +''"The μOS kernel runs in 32-bit protected mode, with no paging and old-style segments model (CS, DS, etc’). All code run in ring0. The OS handles HW/SW exceptions and crashes, and supplies debugging and logging services."'' + +''"It runs a single process - which initializes the system and then waits for interrupts/events in a loop."'' + +====== GuC Blob Checksum & Code Signing ====== +''"The bootrom verifies the firmware with a digital signature using a SHA256 hash + PKCSv2.1 RSA signature, and if the test passes copies it to SRAM and starts executing."'' +== Nvidia == + +=== Firmware Images === +This section will cover firmware images used in Nvidia GPUs. + +=== Embedded Controllers === +This section will cover firmware images as they apply to various embedded controllers within the Nvidia GPU. + +==== Falcon / NV-RISCV ==== +The Fast Logic CONtroller (Falcon) and Nvidia RISC-V ([https://riscv.org/wp-content/uploads/2016/07/Tue1100_Nvidia_RISCV_Story_V2.pdf NV-RISCV]) processors run the NvOS. + +==== GSP ==== +The GPU System Processor (GSP) is an embedded controller used for offload of the RM Core. + +The GSP runs [https://lwn.net/Articles/637658/ Library Operating System (LibOS)]. + +===== GSP Initialization & Offload ===== +The [https://open-iov.org/index.php/GPU_Driver_Internals#Initialization_3 GSP is initialized multiple times] during the system's bring up and runtime. + +GSP offload may occur during: + +* Hardware bring up when a cached version of the RM Core is loaded from SPI flash + +* During host driver bring up when the RM Core is offloaded by the [https://open-iov.org/index.php/OpenRM OpenRM driver]. +* During guest driver bring up when the RM Core is offloaded. + +{| class="wikitable" +|+Possible GSP Offloads +!Load Source +!Payload +!Notes +|- +|[https://wiki.segger.com/SPI_Flash SPI Flash] +|Cached RM Core +|Used as a fallback in case of no rm offload. +|- +|OpenRM +|RM Core +|This is the RM Core which was traditionally contained in the proprietary RM driver. +|- +|VGX Guest +|Guest RM Core +|Future OpenRM guests may accomplish RM offload via GSP stubs (controlled via [https://github.com/NVIDIA/open-gpu-kernel-modules/blob/758b4ee8189c5198504cb1c3c5bc29027a9118a3/src/common/sdk/nvidia/inc/ctrl/ctrla081.h#L102 gspHeapSize]?). +|} + +==== CMU ==== + + +== AMD == + + +== References (Talks & Reading Material) == + +# [https://igor-blue.github.io/2021/02/10/graphics-part1.html Security of the Intel Graphics Stack - Part 1 - Introduction] +# [https://igor-blue.github.io/2021/02/24/graphics-part2.html Security of the Intel Graphics Stack - Part 2 - FW <-> GuC] +#[https://eclypsium.com/2022/09/19/firmware-security-realizations-part-3-spi-write-protections/ Firmware Security Realizations Part 3: SPI Write Protections] +#[https://www.intel.com/content/www/us/en/intelligent-systems/intel-firmware-support-package/fsp-firmware-solutions-iot-video.html Intel® FSP: Firmware Solutions for the Internet of Things] +</textarea><div class="templatesUsed"></div><p id="mw-returnto">Return to <a href="index.php/GPU_Firmware.html" title="GPU Firmware">GPU Firmware</a>.</p> + +<div class="printfooter">Retrieved from "<a dir="ltr" href="index.php/GPU_Firmware.html">https://open-iov.org/index.php/GPU_Firmware</a>"</div></div> + <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> + </div> +</div> + +<div id="mw-navigation"> + <h2>Navigation menu</h2> + <div id="mw-head"> + <nav id="p-personal" class="mw-portlet mw-portlet-personal vector-user-menu-legacy vector-menu" aria-labelledby="p-personal-label" role="navigation" + > + <h3 id="p-personal-label" class="vector-menu-heading"> <span>Personal tools</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"><li id="pt-login" class="mw-list-item"><a href="https://open-iov.org/index.php?title=Special:UserLogin&returnto=GPU+Firmware&returntoquery=action%3Dedit" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li></ul> + + </div> +</nav> + + <div id="left-navigation"> + <nav id="p-namespaces" class="mw-portlet mw-portlet-namespaces vector-menu vector-menu-tabs" aria-labelledby="p-namespaces-label" role="navigation" + > + <h3 id="p-namespaces-label" class="vector-menu-heading"> <span>Namespaces</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"><li id="ca-nstab-main" class="selected mw-list-item"><a href="index.php/GPU_Firmware.html" title="View the content page [c]" accesskey="c">Page</a></li><li id="ca-talk" class="new mw-list-item"><a href="https://open-iov.org/index.php?title=Talk:GPU_Firmware&action=edit&redlink=1" rel="discussion" title="Discussion about the content page (page does not exist) [t]" accesskey="t">Discussion</a></li></ul> + + </div> +</nav> + + <nav id="p-variants" class="mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown-noicon vector-menu vector-menu-dropdown" aria-labelledby="p-variants-label" role="navigation" + > + <input type="checkbox" + id="p-variants-checkbox" + role="button" + aria-haspopup="true" + data-event-name="ui.dropdown-p-variants" + class=" vector-menu-checkbox" aria-labelledby="p-variants-label" /> + <h3 id="p-variants-label" class="vector-menu-heading"> <span>Variants</span> + <span class="vector-menu-checkbox-expanded">expanded</span> + <span class="vector-menu-checkbox-collapsed">collapsed</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"></ul> + + </div> +</nav> + + </div> + <div id="right-navigation"> + <nav id="p-views" class="mw-portlet mw-portlet-views vector-menu vector-menu-tabs" aria-labelledby="p-views-label" role="navigation" + > + <h3 id="p-views-label" class="vector-menu-heading"> <span>Views</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"><li id="ca-view" class="mw-list-item"><a href="index.php/GPU_Firmware.html">Read</a></li><li id="ca-viewsource" class="selected mw-list-item"><a href="index.php%3Ftitle=GPU_Firmware&action=edit.html" title="This page is protected. You can view its source [e]" accesskey="e">View source</a></li><li id="ca-history" class="mw-list-item"><a href="index.php%3Ftitle=GPU_Firmware&action=history.html" title="Past revisions of this page [h]" accesskey="h">View history</a></li></ul> + + </div> +</nav> + + <nav id="p-cactions" class="mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown-noicon vector-menu vector-menu-dropdown" aria-labelledby="p-cactions-label" role="navigation" title="More options" + > + <input type="checkbox" + id="p-cactions-checkbox" + role="button" + aria-haspopup="true" + data-event-name="ui.dropdown-p-cactions" + class=" vector-menu-checkbox" aria-labelledby="p-cactions-label" /> + <h3 id="p-cactions-label" class="vector-menu-heading"> <span>More</span> + <span class="vector-menu-checkbox-expanded">expanded</span> + <span class="vector-menu-checkbox-collapsed">collapsed</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"></ul> + + </div> +</nav> + + <div id="p-search" role="search" class="vector-search-box"> + <div> + <h3 > + <label for="searchInput">Search</label> + </h3> + <form action="https://open-iov.org/index.php" id="searchform"> + <div id="simpleSearch" data-search-loc="header-navigation"> + <input type="search" name="search" placeholder="Search Open-IOV" autocapitalize="sentences" title="Search Open-IOV [f]" accesskey="f" id="searchInput"/> + <input type="hidden" name="title" value="Special:Search"/> + <input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/> + <input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchButton" class="searchButton"/> + </div> + </form> + </div> +</div> + + </div> + </div> + +<div id="mw-panel"> + <div id="p-logo" role="banner"> + <a class="mw-wiki-logo" href="images/archive/c/c3/20221214193624!I915_Scheduling_Events_and_Requests.png.html" + title="Visit the main page"></a> + </div> + <nav id="p-navigation" class="mw-portlet mw-portlet-navigation vector-menu vector-menu-portal portal" aria-labelledby="p-navigation-label" role="navigation" + > + <h3 id="p-navigation-label" class="vector-menu-heading"> <span>Navigation</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"><li id="n-mainpage-description" class="mw-list-item"><a href="images/archive/c/c3/20221214193624!I915_Scheduling_Events_and_Requests.png.html" title="Visit the main page [z]" accesskey="z">Main page</a></li><li id="n-recentchanges" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li><li id="n-randompage" class="mw-list-item"><a href="index.php/Special:Random.html" title="Load a random page [x]" accesskey="x">Random page</a></li><li id="n-help-mediawiki" class="mw-list-item"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help about MediaWiki</a></li></ul> + + </div> +</nav> + + <nav id="p-tb" class="mw-portlet mw-portlet-tb vector-menu vector-menu-portal portal" aria-labelledby="p-tb-label" role="navigation" + > + <h3 id="p-tb-label" class="vector-menu-heading"> <span>Tools</span> + </h3> + <div class="vector-menu-content"> + + <ul class="vector-menu-content-list"><li id="t-whatlinkshere" class="mw-list-item"><a href="index.php/Special:WhatLinksHere/GPU_Firmware.html" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:RecentChangesLinked/GPU_Firmware" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li id="t-specialpages" class="mw-list-item"><a href="index.php/Special:SpecialPages.html" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li id="t-info" class="mw-list-item"><a href="index.php%3Ftitle=GPU_Firmware&action=info.html" title="More information about this page">Page information</a></li></ul> + + </div> +</nav> + + +</div> + +</div> +<footer id="footer" class="mw-footer" role="contentinfo" > + <ul id="footer-info" > +</ul> + + <ul id="footer-places" > + <li id="footer-places-privacy"><a href="https://open-iov.org/index.php/Open-IOV:Privacy_policy" title="Open-IOV:Privacy policy">Privacy policy</a></li> + <li id="footer-places-about"><a href="index.php/Open-IOV:About.html" title="Open-IOV:About">About Open-IOV</a></li> + <li id="footer-places-disclaimer"><a href="https://open-iov.org/index.php/Open-IOV:General_disclaimer" title="Open-IOV:General disclaimer">Disclaimers</a></li> +</ul> + + <ul id="footer-icons" class="noprint"> + <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="resources/assets/poweredby_mediawiki_132x47.png 1.5x, resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31" loading="lazy"/></a></li> +</ul> + +</footer> + + +<script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":61});});</script> +<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a39969ccacb139c9',t:'MTc4OTE1ODQ0OA=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script></body></html>
\ No newline at end of file |
