404
+ +Page not found
+ + +diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index b3fb145..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "project":"./tsconfig.json" - }, - "plugins": [ - "@typescript-eslint" - ], - "rules": { - "@typescript-eslint/naming-convention": "warn", - "@typescript-eslint/semi": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-throw-literal": "warn", - "semi": "off", - "@typescript-eslint/no-floating-promises": "error" - }, - "ignorePatterns": [ - "out", - "dist", - "**/*.d.ts" - ] -} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 343caa3..0000000 --- a/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -out -dist -node_modules -.vscode-test/ -*.vsix -/package-lock.json -/.edkCode diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 3ac9aeb..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - "dbaeumer.vscode-eslint" - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 58df78a..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,45 +0,0 @@ -// A launch configuration that compiles the extension and then opens it inside a new window -// Use IntelliSense to learn about possible attributes. -// Hover to view descriptions of existing attributes. -// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Run Extension", - "type": "extensionHost", - "request": "launch", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ], - "outFiles": [ - "${workspaceFolder}/out/**/*.js" - ], - "preLaunchTask": "npm: compile" - }, - { - "name": "Run Extension (watch)", - "type": "extensionHost", - "request": "launch", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ], - "outFiles": [ - "${workspaceFolder}/out/**/*.js" - ] - }, - { - "name": "Extension Tests", - "type": "extensionHost", - "request": "launch", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}", - "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" - ], - "outFiles": [ - "${workspaceFolder}/out/test/**/*.js" - ], - "preLaunchTask": "npm: compile" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 30bf8c2..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "files.exclude": { - "out": false // set this to true to hide the "out" folder with the compiled JS files - }, - "search.exclude": { - "out": true // set this to false to include "out" folder in search results - }, - // Turn off tsc task auto detection since we have the necessary tasks as npm scripts - "typescript.tsc.autoDetect": "off" -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 3946211..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,25 +0,0 @@ -// See https://go.microsoft.com/fwlink/?LinkId=733558 -// for the documentation about the tasks.json format -{ - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "compile", - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "type": "npm", - "script": "watch", - "problemMatcher": "$tsc-watch", - "isBackground": true, - "presentation": { - "reveal": "never" - }, - "group": "build" - } - ] -} diff --git a/.vscodeignore b/.vscodeignore deleted file mode 100644 index 16e0171..0000000 --- a/.vscodeignore +++ /dev/null @@ -1,10 +0,0 @@ -.vscode/** -.vscode-test/** -.gitignore -.yarnrc -vsc-extension-quickstart.md -**/tsconfig.json -**/.eslintrc.json -**/*.map -**/*.ts -scripts/** diff --git a/404.html b/404.html new file mode 100755 index 0000000..3d60e42 --- /dev/null +++ b/404.html @@ -0,0 +1,138 @@ + + +
+ + + + +Page not found
+ + +Most of the extension functionality will work out of the box on any given EDK2 project. However it will have the full set of features enabled when the source code is compiled and the workspace is loaded.
+When you open a folder that contains an EDK2 project, look for the Edk2Code icon in the activity bar on the left side of VS Code. Clicking it opens the Edk2Code sidebar, which contains the Workspace and Module Info views.
+
The Workspace view will guide you through loading your build configuration. If nothing is loaded yet, you will see the welcome screen:
+
If you have already compiled your EDK2 project, click Discover Build Folders. The extension will scan your workspace and detect all existing build output folders automatically.
+Once discovery completes, click Use discovered folders to load the detected configurations. The Workspace view will populate with your DSC, INF, and source file hierarchy.
+You can also trigger this at any time from the command palette:
+> EDK2: Discover build folders
+> EDK2: Use discovered build folders
+
+Click Open EDK2 Configuration (or run EDK2: Workspace configuration (UI)) to open the settings panel and manually specify:
.dsc files for your platform-D flags used in your build command> EDK2: Workspace configuration (UI)
+
+To force a full re-index after a new build, use:
+> EDK2: Rebuild index database
+
+To reload using the existing configuration without changing any settings:
+> EDK2: Rescan index database
+
+You can use the compile information build feature from EDK2 to provide more build information to the extension. This is optional but recommended
+To enable the compile information you need to enable the build report flag in the EDK2 build command and set -Y COMPILE_INFO. You can check more information about EDK build process here
For example, if you want to build EmulatorPkg from EDK2 source, your build command will look like this:
build -p EmulatorPkg\EmulatorPkg.dsc -t VS2019 -a IA32 -Y COMPILE_INFO -y BuildReport.log
+
+This will generate compile information in your build folder.
+-Y COMPILE_INFO -y BuildReport.log will add to your build folder the CompileInfo folder:
x:\Edk2\Build\EmulatorIA32\DEBUG_VS2019\CompileInfo
After parsing is completed, some files will be created in .edkCode folder on your workspace.
This is a list of all your the files in your source that were not used during compilation. The generation of this file can be disabled in the extension settings. This file is used by VSCODE to ignore unused files. You can toggle the use of .ignore file in search:
+This is the compilation database generated during build process. You can setup your C/C++ VSCODE plugging to use this compilation database to get better C parsing.
+To setup compile commands in your workspace, open C/C++: edit configurations (UI) in command palette. Under Advance Settings look for Compile commands property. Set the path for ${workspaceFolder}\.edkCode\compile_commands.json as shown in the following image:
The EDK2Code extension will detect if compile_commands.json exists and will prompt the user to update the configuration
This is the list of all your files used in compilation. This file is used by Cscope to help provide C definitions.
+ +Used to debug the extension development. Its recommended to keep on None unless you are debugging the Edk2Code extension.
+Generates .ignore file as part of source index process
Enable or disable cscope integration. When disabled, the cscope database will not be built or queried, and features that depend on it (call hierarchy, cscope-based Go to definition) will be unavailable.
A reload of VS Code is required after changing this setting.
+Port number used by the MCP SSE server started with EDK2: Start MCP SSE Server.
Default: 3100.
Overwrites the path used to invoke the cscope executable. Leave empty to use the one available on PATH.
A reload of VS Code is required after changing this setting.
+The workspace configuration controls which DSC files, build defines, and package paths the extension uses when parsing your EDK2 project.
+The easiest way to manage the workspace settings is through the graphical configuration panel. Open it from the Workspace view title bar ($(gear) icon) or via the command palette:
> EDK2: Workspace configuration (UI)
+
+
The panel lets you set:
+.dsc files for your platform (relative to the workspace root).-D (e.g. ARCH=X64).The settings are stored in .edkCode/edk2_workspace_properties.json inside your workspace. You can also edit this file directly or open it with:
> EDK2: Workspace configuration (JSON)
+
+{
+ "packagePaths": [],
+ "dscPaths": [
+ "OvmfPkg\\OvmfPkgX64.dsc"
+ ],
+ "buildDefines": [
+ "ARCH=X64"
+ ]
+}
+
+dscPaths — Each entry should be a main DSC file used for compilation.
+buildDefines — Definitions injected in your build command with -D. Add or modify entries to match your build.
++ +After any modification to this file, VS Code will prompt you to reload the index.
+
Before you start testing the functionality of the extension, please index your source code.
+You can check your workspace configuration with command:
+> EDK2: Workspace configuration (UI)
+
+This configuration will be automatically populated after you indexed your source code.
+DSC files for your workspaceYou can manually change this configuration. After any manual modification the user will be prompted to rescan the Index.
+When you open a file in the editor, you will see in the status bar a warning if the file you are looking has been compiled or not:
+The following commands are expected to work only on files that have been used in compilation.
+This commands are only accessible using the command palette (⌨F1)
+Will show a list of all the libraries compiled.
+Will show a list of all the modules compiled.
+This will clean up the current source index and will create a new one. See Quick start for details.
+This will use the previous index configuration and will recreate the index without changing the workspace settings
+After you source code has been indexed you will see some of the features of using Edk2Code extension
+++⚠ IMPORTANT Before continuing please index your code following this instructions
+
Right click on a source file name and then select Go To Definition (F12)
This will open the source file selected. This also works for LibraryClasses, Pcd and Packages:
The results shown are based on your DSC parsing.
+Start typing on the LibraryClasses section will show suggestions of libraries that can be included in that INF file:
This suggestions are based on DEC files in Packages section.
Right click on an anywhere in an INF file and select EDK2: Goto DSC Declaration
This will open the DSC file where this INF file was declared.
+If the INF file is a library, right click and select EDK2: Show Library usage:
This will show what modules are using your library:
+DSC files have full syntax highlighting for sections, conditionals (!if, !else, !endif), includes (!include), macros, PCDs, and module entries.
The Outline view shows all sections ([LibraryClasses], [Components], [PcdsFixedAtBuild], etc.) and their entries, allowing quick navigation within large DSC files.
DSC files will dim source that hasn't been compiled based on DEFINES. +You can see the value of the defines if you hover your mouse over.
+This also works with PCD values
Right click on a file path and select Go to Definition (F12) to open that file.
Right click and select Go to DSC Inclusion to see if this DSC file was included (!Include) in other DSC file.
DEC files have syntax highlighting for section headers, GUID definitions, PCD declarations, library class definitions, and include paths.
+The Outline view shows all sections ([Guids], [Protocols], [Ppis], [LibraryClasses], [Pcds*], etc.) for easy navigation.
Right on a function name and select Show Call Hierarchy:
This will open the References view with the call Hierarchy of the selected function. Edk2Code extension will filter unused calls from the view.
+When you are on a C file, Right click and select Go to INF:
This will open the .inf file that compiled that C file.
+Right click on a C symbol (function, variable, etc) and select EDK2: Go To Definition to open the symbol definition. This differs from regular Go to Definition command provided by VSCODE as this will uses CSCOPE and compiled files to query the definitions. Sometimes it gives better results.
VFR (Visual Forms Representation) files have syntax highlighting for form definitions, questions, one-of selections, checkboxes, strings, and other HII form elements.
+The Outline view shows the form set, individual forms, and their question elements, making it easy to navigate complex VFR layouts.
+ASL (ACPI Source Language) files have syntax highlighting for device definitions, methods, operators, named objects, and resource descriptors.
+The Outline view shows the ASL definition block structure including devices, methods, scopes, and named objects for easy navigation.
+Hover on keywords of your ASL code and you will see help extracted from ACPI specification (6.3)
+Start typing anywhere in your *.asl files and you will see autocomplete suggestions of ASL specification.
+Starting in version 2.0.0, the extension installs its own activity bar container. All Edk2Code views are grouped under this entry, which exposes two views: Workspace and Module Info.

The Workspace view shows your parsed EDK2 workspace as a single, persistent tree. It replaces the older Module Map, Library Tree and Reference Tree commands with one navigable hierarchy of DSC → INF → libraries / sources / headers.
+
When no workspace is loaded yet, the welcome view offers quick actions to discover build folders or open the configuration UI.
+
The view title bar exposes the following actions:
+| Action | +Command | +Description | +
|---|---|---|
$(gear) |
+EDK2: Workspace configuration (UI) |
+Open the graphical configuration panel. | +
$(repo) |
+EDK2: Select Workspace |
+Switch between loaded build configurations. | +
$(target) |
+EDK2: Reveal active editor in workspace tree |
+Locate the active file in the tree. | +
$(search) |
+EDK2: Search workspace tree |
+Find a node by name. | +
$(filter) |
+EDK2: Filter workspace symbols |
+Hide grayed-out / inactive elements. | +
$(copy) |
+EDK2: Copy workspace tree |
+Copy the tree (or a sub-tree) as text. | +
$(refresh) |
+EDK2: Refresh workspace config |
+Reload the workspace configuration. | +
$(close) |
+EDK2: Unload workspace |
+Clear the currently loaded configuration. | +
Additional capabilities:
+
The Module Info view shows EDK2 module information for the file currently open in the editor. As soon as you open a C, INF or related source file that belongs to a module, the view populates with:
+Double-click any entry to jump directly to the corresponding source location.
+
EDK2Code can scan your workspace and detect existing build output folders automatically — you don't need to point the extension at them manually.
+EDK2: Discover build folders scans the workspace.EDK2: Use discovered build folders loads the detected folders as workspace configurations.
You can compile an individual EDK2 C file directly from the editor without running a full EDK2 build:
+$(play)) icon is shown in the editor title bar on supported source files.EDK2: Compile Edk2 file invokes the compiler for the active .c file using the flags and include paths recorded in compile_commands.json.
++⚠ NOTE This compiles the single C file in isolation — it runs outside the regular EDK2 build system and does not link or produce a final binary. It is intended as a fast feedback loop to catch syntax and type errors in a single translation unit without waiting for a full platform build.
+⚠ REQUIREMENT This feature requires a
+compile_commands.jsonto be present in your workspace. This file is generated automatically when you enable compile information during your EDK2 build using the-Y COMPILE_INFOflag.
When a symbol is overwritten in a DSC (libraries, PCDs, modules), a new code action lets you jump to the overwriting definition instead of the original.
+
EDK2Code can expose a Model Context Protocol (MCP) SSE server so AI agents and tools (such as GitHub Copilot or other MCP-compatible clients) can query your parsed EDK2 workspace directly.
+
Open the Workspace configuration (UI) panel (EDK2: Workspace configuration (UI)) and use the Start MCP Server / Stop MCP Server button in the MCP section, or run the commands from the palette:
> EDK2: Start MCP SSE Server
+> EDK2: Stop MCP SSE Server
+
+The edk2code.mcpServerPort setting controls the listening port (default 3100).
To let VS Code and GitHub Copilot discover the server automatically, click Auto-configure workspace MCP in the Settings UI. This writes (or updates) the edk2code server entry in your workspace's .vscode/mcp.json file:
{
+ "servers": {
+ "edk2code": {
+ "type": "sse",
+ "url": "http://localhost:3100/sse"
+ }
+ }
+}
+
+Once this file exists, VS Code will list the edk2code server under MCP Servers in Copilot Chat and any other MCP-compatible client. See the VS Code MCP documentation for more details on how MCP servers work.
The EDK2Code Extension for Visual Studio Code enhances the development experience for engineers working with the EDK2 (UEFI) codebase by providing features such as syntax highlighting, code navigation, and error detection. This extension integrates these capabilities directly into Visual Studio Code, enabling developers to streamline their workflow and increase productivity.
+By leveraging the EDK2Code extension, developers can easily navigate through code, quickly identify errors, and benefit from improved readability of EDK2 source files. This results in a more efficient development process and a smoother coding experience.
+Additionally, the extension supports various EDK2-specific commands accessible via the command palette, such as rebuilding the index database and configuring the workspace. This comprehensive toolset empowers developers to work more effectively with EDK2 projects, ultimately leading to higher quality code and faster development cycles.
+Check YouTube video presentation on UEFIForum Channel
+ + + +Thanks for using the Edk2Code Vscode extension.
+🎉 If you find this extension useful 🎉:
+Shows problems in DSC files
+
Added context menu action Show Module Map. This action is available on INF files and will open EDK2 module map side panel to show:
+- Library tree
+- Source files tree (including Header files)
+
You can also copy the path of the element selected in EDK2 module map using mouse context menu.

The extension now lives in a dedicated activity bar container. All Edk2Code views (Workspace, Module Info) are grouped together in the sidebar instead of being attached to the Explorer view.
+
The new Workspace view is a single, persistent tree representation of your parsed EDK2 workspace. It replaces the previous Module Map, Reference Tree and Library Tree commands.
+
Key capabilities:
+Search — Click the $(search) action in the view title bar to find any node in the workspace tree.

Filter inactive elements — Toggle the $(filter) action to hide grayed-out (inactive) items.

Reveal active editor — The $(target) action jumps from the currently open file to its location in the workspace tree.

Drag and drop — Reorganize nodes in the workspace tree directly with the mouse.
+
Multiple workspaces — When multiple build configurations are loaded, switch between them from the $(repo) action in the title bar. Searching for symbols automatically switches to the workspace that owns the result.

Copy node path / Copy tree — Quickly copy the path of a node, or export the entire tree as text via the $(copy) action.
Welcome view — When no workspace is loaded, the view guides you through discovering build folders or opening the configuration UI.
+
The new Module Info view shows the EDK2 module information for the file you are currently editing. As soon as you open a C, INF or related source file that belongs to a module, the view populates with:
+Double-click any entry to jump directly to the corresponding source location.
+
EDK2Code can now scan your workspace and automatically detect existing build output folders, so you don't have to point the extension at them manually.
+EDK2: Discover build folders to scan the workspace.EDK2: Use discovered build folders to load them directly.
You can now compile an individual EDK2 file (e.g. a .c belonging to a module) directly from the editor.
$(play)) icon is shown in the editor title bar on supported source files.EDK2: Compile Edk2 file invokes the build for the parent module of the active file.
EDK2Code now exposes an MCP (Model Context Protocol) SSE server that lets AI agents and external tools query your parsed EDK2 workspace.
+EDK2: Start MCP SSE Server and stop with EDK2: Stop MCP SSE Server.edk2code.mcpServerPort setting (default 3100).
A redesigned graphical Workspace configuration (UI) panel makes managing build configurations easier — no more hand-editing JSON for common setups.
+$(gear) icon) or via the EDK2: Workspace configuration (UI) command.
When a symbol is overwritten in a DSC (libraries, PCDs, modules), a new code action lets you jump directly to the overwriting definition.
+
edk2code.useCscope setting lets you turn off cscope integration entirely. When disabled, the cscope database is not built or queried (call hierarchy and cscope-based go-to-definition become unavailable).EDK2: Unload workspace command to clear the currently loaded build configuration.^1.77.0Cscope is used for some C related functionality of the extension. On windows systems the cscope comes already included in the extension.
+For linux systems you need to install cscope manually.
+Ubuntu installation example: sudo apt install cscope
Additionally, you can use the vscode setting edk2code.cscopeOverwritePath to point cscope to your preferred installation path.
' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/search/search_index.json b/search/search_index.json new file mode 100755 index 0000000..725642d --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"EDK2Code Star The EDK2Code Extension for Visual Studio Code enhances the development experience for engineers working with the EDK2 (UEFI) codebase by providing features such as syntax highlighting, code navigation, and error detection. This extension integrates these capabilities directly into Visual Studio Code, enabling developers to streamline their workflow and increase productivity. By leveraging the EDK2Code extension, developers can easily navigate through code, quickly identify errors, and benefit from improved readability of EDK2 source files. This results in a more efficient development process and a smoother coding experience. Additionally, the extension supports various EDK2-specific commands accessible via the command palette, such as rebuilding the index database and configuring the workspace. This comprehensive toolset empowers developers to work more effectively with EDK2 projects, ultimately leading to higher quality code and faster development cycles. Check YouTube video presentation on UEFIForum Channel Github VSCODE","title":"EDK2Code"},{"location":"#edk2code","text":"Star The EDK2Code Extension for Visual Studio Code enhances the development experience for engineers working with the EDK2 (UEFI) codebase by providing features such as syntax highlighting, code navigation, and error detection. This extension integrates these capabilities directly into Visual Studio Code, enabling developers to streamline their workflow and increase productivity. By leveraging the EDK2Code extension, developers can easily navigate through code, quickly identify errors, and benefit from improved readability of EDK2 source files. This results in a more efficient development process and a smoother coding experience. Additionally, the extension supports various EDK2-specific commands accessible via the command palette, such as rebuilding the index database and configuring the workspace. This comprehensive toolset empowers developers to work more effectively with EDK2 projects, ultimately leading to higher quality code and faster development cycles. Check YouTube video presentation on UEFIForum Channel Github VSCODE","title":"EDK2Code"},{"location":"Index-source-code/","text":"Quick start Most of the extension functionality will work out of the box on any given EDK2 project. However it will have the full set of features enabled when the source code is compiled and the workspace is loaded. Loading the workspace When you open a folder that contains an EDK2 project, look for the Edk2Code icon in the activity bar on the left side of VS Code. Clicking it opens the Edk2Code sidebar, which contains the Workspace and Module Info views. The Workspace view will guide you through loading your build configuration. If nothing is loaded yet, you will see the welcome screen: Option 1 \u2014 Auto-discover build folders (recommended) If you have already compiled your EDK2 project, click Discover Build Folders . The extension will scan your workspace and detect all existing build output folders automatically. Once discovery completes, click Use discovered folders to load the detected configurations. The Workspace view will populate with your DSC, INF, and source file hierarchy. You can also trigger this at any time from the command palette : > EDK2: Discover build folders > EDK2: Use discovered build folders Option 2 \u2014 Manual configuration Click Open EDK2 Configuration (or run EDK2: Workspace configuration (UI) ) to open the settings panel and manually specify: DSC paths \u2014 the main .dsc files for your platform Build Defines \u2014 any -D flags used in your build command Package paths \u2014 extra package roots passed to the build > EDK2: Workspace configuration (UI) Rebuild / Rescan To force a full re-index after a new build, use: > EDK2: Rebuild index database To reload using the existing configuration without changing any settings: > EDK2: Rescan index database Enable compile information You can use the compile information build feature from EDK2 to provide more build information to the extension. This is optional but recommended To enable the compile information you need to enable the build report flag in the EDK2 build command and set -Y COMPILE_INFO . You can check more information about EDK build process here For example, if you want to build EmulatorPkg from EDK2 source, your build command will look like this: build -p EmulatorPkg\\EmulatorPkg.dsc -t VS2019 -a IA32 -Y COMPILE_INFO -y BuildReport.log This will generate compile information in your build folder. -Y COMPILE_INFO -y BuildReport.log will add to your build folder the CompileInfo folder: x:\\Edk2\\Build\\EmulatorIA32\\DEBUG_VS2019\\CompileInfo Files produced after parsing After parsing is completed, some files will be created in .edkCode folder on your workspace. .ignore This is a list of all your the files in your source that were not used during compilation. The generation of this file can be disabled in the extension settings. This file is used by VSCODE to ignore unused files. You can toggle the use of .ignore file in search: compile_commands.json This is the compilation database generated during build process. You can setup your C/C++ VSCODE plugging to use this compilation database to get better C parsing. To setup compile commands in your workspace, open C/C++: edit configurations (UI) in command palette. Under Advance Settings look for Compile commands property. Set the path for ${workspaceFolder}\\.edkCode\\compile_commands.json as shown in the following image: The EDK2Code extension will detect if compile_commands.json exists and will prompt the user to update the configuration cscope.files This is the list of all your files used in compilation. This file is used by Cscope to help provide C definitions.","title":"Quick start"},{"location":"Index-source-code/#quick-start","text":"Most of the extension functionality will work out of the box on any given EDK2 project. However it will have the full set of features enabled when the source code is compiled and the workspace is loaded.","title":"Quick start"},{"location":"Index-source-code/#loading-the-workspace","text":"When you open a folder that contains an EDK2 project, look for the Edk2Code icon in the activity bar on the left side of VS Code. Clicking it opens the Edk2Code sidebar, which contains the Workspace and Module Info views. The Workspace view will guide you through loading your build configuration. If nothing is loaded yet, you will see the welcome screen:","title":"Loading the workspace"},{"location":"Index-source-code/#option-1-auto-discover-build-folders-recommended","text":"If you have already compiled your EDK2 project, click Discover Build Folders . The extension will scan your workspace and detect all existing build output folders automatically. Once discovery completes, click Use discovered folders to load the detected configurations. The Workspace view will populate with your DSC, INF, and source file hierarchy. You can also trigger this at any time from the command palette : > EDK2: Discover build folders > EDK2: Use discovered build folders","title":"Option 1 \u2014 Auto-discover build folders (recommended)"},{"location":"Index-source-code/#option-2-manual-configuration","text":"Click Open EDK2 Configuration (or run EDK2: Workspace configuration (UI) ) to open the settings panel and manually specify: DSC paths \u2014 the main .dsc files for your platform Build Defines \u2014 any -D flags used in your build command Package paths \u2014 extra package roots passed to the build > EDK2: Workspace configuration (UI)","title":"Option 2 \u2014 Manual configuration"},{"location":"Index-source-code/#rebuild-rescan","text":"To force a full re-index after a new build, use: > EDK2: Rebuild index database To reload using the existing configuration without changing any settings: > EDK2: Rescan index database","title":"Rebuild / Rescan"},{"location":"Index-source-code/#enable-compile-information","text":"You can use the compile information build feature from EDK2 to provide more build information to the extension. This is optional but recommended To enable the compile information you need to enable the build report flag in the EDK2 build command and set -Y COMPILE_INFO . You can check more information about EDK build process here For example, if you want to build EmulatorPkg from EDK2 source, your build command will look like this: build -p EmulatorPkg\\EmulatorPkg.dsc -t VS2019 -a IA32 -Y COMPILE_INFO -y BuildReport.log This will generate compile information in your build folder. -Y COMPILE_INFO -y BuildReport.log will add to your build folder the CompileInfo folder: x:\\Edk2\\Build\\EmulatorIA32\\DEBUG_VS2019\\CompileInfo","title":"Enable compile information"},{"location":"Index-source-code/#files-produced-after-parsing","text":"After parsing is completed, some files will be created in .edkCode folder on your workspace.","title":"Files produced after parsing"},{"location":"Index-source-code/#ignore","text":"This is a list of all your the files in your source that were not used during compilation. The generation of this file can be disabled in the extension settings. This file is used by VSCODE to ignore unused files. You can toggle the use of .ignore file in search:","title":".ignore"},{"location":"Index-source-code/#compile_commandsjson","text":"This is the compilation database generated during build process. You can setup your C/C++ VSCODE plugging to use this compilation database to get better C parsing. To setup compile commands in your workspace, open C/C++: edit configurations (UI) in command palette. Under Advance Settings look for Compile commands property. Set the path for ${workspaceFolder}\\.edkCode\\compile_commands.json as shown in the following image: The EDK2Code extension will detect if compile_commands.json exists and will prompt the user to update the configuration","title":"compile_commands.json"},{"location":"Index-source-code/#cscopefiles","text":"This is the list of all your files used in compilation. This file is used by Cscope to help provide C definitions.","title":"cscope.files"},{"location":"requirements/","text":"Requirements Visual Studio Code ^1.77.0 Cscope Cscope is used for some C related functionality of the extension. On windows systems the cscope comes already included in the extension. For linux systems you need to install cscope manually. Ubuntu installation example: sudo apt install cscope Additionally, you can use the vscode setting edk2code.cscopeOverwritePath to point cscope to your preferred installation path.","title":"Requirements"},{"location":"requirements/#requirements","text":"","title":"Requirements"},{"location":"requirements/#visual-studio-code-1770","text":"","title":"Visual Studio Code ^1.77.0"},{"location":"requirements/#cscope","text":"Cscope is used for some C related functionality of the extension. On windows systems the cscope comes already included in the extension. For linux systems you need to install cscope manually. Ubuntu installation example: sudo apt install cscope Additionally, you can use the vscode setting edk2code.cscopeOverwritePath to point cscope to your preferred installation path.","title":"Cscope"},{"location":"documentation/","text":"Index database","title":"Index database"},{"location":"documentation/#index-database","text":"","title":"Index database"},{"location":"documentation/Settings/","text":"Extension settings Edk2code: Log Level Used to debug the extension development. Its recommended to keep on None unless you are debugging the Edk2Code extension. Edk2code: Generate Ignore File Generates .ignore file as part of source index process Edk2code: Use Cscope Enable or disable cscope integration. When disabled, the cscope database will not be built or queried, and features that depend on it (call hierarchy, cscope-based Go to definition ) will be unavailable. A reload of VS Code is required after changing this setting. Edk2code: Mcp Server Port Port number used by the MCP SSE server started with EDK2: Start MCP SSE Server . Default: 3100 . Edk2code: Cscope Overwrite Path Overwrites the path used to invoke the cscope executable. Leave empty to use the one available on PATH . A reload of VS Code is required after changing this setting.","title":"Extension settings"},{"location":"documentation/Settings/#extension-settings","text":"","title":"Extension settings"},{"location":"documentation/Settings/#edk2code-log-level","text":"Used to debug the extension development. Its recommended to keep on None unless you are debugging the Edk2Code extension.","title":"Edk2code: Log Level"},{"location":"documentation/Settings/#edk2code-generate-ignore-file","text":"Generates .ignore file as part of source index process","title":"Edk2code: Generate Ignore File"},{"location":"documentation/Settings/#edk2code-use-cscope","text":"Enable or disable cscope integration. When disabled, the cscope database will not be built or queried, and features that depend on it (call hierarchy, cscope-based Go to definition ) will be unavailable. A reload of VS Code is required after changing this setting.","title":"Edk2code: Use Cscope"},{"location":"documentation/Settings/#edk2code-mcp-server-port","text":"Port number used by the MCP SSE server started with EDK2: Start MCP SSE Server . Default: 3100 .","title":"Edk2code: Mcp Server Port"},{"location":"documentation/Settings/#edk2code-cscope-overwrite-path","text":"Overwrites the path used to invoke the cscope executable. Leave empty to use the one available on PATH . A reload of VS Code is required after changing this setting.","title":"Edk2code: Cscope Overwrite Path"},{"location":"documentation/Workspace-settings/","text":"Workspace settings The workspace configuration controls which DSC files, build defines, and package paths the extension uses when parsing your EDK2 project. Configuration UI The easiest way to manage the workspace settings is through the graphical configuration panel. Open it from the Workspace view title bar ( $(gear) icon) or via the command palette: > EDK2: Workspace configuration (UI) The panel lets you set: DSC paths \u2014 the main .dsc files for your platform (relative to the workspace root). Build Defines \u2014 definitions injected in your build command with -D (e.g. ARCH=X64 ). Package paths \u2014 additional package roots passed to the EDK2 build. Configuration file The settings are stored in .edkCode/edk2_workspace_properties.json inside your workspace. You can also edit this file directly or open it with: > EDK2: Workspace configuration (JSON) { \"packagePaths\": [], \"dscPaths\": [ \"OvmfPkg\\\\OvmfPkgX64.dsc\" ], \"buildDefines\": [ \"ARCH=X64\" ] } dscPaths \u2014 Each entry should be a main DSC file used for compilation. buildDefines \u2014 Definitions injected in your build command with -D . Add or modify entries to match your build. After any modification to this file, VS Code will prompt you to reload the index.","title":"Workspace settings"},{"location":"documentation/Workspace-settings/#workspace-settings","text":"The workspace configuration controls which DSC files, build defines, and package paths the extension uses when parsing your EDK2 project.","title":"Workspace settings"},{"location":"documentation/Workspace-settings/#configuration-ui","text":"The easiest way to manage the workspace settings is through the graphical configuration panel. Open it from the Workspace view title bar ( $(gear) icon) or via the command palette: > EDK2: Workspace configuration (UI) The panel lets you set: DSC paths \u2014 the main .dsc files for your platform (relative to the workspace root). Build Defines \u2014 definitions injected in your build command with -D (e.g. ARCH=X64 ). Package paths \u2014 additional package roots passed to the EDK2 build.","title":"Configuration UI"},{"location":"documentation/Workspace-settings/#configuration-file","text":"The settings are stored in .edkCode/edk2_workspace_properties.json inside your workspace. You can also edit this file directly or open it with: > EDK2: Workspace configuration (JSON) { \"packagePaths\": [], \"dscPaths\": [ \"OvmfPkg\\\\OvmfPkgX64.dsc\" ], \"buildDefines\": [ \"ARCH=X64\" ] } dscPaths \u2014 Each entry should be a main DSC file used for compilation. buildDefines \u2014 Definitions injected in your build command with -D . Add or modify entries to match your build. After any modification to this file, VS Code will prompt you to reload the index.","title":"Configuration file"},{"location":"documentation/documentation/","text":"Documentation Before you start testing the functionality of the extension, please index your source code . Configuration You can check your workspace configuration with command: > EDK2: Workspace configuration (UI) This configuration will be automatically populated after you indexed your source code . DSC relative path Are the main DSC files for your workspace Build Defines Build defines that were injected in your EDK2 build command Package paths are the paths set for the EDK2 Build command. You can manually change this configuration. After any manual modification the user will be prompted to rescan the Index. Interface Status bar When you open a file in the editor, you will see in the status bar a warning if the file you are looking has been compiled or not: The following commands are expected to work only on files that have been used in compilation. Global commands This commands are only accessible using the command palette (\u2328F1) EDK2: Open library Will show a list of all the libraries compiled. EDK2: Open Module Will show a list of all the modules compiled. EDK2: Rebuild index database This will clean up the current source index and will create a new one. See Quick start for details. EDK2: Rescan index database This will use the previous index configuration and will recreate the index without changing the workspace settings EDK2 language support After you source code has been indexed you will see some of the features of using Edk2Code extension \u26a0 IMPORTANT Before continuing please index your code following this instructions INF files Inf files will show syntax highlight: Outline tree Source goto definition Right click on a source file name and then select Go To Definition (F12) This will open the source file selected. This also works for LibraryClasses , Pcd and Packages : The results shown are based on your DSC parsing. LibraryClasses Auto completion Start typing on the LibraryClasses section will show suggestions of libraries that can be included in that INF file: This suggestions are based on DEC files in Packages section. Goto DSC Declaration Right click on an anywhere in an INF file and select EDK2: Goto DSC Declaration This will open the DSC file where this INF file was declared. Library usage If the INF file is a library, right click and select EDK2: Show Library usage : This will show what modules are using your library: DSC Files Syntax highlight DSC files have full syntax highlighting for sections, conditionals ( !if , !else , !endif ), includes ( !include ), macros, PCDs, and module entries. Outline The Outline view shows all sections ( [LibraryClasses] , [Components] , [PcdsFixedAtBuild] , etc.) and their entries, allowing quick navigation within large DSC files. Variable defines resolution DSC files will dim source that hasn't been compiled based on DEFINES. You can see the value of the defines if you hover your mouse over. This also works with PCD values Goto Definition Right click on a file path and select Go to Definition (F12) to open that file. Goto DSC inclusion Right click and select Go to DSC Inclusion to see if this DSC file was included ( !Include ) in other DSC file. DEC Syntax highlight DEC files have syntax highlighting for section headers, GUID definitions, PCD declarations, library class definitions, and include paths. Outline The Outline view shows all sections ( [Guids] , [Protocols] , [Ppis] , [LibraryClasses] , [Pcds*] , etc.) for easy navigation. C files Call Hierarchy Right on a function name and select Show Call Hierarchy : This will open the References view with the call Hierarchy of the selected function. Edk2Code extension will filter unused calls from the view. Go to INF When you are on a C file, Right click and select Go to INF : This will open the .inf file that compiled that C file. Go to Definition Right click on a C symbol (function, variable, etc) and select EDK2: Go To Definition to open the symbol definition. This differs from regular Go to Definition command provided by VSCODE as this will uses CSCOPE and compiled files to query the definitions. Sometimes it gives better results. VFR Syntax highlight VFR (Visual Forms Representation) files have syntax highlighting for form definitions, questions, one-of selections, checkboxes, strings, and other HII form elements. Outline The Outline view shows the form set, individual forms, and their question elements, making it easy to navigate complex VFR layouts. ACPI Syntax highlight ASL (ACPI Source Language) files have syntax highlighting for device definitions, methods, operators, named objects, and resource descriptors. Outline The Outline view shows the ASL definition block structure including devices, methods, scopes, and named objects for easy navigation. Help Hover on keywords of your ASL code and you will see help extracted from ACPI specification (6.3) Auto complete Start typing anywhere in your *.asl files and you will see autocomplete suggestions of ASL specification. Edk2Code sidebar Starting in version 2.0.0 , the extension installs its own activity bar container. All Edk2Code views are grouped under this entry, which exposes two views: Workspace and Module Info . Workspace view The Workspace view shows your parsed EDK2 workspace as a single, persistent tree. It replaces the older Module Map , Library Tree and Reference Tree commands with one navigable hierarchy of DSC \u2192 INF \u2192 libraries / sources / headers. When no workspace is loaded yet, the welcome view offers quick actions to discover build folders or open the configuration UI. The view title bar exposes the following actions: Action Command Description $(gear) EDK2: Workspace configuration (UI) Open the graphical configuration panel. $(repo) EDK2: Select Workspace Switch between loaded build configurations. $(target) EDK2: Reveal active editor in workspace tree Locate the active file in the tree. $(search) EDK2: Search workspace tree Find a node by name. $(filter) EDK2: Filter workspace symbols Hide grayed-out / inactive elements. $(copy) EDK2: Copy workspace tree Copy the tree (or a sub-tree) as text. $(refresh) EDK2: Refresh workspace config Reload the workspace configuration. $(close) EDK2: Unload workspace Clear the currently loaded configuration. Additional capabilities: Drag and drop to rearrange tree nodes. Right-click \u2192 Copy path on any node. Searching for symbols from the command palette will automatically switch to the workspace that owns the result. Module Info view The Module Info view shows EDK2 module information for the file currently open in the editor. As soon as you open a C, INF or related source file that belongs to a module, the view populates with: The owning INF and its DSC declaration Libraries linked to the module Quick navigation actions (go to definition, open file, go to DSC declaration) Double-click any entry to jump directly to the corresponding source location. Build folder auto-discovery EDK2Code can scan your workspace and detect existing build output folders automatically \u2014 you don't need to point the extension at them manually. EDK2: Discover build folders scans the workspace. EDK2: Use discovered build folders loads the detected folders as workspace configurations. The Workspace welcome view exposes both actions when nothing is loaded yet. Compile EDK2 file You can compile an individual EDK2 C file directly from the editor without running a full EDK2 build: A play ( $(play) ) icon is shown in the editor title bar on supported source files. The command EDK2: Compile Edk2 file invokes the compiler for the active .c file using the flags and include paths recorded in compile_commands.json . \u26a0 NOTE This compiles the single C file in isolation \u2014 it runs outside the regular EDK2 build system and does not link or produce a final binary. It is intended as a fast feedback loop to catch syntax and type errors in a single translation unit without waiting for a full platform build. \u26a0 REQUIREMENT This feature requires a compile_commands.json to be present in your workspace. This file is generated automatically when you enable compile information during your EDK2 build using the -Y COMPILE_INFO flag. Goto overwriting definition When a symbol is overwritten in a DSC (libraries, PCDs, modules), a new code action lets you jump to the overwriting definition instead of the original. MCP server EDK2Code can expose a Model Context Protocol (MCP) SSE server so AI agents and tools (such as GitHub Copilot or other MCP-compatible clients) can query your parsed EDK2 workspace directly. Starting and stopping Open the Workspace configuration (UI) panel ( EDK2: Workspace configuration (UI) ) and use the Start MCP Server / Stop MCP Server button in the MCP section, or run the commands from the palette: > EDK2: Start MCP SSE Server > EDK2: Stop MCP SSE Server The edk2code.mcpServerPort setting controls the listening port (default 3100 ). Auto-configure workspace MCP To let VS Code and GitHub Copilot discover the server automatically, click Auto-configure workspace MCP in the Settings UI. This writes (or updates) the edk2code server entry in your workspace's .vscode/mcp.json file: { \"servers\": { \"edk2code\": { \"type\": \"sse\", \"url\": \"http://localhost:3100/sse\" } } } Once this file exists, VS Code will list the edk2code server under MCP Servers in Copilot Chat and any other MCP-compatible client. See the VS Code MCP documentation for more details on how MCP servers work.","title":"Documentation"},{"location":"documentation/documentation/#documentation","text":"Before you start testing the functionality of the extension, please index your source code .","title":"Documentation"},{"location":"documentation/documentation/#configuration","text":"You can check your workspace configuration with command: > EDK2: Workspace configuration (UI) This configuration will be automatically populated after you indexed your source code . DSC relative path Are the main DSC files for your workspace Build Defines Build defines that were injected in your EDK2 build command Package paths are the paths set for the EDK2 Build command. You can manually change this configuration. After any manual modification the user will be prompted to rescan the Index.","title":"Configuration"},{"location":"documentation/documentation/#interface","text":"","title":"Interface"},{"location":"documentation/documentation/#status-bar","text":"When you open a file in the editor, you will see in the status bar a warning if the file you are looking has been compiled or not: The following commands are expected to work only on files that have been used in compilation.","title":"Status bar"},{"location":"documentation/documentation/#global-commands","text":"This commands are only accessible using the command palette (\u2328F1)","title":"Global commands"},{"location":"documentation/documentation/#edk2-open-library","text":"Will show a list of all the libraries compiled.","title":"EDK2: Open library"},{"location":"documentation/documentation/#edk2-open-module","text":"Will show a list of all the modules compiled.","title":"EDK2: Open Module"},{"location":"documentation/documentation/#edk2-rebuild-index-database","text":"This will clean up the current source index and will create a new one. See Quick start for details.","title":"EDK2: Rebuild index database"},{"location":"documentation/documentation/#edk2-rescan-index-database","text":"This will use the previous index configuration and will recreate the index without changing the workspace settings","title":"EDK2: Rescan index database"},{"location":"documentation/documentation/#edk2-language-support","text":"After you source code has been indexed you will see some of the features of using Edk2Code extension \u26a0 IMPORTANT Before continuing please index your code following this instructions","title":"EDK2 language support"},{"location":"documentation/documentation/#inf-files","text":"","title":"INF files"},{"location":"documentation/documentation/#inf-files-will-show-syntax-highlight","text":"","title":"Inf files will show syntax highlight:"},{"location":"documentation/documentation/#outline-tree","text":"","title":"Outline tree"},{"location":"documentation/documentation/#source-goto-definition","text":"Right click on a source file name and then select Go To Definition (F12) This will open the source file selected. This also works for LibraryClasses , Pcd and Packages : The results shown are based on your DSC parsing.","title":"Source goto definition"},{"location":"documentation/documentation/#libraryclasses-auto-completion","text":"Start typing on the LibraryClasses section will show suggestions of libraries that can be included in that INF file: This suggestions are based on DEC files in Packages section.","title":"LibraryClasses Auto completion"},{"location":"documentation/documentation/#goto-dsc-declaration","text":"Right click on an anywhere in an INF file and select EDK2: Goto DSC Declaration This will open the DSC file where this INF file was declared.","title":"Goto DSC Declaration"},{"location":"documentation/documentation/#library-usage","text":"If the INF file is a library, right click and select EDK2: Show Library usage : This will show what modules are using your library:","title":"Library usage"},{"location":"documentation/documentation/#dsc-files","text":"","title":"DSC Files"},{"location":"documentation/documentation/#syntax-highlight","text":"DSC files have full syntax highlighting for sections, conditionals ( !if , !else , !endif ), includes ( !include ), macros, PCDs, and module entries.","title":"Syntax highlight"},{"location":"documentation/documentation/#outline","text":"The Outline view shows all sections ( [LibraryClasses] , [Components] , [PcdsFixedAtBuild] , etc.) and their entries, allowing quick navigation within large DSC files.","title":"Outline"},{"location":"documentation/documentation/#variable-defines-resolution","text":"DSC files will dim source that hasn't been compiled based on DEFINES. You can see the value of the defines if you hover your mouse over. This also works with PCD values","title":"Variable defines resolution"},{"location":"documentation/documentation/#goto-definition","text":"Right click on a file path and select Go to Definition (F12) to open that file.","title":"Goto Definition"},{"location":"documentation/documentation/#goto-dsc-inclusion","text":"Right click and select Go to DSC Inclusion to see if this DSC file was included ( !Include ) in other DSC file.","title":"Goto DSC inclusion"},{"location":"documentation/documentation/#dec","text":"","title":"DEC"},{"location":"documentation/documentation/#syntax-highlight_1","text":"DEC files have syntax highlighting for section headers, GUID definitions, PCD declarations, library class definitions, and include paths.","title":"Syntax highlight"},{"location":"documentation/documentation/#outline_1","text":"The Outline view shows all sections ( [Guids] , [Protocols] , [Ppis] , [LibraryClasses] , [Pcds*] , etc.) for easy navigation.","title":"Outline"},{"location":"documentation/documentation/#c-files","text":"","title":"C files"},{"location":"documentation/documentation/#call-hierarchy","text":"Right on a function name and select Show Call Hierarchy : This will open the References view with the call Hierarchy of the selected function. Edk2Code extension will filter unused calls from the view.","title":"Call Hierarchy"},{"location":"documentation/documentation/#go-to-inf","text":"When you are on a C file, Right click and select Go to INF : This will open the .inf file that compiled that C file.","title":"Go to INF"},{"location":"documentation/documentation/#go-to-definition","text":"Right click on a C symbol (function, variable, etc) and select EDK2: Go To Definition to open the symbol definition. This differs from regular Go to Definition command provided by VSCODE as this will uses CSCOPE and compiled files to query the definitions. Sometimes it gives better results.","title":"Go to Definition"},{"location":"documentation/documentation/#vfr","text":"","title":"VFR"},{"location":"documentation/documentation/#syntax-highlight_2","text":"VFR (Visual Forms Representation) files have syntax highlighting for form definitions, questions, one-of selections, checkboxes, strings, and other HII form elements.","title":"Syntax highlight"},{"location":"documentation/documentation/#outline_2","text":"The Outline view shows the form set, individual forms, and their question elements, making it easy to navigate complex VFR layouts.","title":"Outline"},{"location":"documentation/documentation/#acpi","text":"","title":"ACPI"},{"location":"documentation/documentation/#syntax-highlight_3","text":"ASL (ACPI Source Language) files have syntax highlighting for device definitions, methods, operators, named objects, and resource descriptors.","title":"Syntax highlight"},{"location":"documentation/documentation/#outline_3","text":"The Outline view shows the ASL definition block structure including devices, methods, scopes, and named objects for easy navigation.","title":"Outline"},{"location":"documentation/documentation/#help","text":"Hover on keywords of your ASL code and you will see help extracted from ACPI specification (6.3)","title":"Help"},{"location":"documentation/documentation/#auto-complete","text":"Start typing anywhere in your *.asl files and you will see autocomplete suggestions of ASL specification.","title":"Auto complete"},{"location":"documentation/documentation/#edk2code-sidebar","text":"Starting in version 2.0.0 , the extension installs its own activity bar container. All Edk2Code views are grouped under this entry, which exposes two views: Workspace and Module Info .","title":"Edk2Code sidebar"},{"location":"documentation/documentation/#workspace-view","text":"The Workspace view shows your parsed EDK2 workspace as a single, persistent tree. It replaces the older Module Map , Library Tree and Reference Tree commands with one navigable hierarchy of DSC \u2192 INF \u2192 libraries / sources / headers. When no workspace is loaded yet, the welcome view offers quick actions to discover build folders or open the configuration UI. The view title bar exposes the following actions: Action Command Description $(gear) EDK2: Workspace configuration (UI) Open the graphical configuration panel. $(repo) EDK2: Select Workspace Switch between loaded build configurations. $(target) EDK2: Reveal active editor in workspace tree Locate the active file in the tree. $(search) EDK2: Search workspace tree Find a node by name. $(filter) EDK2: Filter workspace symbols Hide grayed-out / inactive elements. $(copy) EDK2: Copy workspace tree Copy the tree (or a sub-tree) as text. $(refresh) EDK2: Refresh workspace config Reload the workspace configuration. $(close) EDK2: Unload workspace Clear the currently loaded configuration. Additional capabilities: Drag and drop to rearrange tree nodes. Right-click \u2192 Copy path on any node. Searching for symbols from the command palette will automatically switch to the workspace that owns the result.","title":"Workspace view"},{"location":"documentation/documentation/#module-info-view","text":"The Module Info view shows EDK2 module information for the file currently open in the editor. As soon as you open a C, INF or related source file that belongs to a module, the view populates with: The owning INF and its DSC declaration Libraries linked to the module Quick navigation actions (go to definition, open file, go to DSC declaration) Double-click any entry to jump directly to the corresponding source location.","title":"Module Info view"},{"location":"documentation/documentation/#build-folder-auto-discovery","text":"EDK2Code can scan your workspace and detect existing build output folders automatically \u2014 you don't need to point the extension at them manually. EDK2: Discover build folders scans the workspace. EDK2: Use discovered build folders loads the detected folders as workspace configurations. The Workspace welcome view exposes both actions when nothing is loaded yet.","title":"Build folder auto-discovery"},{"location":"documentation/documentation/#compile-edk2-file","text":"You can compile an individual EDK2 C file directly from the editor without running a full EDK2 build: A play ( $(play) ) icon is shown in the editor title bar on supported source files. The command EDK2: Compile Edk2 file invokes the compiler for the active .c file using the flags and include paths recorded in compile_commands.json . \u26a0 NOTE This compiles the single C file in isolation \u2014 it runs outside the regular EDK2 build system and does not link or produce a final binary. It is intended as a fast feedback loop to catch syntax and type errors in a single translation unit without waiting for a full platform build. \u26a0 REQUIREMENT This feature requires a compile_commands.json to be present in your workspace. This file is generated automatically when you enable compile information during your EDK2 build using the -Y COMPILE_INFO flag.","title":"Compile EDK2 file"},{"location":"documentation/documentation/#goto-overwriting-definition","text":"When a symbol is overwritten in a DSC (libraries, PCDs, modules), a new code action lets you jump to the overwriting definition instead of the original.","title":"Goto overwriting definition"},{"location":"documentation/documentation/#mcp-server","text":"EDK2Code can expose a Model Context Protocol (MCP) SSE server so AI agents and tools (such as GitHub Copilot or other MCP-compatible clients) can query your parsed EDK2 workspace directly.","title":"MCP server"},{"location":"documentation/documentation/#starting-and-stopping","text":"Open the Workspace configuration (UI) panel ( EDK2: Workspace configuration (UI) ) and use the Start MCP Server / Stop MCP Server button in the MCP section, or run the commands from the palette: > EDK2: Start MCP SSE Server > EDK2: Stop MCP SSE Server The edk2code.mcpServerPort setting controls the listening port (default 3100 ).","title":"Starting and stopping"},{"location":"documentation/documentation/#auto-configure-workspace-mcp","text":"To let VS Code and GitHub Copilot discover the server automatically, click Auto-configure workspace MCP in the Settings UI. This writes (or updates) the edk2code server entry in your workspace's .vscode/mcp.json file: { \"servers\": { \"edk2code\": { \"type\": \"sse\", \"url\": \"http://localhost:3100/sse\" } } } Once this file exists, VS Code will list the edk2code server under MCP Servers in Copilot Chat and any other MCP-compatible client. See the VS Code MCP documentation for more details on how MCP servers work.","title":"Auto-configure workspace MCP"},{"location":"releases/1.0.9/","text":"Thanks for using the Edk2Code Vscode extension. \ud83c\udf89 If you find this extension useful \ud83c\udf89: \u2b50 Give a start on Github \ud83d\udcdc Leave a review in Vscode marketplace 1.0.9 DSC analysis Shows problems in DSC files Module map Added context menu action Show Module Map . This action is available on INF files and will open EDK2 module map side panel to show: - Library tree - Source files tree (including Header files) You can also copy the path of the element selected in EDK2 module map using mouse context menu.","title":"1.0.9"},{"location":"releases/1.0.9/#109","text":"","title":"1.0.9"},{"location":"releases/1.0.9/#dsc-analysis","text":"Shows problems in DSC files","title":"DSC analysis"},{"location":"releases/1.0.9/#module-map","text":"Added context menu action Show Module Map . This action is available on INF files and will open EDK2 module map side panel to show: - Library tree - Source files tree (including Header files) You can also copy the path of the element selected in EDK2 module map using mouse context menu.","title":"Module map"},{"location":"releases/2.0.0/","text":"2.0.0 Edk2Code sidebar The extension now lives in a dedicated activity bar container . All Edk2Code views (Workspace, Module Info) are grouped together in the sidebar instead of being attached to the Explorer view. Workspace view The new Workspace view is a single, persistent tree representation of your parsed EDK2 workspace. It replaces the previous Module Map , Reference Tree and Library Tree commands. Key capabilities: Sub-trees and includes \u2014 DSC, INF, FDF and source files are organized hierarchically. Header includes and library sub-trees are integrated into the tree. Search \u2014 Click the $(search) action in the view title bar to find any node in the workspace tree. Filter inactive elements \u2014 Toggle the $(filter) action to hide grayed-out (inactive) items. Reveal active editor \u2014 The $(target) action jumps from the currently open file to its location in the workspace tree. Drag and drop \u2014 Reorganize nodes in the workspace tree directly with the mouse. Multiple workspaces \u2014 When multiple build configurations are loaded, switch between them from the $(repo) action in the title bar. Searching for symbols automatically switches to the workspace that owns the result. Copy node path / Copy tree \u2014 Quickly copy the path of a node, or export the entire tree as text via the $(copy) action. Welcome view \u2014 When no workspace is loaded, the view guides you through discovering build folders or opening the configuration UI. Module Info view The new Module Info view shows the EDK2 module information for the file you are currently editing. As soon as you open a C, INF or related source file that belongs to a module, the view populates with: The owning INF and its DSC declaration Libraries linked to the module Quick navigation actions (go to definition, open file, go to DSC declaration) Double-click any entry to jump directly to the corresponding source location. Build folder auto-discovery EDK2Code can now scan your workspace and automatically detect existing build output folders, so you don't have to point the extension at them manually. Run EDK2: Discover build folders to scan the workspace. Once discovered, run EDK2: Use discovered build folders to load them directly. The Workspace view welcome page surfaces these actions when nothing is loaded yet. Compile EDK2 file You can now compile an individual EDK2 file (e.g. a .c belonging to a module) directly from the editor. A play ( $(play) ) icon is shown in the editor title bar on supported source files. The command EDK2: Compile Edk2 file invokes the build for the parent module of the active file. MCP server integration EDK2Code now exposes an MCP (Model Context Protocol) SSE server that lets AI agents and external tools query your parsed EDK2 workspace. Start with EDK2: Start MCP SSE Server and stop with EDK2: Stop MCP SSE Server . Configure the listening port via the edk2code.mcpServerPort setting (default 3100 ). Settings UI A redesigned graphical Workspace configuration (UI) panel makes managing build configurations easier \u2014 no more hand-editing JSON for common setups. Launch from the Workspace view title bar ( $(gear) icon) or via the EDK2: Workspace configuration (UI) command. Goto overwriting definition When a symbol is overwritten in a DSC (libraries, PCDs, modules), a new code action lets you jump directly to the overwriting definition. Other improvements Disable cscope \u2014 A new edk2code.useCscope setting lets you turn off cscope integration entirely. When disabled, the cscope database is not built or queried (call hierarchy and cscope-based go-to-definition become unavailable). Unload workspace \u2014 New EDK2: Unload workspace command to clear the currently loaded build configuration. Refresh workspace config \u2014 Reload the workspace configuration without restarting VS Code. Focus INF from C files \u2014 Improved navigation from C source files back to their owning INF module. Better module symbols \u2014 DSC parser now recognizes module sub-context sections, build options, and provides improved symbols for libraries and modules. Loading and discovery indicators \u2014 Progress indicators are shown while the workspace is being parsed or build folders are being discovered. Improved grayout controller \u2014 Inactive code regions are computed and updated more reliably. Path improvements \u2014 Missing paths now report folders instead of file names, and tooltips include the full path. Extensive test suite \u2014 New parser and workspace tests covering ASL, DEC, DSC, FDF, INF and VFR.","title":"2.0.0"},{"location":"releases/2.0.0/#200","text":"","title":"2.0.0"},{"location":"releases/2.0.0/#edk2code-sidebar","text":"The extension now lives in a dedicated activity bar container . All Edk2Code views (Workspace, Module Info) are grouped together in the sidebar instead of being attached to the Explorer view.","title":"Edk2Code sidebar"},{"location":"releases/2.0.0/#workspace-view","text":"The new Workspace view is a single, persistent tree representation of your parsed EDK2 workspace. It replaces the previous Module Map , Reference Tree and Library Tree commands. Key capabilities: Sub-trees and includes \u2014 DSC, INF, FDF and source files are organized hierarchically. Header includes and library sub-trees are integrated into the tree. Search \u2014 Click the $(search) action in the view title bar to find any node in the workspace tree. Filter inactive elements \u2014 Toggle the $(filter) action to hide grayed-out (inactive) items. Reveal active editor \u2014 The $(target) action jumps from the currently open file to its location in the workspace tree. Drag and drop \u2014 Reorganize nodes in the workspace tree directly with the mouse. Multiple workspaces \u2014 When multiple build configurations are loaded, switch between them from the $(repo) action in the title bar. Searching for symbols automatically switches to the workspace that owns the result. Copy node path / Copy tree \u2014 Quickly copy the path of a node, or export the entire tree as text via the $(copy) action. Welcome view \u2014 When no workspace is loaded, the view guides you through discovering build folders or opening the configuration UI.","title":"Workspace view"},{"location":"releases/2.0.0/#module-info-view","text":"The new Module Info view shows the EDK2 module information for the file you are currently editing. As soon as you open a C, INF or related source file that belongs to a module, the view populates with: The owning INF and its DSC declaration Libraries linked to the module Quick navigation actions (go to definition, open file, go to DSC declaration) Double-click any entry to jump directly to the corresponding source location.","title":"Module Info view"},{"location":"releases/2.0.0/#build-folder-auto-discovery","text":"EDK2Code can now scan your workspace and automatically detect existing build output folders, so you don't have to point the extension at them manually. Run EDK2: Discover build folders to scan the workspace. Once discovered, run EDK2: Use discovered build folders to load them directly. The Workspace view welcome page surfaces these actions when nothing is loaded yet.","title":"Build folder auto-discovery"},{"location":"releases/2.0.0/#compile-edk2-file","text":"You can now compile an individual EDK2 file (e.g. a .c belonging to a module) directly from the editor. A play ( $(play) ) icon is shown in the editor title bar on supported source files. The command EDK2: Compile Edk2 file invokes the build for the parent module of the active file.","title":"Compile EDK2 file"},{"location":"releases/2.0.0/#mcp-server-integration","text":"EDK2Code now exposes an MCP (Model Context Protocol) SSE server that lets AI agents and external tools query your parsed EDK2 workspace. Start with EDK2: Start MCP SSE Server and stop with EDK2: Stop MCP SSE Server . Configure the listening port via the edk2code.mcpServerPort setting (default 3100 ).","title":"MCP server integration"},{"location":"releases/2.0.0/#settings-ui","text":"A redesigned graphical Workspace configuration (UI) panel makes managing build configurations easier \u2014 no more hand-editing JSON for common setups. Launch from the Workspace view title bar ( $(gear) icon) or via the EDK2: Workspace configuration (UI) command.","title":"Settings UI"},{"location":"releases/2.0.0/#goto-overwriting-definition","text":"When a symbol is overwritten in a DSC (libraries, PCDs, modules), a new code action lets you jump directly to the overwriting definition.","title":"Goto overwriting definition"},{"location":"releases/2.0.0/#other-improvements","text":"Disable cscope \u2014 A new edk2code.useCscope setting lets you turn off cscope integration entirely. When disabled, the cscope database is not built or queried (call hierarchy and cscope-based go-to-definition become unavailable). Unload workspace \u2014 New EDK2: Unload workspace command to clear the currently loaded build configuration. Refresh workspace config \u2014 Reload the workspace configuration without restarting VS Code. Focus INF from C files \u2014 Improved navigation from C source files back to their owning INF module. Better module symbols \u2014 DSC parser now recognizes module sub-context sections, build options, and provides improved symbols for libraries and modules. Loading and discovery indicators \u2014 Progress indicators are shown while the workspace is being parsed or build folders are being discovered. Improved grayout controller \u2014 Inactive code regions are computed and updated more reliably. Path improvements \u2014 Missing paths now report folders instead of file names, and tooltips include the full path. Extensive test suite \u2014 New parser and workspace tests covering ASL, DEC, DSC, FDF, INF and VFR.","title":"Other improvements"}]} \ No newline at end of file diff --git a/search/worker.js b/search/worker.js new file mode 100755 index 0000000..8628dbc --- /dev/null +++ b/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/security.md b/security.md deleted file mode 100644 index cb59eb8..0000000 --- a/security.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security Policy -Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. - -## Reporting a Vulnerability -Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). diff --git a/sitemap.xml b/sitemap.xml new file mode 100755 index 0000000..0f8724e --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,3 @@ + +Active Platform
- build command. Usually this are the -D arguments on your build command
- -D arguments.PACKAGES_PATH env variable.
- Configure build arguments, then click Build. Settings for individual modules are saved automatically.
- -Macro definitions passed as -D Name=Value.
PCD overrides passed as --pcd=PcdName=Value.
Additional arguments passed verbatim to build.
These settings are shared across all builds and saved globally in .edkCode/edk2_build_configuration.json.