From fcff40992d7afb8c627690157bd26d03bb49caa5 Mon Sep 17 00:00:00 2001 From: Sid Pranjale Date: Tue, 23 Jan 2024 10:20:36 +0530 Subject: [PATCH] Modify to my hardware --- .github/workflows/ReBarDxe.yml | 34 ++++++++++++++++---------------- .github/workflows/ReBarState.yml | 10 +++++----- .github/workflows/buildffs.bat | 2 +- .github/workflows/buildffs.sh | 2 +- ReBarDxe/include/LocalPciGPU.h | 20 +++++++++---------- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ReBarDxe.yml b/.github/workflows/ReBarDxe.yml index 56657a4..7356645 100644 --- a/.github/workflows/ReBarDxe.yml +++ b/.github/workflows/ReBarDxe.yml @@ -1,4 +1,4 @@ -name: ReBarDxe EDK2 +name: NvStrapsReBar EDK2 on: push: @@ -10,7 +10,7 @@ env: TARGET_ARCH: X64 jobs: - rebardxe-windows: + NvStrapsReBar-windows: runs-on: windows-2019 env: @@ -48,25 +48,25 @@ jobs: ref: 'edk2-stable202208' submodules: 'recursive' - - name: Download RebarUEFI + - name: Download NvStrapsReBar uses: actions/checkout@v3 with: - path: '.\ReBarUEFI\' + path: '.\NvStrapsReBar\' - name: Setup EDK2 run: .\edksetup.bat Rebuild - - name: Build RebarDxe - run: .\ReBarUEFI\.github\workflows\buildffs.bat + - name: Build NvStrapsReBar + run: .\NvStrapsReBar\.github\workflows\buildffs.bat - - name: Upload ReBarDxe artifact + - name: Upload NvStrapsReBar artifact uses: actions/upload-artifact@master with: - name: ReBarDxe (built on Windows) - path: ${{github.workspace}}/Build/ReBarUEFI/RELEASE_VS2019/X64/ReBarDxe.ffs + name: NvStrapsReBar (built on Windows) + path: ${{github.workspace}}/Build/NvStrapsReBar/RELEASE_VS2019/X64/NvStrapsReBar.ffs - rebardxe-linux: + NvStrapsReBar-linux: runs-on: ubuntu-22.04 env: @@ -84,10 +84,10 @@ jobs: submodules: 'recursive' path: '.' - - name: Download RebarUEFI + - name: Download NvStrapsReBar uses: actions/checkout@v3 with: - path: './ReBarUEFI/' + path: './NvStrapsReBar/' - name: Install dependencies run: sudo apt install build-essential uuid-dev iasl git nasm python-is-python3 @@ -98,11 +98,11 @@ jobs: - name: Setup EDK2 run: bash -c "source edksetup.sh" - - name: Build RebarDxe - run: ./ReBarUEFI/.github/workflows/buildffs.sh + - name: Build NvStrapsReBar + run: ./NvStrapsReBar/.github/workflows/buildffs.sh - - name: Upload ReBarDxe artifact + - name: Upload NvStrapsReBar artifact uses: actions/upload-artifact@master with: - name: ReBarDxe (built on Linux) - path: ${{github.workspace}}/Build/ReBarUEFI/RELEASE_GCC5/X64/ReBarDxe.ffs + name: NvStrapsReBar (built on Linux) + path: ${{github.workspace}}/Build/NvStrapsReBar/RELEASE_GCC5/X64/NvStrapsReBar.ffs diff --git a/.github/workflows/ReBarState.yml b/.github/workflows/ReBarState.yml index 8369580..2dabb15 100644 --- a/.github/workflows/ReBarState.yml +++ b/.github/workflows/ReBarState.yml @@ -1,4 +1,4 @@ -name: ReBarState CMake +name: NvStrapsReBar CMake on: push: @@ -34,8 +34,8 @@ jobs: - name: Upload Ubuntu artifact uses: actions/upload-artifact@master with: - name: ReBarState Linux - path: ${{github.workspace}}/build/ReBarState + name: NvStrapsReBar Linux + path: ${{github.workspace}}/build/NvStrapsReBar rebarstate-windows: # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. @@ -60,6 +60,6 @@ jobs: - name: Upload Windows artifact uses: actions/upload-artifact@master with: - name: ReBarState Windows - path: ${{github.workspace}}/build/Release/ReBarState.exe + name: NvStrapsReBar Windows + path: ${{github.workspace}}/build/Release/NvStrapsReBar.exe diff --git a/.github/workflows/buildffs.bat b/.github/workflows/buildffs.bat index f70924d..5ce207e 100644 --- a/.github/workflows/buildffs.bat +++ b/.github/workflows/buildffs.bat @@ -1,2 +1,2 @@ @echo off -.\edksetup.bat && python .\ReBarUEFI\ReBarDxe\buildffs.py RELEASE B \ No newline at end of file +.\edksetup.bat && python .\NvStrapsReBar\ReBarDxe\buildffs.py RELEASE B \ No newline at end of file diff --git a/.github/workflows/buildffs.sh b/.github/workflows/buildffs.sh index 2ea6e38..5ce8d6e 100755 --- a/.github/workflows/buildffs.sh +++ b/.github/workflows/buildffs.sh @@ -1,3 +1,3 @@ #!/bin/bash source ./edksetup.sh -python ./ReBarUEFI/ReBarDxe/buildffs.py RELEASE B +python ./NvStrapsReBar/ReBarDxe/buildffs.py RELEASE B diff --git a/ReBarDxe/include/LocalPciGPU.h b/ReBarDxe/include/LocalPciGPU.h index b9713ea..f5ea4c6 100644 --- a/ReBarDxe/include/LocalPciGPU.h +++ b/ReBarDxe/include/LocalPciGPU.h @@ -9,33 +9,33 @@ // for your GPU and for the associated PCI-to-PCI bridge #define TARGET_GPU_PCI_VENDOR_ID 0x10DEu -#define TARGET_GPU_PCI_DEVICE_ID 0x1E07u +#define TARGET_GPU_PCI_DEVICE_ID 0x2191u -#define TARGET_GPU_PCI_BUS 0x41u +#define TARGET_GPU_PCI_BUS 0x01u #define TARGET_GPU_PCI_DEVICE 0x00u #define TARGET_GPU_PCI_FUNCTION 0x00u // PCIe config register offset 0x10 -#define TARGET_GPU_BAR0_ADDRESS UINT32_C(0x9200'0000) // Should fall within memory range mapped by the bridge +#define TARGET_GPU_BAR0_ADDRESS UINT32_C(0xB300'0000) // Should fall within memory range mapped by the bridge // Secondary bus of the bridge must match the GPU bus // Check the output form CPU-Z .txt report -#define TARGET_BRIDGE_PCI_VENDOR_ID 0x1022u -#define TARGET_BRIDGE_PCI_DEVICE_ID 0x1453u +#define TARGET_BRIDGE_PCI_VENDOR_ID 0x8086u +#define TARGET_BRIDGE_PCI_DEVICE_ID 0x1901u -#define TARGET_BRIDGE_PCI_BUS 0x40u -#define TARGET_BRIDGE_PCI_DEVICE 0x03u -#define TARGET_BRIDGE_PCI_FUNCTION 0x01u +#define TARGET_BRIDGE_PCI_BUS 0x00u +#define TARGET_BRIDGE_PCI_DEVICE 0x01u +#define TARGET_BRIDGE_PCI_FUNCTION 0x00u // Memory range and I/O port range (base + limit) mapped to bridge // from CPU-Z .txt report of the bridge and GPU // PCIe config register offset 0x20 -#define TARGET_BRIDGE_MEM_BASE_LIMIT UINT32_C(0x9300'9200) // Should cover the GPU BAR0 +#define TARGET_BRIDGE_MEM_BASE_LIMIT UINT32_C(0xB400'A000) // Should cover the GPU BAR0 // PCIe config register offset 0x1C -#define TARGET_BRIDGE_IO_BASE_LIMIT 0x8181u +#define TARGET_BRIDGE_IO_BASE_LIMIT 0x4040u static_assert((TARGET_GPU_BAR0_ADDRESS & UINT32_C(0x0000'0001)) == 0u, "Unexpected GPU BAR0 in the I/O port range"); static_assert((TARGET_GPU_BAR0_ADDRESS & UINT32_C(0x0000'0006)) == 0u, "Unexpected GPU BAR0 in the 64-bit memory address space");