├── LICENSE.md
├── README.md
├── Security.md
├── brsi
├── config
│ ├── BRSI.seq
│ ├── BRSIStartup.nsh
│ ├── BRSI_extd_run.seq
│ ├── BRSI_manual.seq
│ ├── EfiCompliant_BRSI.ini
│ ├── buildroot_defconfig
│ ├── debug_dump.nsh
│ ├── grub-buildroot.cfg
│ ├── grub_prefix.cfg
│ └── startup.nsh
├── prebuilt_images
│ ├── brs_live_image.img.xz
│ └── uefi_flash1_23.04.img
└── scripts
│ └── build-scripts
│ ├── build_brsi.sh
│ ├── build_image.sh
│ ├── config
│ ├── BRSIStartup.nsh
│ └── debug_dump.nsh
│ ├── get_brsi_source.sh
│ ├── get_efi_offset.sh
│ ├── sct_result_parser.sh
│ └── start_qemu.sh
├── common
├── patches
│ ├── Update-test-profile-for-MemRead_Func-as-an-example.patch
│ ├── buildroot_enable_busybox_auto_login.patch
│ ├── buildroot_update_fwts_version.patch
│ ├── edk2-test-brs-build.patch
│ ├── fwts
│ │ ├── 0001-lib-Add-fwts_architecture-macro-for-risc-v.patch
│ │ ├── 0002-acpi-rsdp-Add-xsdt_address-check-for-riscv.patch
│ │ ├── 0003-acpi-madt-update-madt-revisions-to-ACPI-6.5.next.patch
│ │ ├── 0004-acpi-madt-Add-AIA-and-PLIC-sub-tables-test-for-riscv.patch
│ │ ├── 0005-acpi-rhct-Add-tests-for-ACPI-RHCT-table.patch
│ │ ├── 0006-acpi-acpitables-Update-acpitables-test-for-ACPI-6.5.patch
│ │ └── 0007-add-brs-for-BRS-test-set.patch
│ └── grub_update_default_gunlib_url.patch
├── scripts
│ ├── build-buildroot.sh
│ ├── build-grub.sh
│ ├── build-linux.sh
│ ├── build-sbi-test.sh
│ ├── build-sct.sh
│ ├── build-sct.sh_bak
│ ├── build-uefi-apps.sh
│ ├── framework.sh
│ ├── get_source.sh
│ └── parse_params.sh
└── sct-tests
│ └── brsi-tests
│ ├── BRS_SCT.dsc
│ ├── BrsBootServices
│ └── BlackBoxTest
│ │ ├── BrsBootServicesBBTest.inf
│ │ ├── BrsBootServicesBBTestFunction.c
│ │ ├── BrsBootServicesBBTestFunction.h
│ │ ├── BrsBootServicesBBTestMain.c
│ │ ├── BrsBootServicesBBTestMain.h
│ │ ├── Guid.c
│ │ └── Guid.h
│ ├── BrsiEfiSpecVerLvl
│ └── BlackBoxTest
│ │ ├── EfiSpecVerLvlBBTest.inf
│ │ ├── EfiSpecVerLvlBBTestFunction.c
│ │ ├── EfiSpecVerLvlBBTestFunction.h
│ │ ├── EfiSpecVerLvlBBTestMain.c
│ │ ├── EfiSpecVerLvlBBTestMain.h
│ │ ├── Guid.c
│ │ └── Guid.h
│ ├── BrsiRequiredUefiProtocols
│ └── BlackBoxTest
│ │ ├── Guid.c
│ │ ├── Guid.h
│ │ ├── RequiredUefiProtocolsBBTest.inf
│ │ ├── RequiredUefiProtocolsBBTestFunction.c
│ │ ├── RequiredUefiProtocolsBBTestFunction.h
│ │ ├── RequiredUefiProtocolsBBTestMain.c
│ │ └── RequiredUefiProtocolsBBTestMain.h
│ ├── BrsiRuntimeServices
│ └── BlackBoxTest
│ │ ├── BRSIRuntimeServicesBBTest.inf
│ │ ├── BRSIRuntimeServicesBBTestFunction.c
│ │ ├── BRSIRuntimeServicesBBTestFunction.h
│ │ ├── BRSIRuntimeServicesBBTestMain.c
│ │ ├── BRSIRuntimeServicesBBTestMain.h
│ │ ├── Guid.c
│ │ └── Guid.h
│ └── build_brs.sh
└── docs
├── Network_Test_Environment_Setup.md
└── RV-BRS-Test-Suite_Developer_Guide.md
/Security.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 | Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
3 |
4 | ## Reporting a Vulnerability
5 | 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).
6 |
7 |
--------------------------------------------------------------------------------
/brsi/config/BRSI.seq:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/intel/rv-brs-test-suite/573824669a8513cda83aac2c06b3d7a250cb2492/brsi/config/BRSI.seq
--------------------------------------------------------------------------------
/brsi/config/BRSIStartup.nsh:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2021, 2023 ARM Limited and Contributors. All rights reserved.
2 | # Copyright (c) 2023 Intel Corporation
3 | #
4 | # Redistribution and use in source and binary forms, with or without
5 | # modification, are permitted provided that the following conditions are met:
6 | #
7 | # Redistributions of source code must retain the above copyright notice, this
8 | # list of conditions and the following disclaimer.
9 | #
10 | # Redistributions in binary form must reproduce the above copyright notice,
11 | # this list of conditions and the following disclaimer in the documentation
12 | # and/or other materials provided with the distribution.
13 | #
14 | # Neither the name of ARM nor the names of its contributors may be used
15 | # to endorse or promote products derived from this software without specific
16 | # prior written permission.
17 | #
18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | # POSSIBILITY OF SUCH DAMAGE.
29 |
30 | echo -off
31 |
32 | for %i in 0 1 2 3 4 5 6 7 8 9 A B C D E F
33 | if exist FS%i:\EFI\BOOT\brs\SCT then
34 | #
35 | # Found EFI SCT harness
36 | #
37 | FS%i:
38 | cd FS%i:\EFI\BOOT\brs\SCT
39 | echo Press any key to stop the EFI SCT running
40 | stallforkey.efi 5
41 | if %lasterror% == 0 then
42 | goto Done
43 | endif
44 | for %j in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
45 | if exists FS%j:\acs_results\ then
46 | if exists FS%j:\acs_results\sct_results then
47 |
48 | #Check if SCT run has already completed
49 | if exist FS%j:\acs_results\sct_results\Overall\Summary.log then
50 | echo SCT has completed run. Press any key to start SCT execution from the beginning. WARNING: Ensure you have backed up the existing logs.
51 | stallforkey.efi 5
52 | if %lasterror% == 0 then
53 | #Backup the existing logs
54 | rm -q FS%j:\acs_results\sct_results_previous_run
55 | mkdir FS%j:\acs_results\sct_results_previous_run
56 | cp -r FS%j:\acs_results\sct_results FS%j:\acs_results\sct_results_previous_run
57 | rm -q FS%j:\acs_results\sct_results
58 | goto StartSCT
59 | else
60 | goto Done
61 | endif
62 | endif
63 |
64 | if exist FS%i:\EFI\BOOT\brs\SCT\.passive.mode then
65 | if exist FS%i:\EFI\BOOT\brs\SCT\.verbose.mode then
66 | Sct -c -p mnp -v
67 | else
68 | Sct -c -p mnp
69 | endif
70 | else
71 | if exist FS%i:\EFI\BOOT\brs\SCT\.verbose.mode then
72 | Sct -c -v
73 | else
74 | Sct -c
75 | endif
76 |
77 | #SCT execution has finished. Copy the logs to acs_results
78 | if exist FS%j:\acs_results\sct_results\ then
79 | if exist FS%i:\EFI\BOOT\brs\SCT\Overall then
80 | cp -r FS%i:\EFI\BOOT\brs\SCT\Overall FS%j:\acs_results\sct_results\
81 | endif
82 | if exist FS%i:\EFI\BOOT\brs\SCT\Dependency\EfiCompliantBBTest then
83 | cp -r FS%i:\EFI\BOOT\brs\SCT\Dependency\EfiCompliantBBTest FS%j:\acs_results\sct_results\
84 | endif
85 | if exist FS%i:\EFI\BOOT\brs\SCT\Sequence then
86 | cp -r FS%i:\EFI\BOOT\brs\SCT\Sequence FS%j:\acs_results\sct_results\
87 | endif
88 |
89 | #Restart to avoid an impact of running SCT tests on rest of the suites
90 | echo Reset the system ...
91 | reset
92 | endif
93 | #goto Done
94 | endif
95 | else
96 | :StartSCT
97 | FS%j:
98 | cd FS%j:\acs_results
99 | mkdir sct_results
100 | FS%i:
101 | cd FS%i:\EFI\BOOT\brs\SCT
102 | if %1 == sct_extd then
103 | echo "Starting extended run of SCT"
104 | Sct -s BRSI_extd_run.seq
105 | else
106 | Sct -s BRSI.seq
107 | endif
108 | goto Done
109 | endif
110 | endif
111 | endfor
112 | endif
113 | endfor
114 |
115 | :Done
116 |
117 |
--------------------------------------------------------------------------------
/brsi/config/BRSI_extd_run.seq:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/intel/rv-brs-test-suite/573824669a8513cda83aac2c06b3d7a250cb2492/brsi/config/BRSI_extd_run.seq
--------------------------------------------------------------------------------
/brsi/config/BRSI_manual.seq:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/intel/rv-brs-test-suite/573824669a8513cda83aac2c06b3d7a250cb2492/brsi/config/BRSI_manual.seq
--------------------------------------------------------------------------------
/brsi/config/EfiCompliant_BRSI.ini:
--------------------------------------------------------------------------------
1 | ## @file
2 | #
3 | # Copyright 2006 - 2019 Unified EFI, Inc.
4 | # Copyright (c) 2010 - 2019, 2023 Intel Corporation. All rights reserved.
5 | #
6 | # This program and the accompanying materials
7 | # are licensed and made available under the terms and conditions of the BSD License
8 | # which accompanies this distribution. The full text of the license may be found at
9 | # http://opensource.org/licenses/bsd-license.php
10 | #
11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 | #
14 | ##
15 | #/*++
16 | #
17 | # Module Name:
18 | #
19 | # EfiCompliant.ini
20 | #
21 | # Abstract:
22 | #
23 | # Configuration file for EFI compliant testing.
24 | #
25 | # Notes:
26 | #
27 | ### [Test Configuration Specific]
28 | #
29 | # GEN_CONFIG_INI_FILE_ON =
30 | #
31 | # IGNORE_COMPLIANT_TEST_CSV =
32 | #
33 | ### [Platform Specific]
34 | #
35 | # ConsoleDevices =
36 | #
37 | # HiiConfigSupport =
38 | #
39 | # HiiFontSupport =
40 | #
41 | # GraphicalConsoleDevices =
42 | #
43 | # PointerDevices =
44 | #
45 | # BootFromDiskDevices =
46 | #
47 | # BootFromNetworkDevices =
48 | #
49 | # ValidateBootImageThruNet =
50 | #
51 | # UartDevices =
52 | #
53 | # PciBusSupport =
54 | #
55 | # UsbBusSupport =
56 | #
57 | # NVMExpressPassThru =
58 | #
59 | # BootFromNVMe =
60 | #
61 | # ExtScsiPassThru =
62 | #
63 | # DebugSupport =
64 | #
65 | # PlatformDriverOverride =
66 | #
67 | # AtaPassThru =
68 | #
69 | # UEFIIPv4Support =
70 | #
71 | # BootFromScsi =
72 | #
73 | # ExtScsiPassThruSupport =
74 | #
75 | # BootFromIScsi =
76 | #
77 | # EBCSupport =
80 | #
81 | # UEFIIPv6Support =
82 | #
83 | # VLANSupport =
84 | #
85 | # DNS4Support =
86 | #
87 | # DNS6Support =
88 | #
89 | # TLSSupport =
90 | #
91 | # HTTPSupport =
92 | #
93 | # EAPSupport =
94 | #
95 | # BlueToothClassicSupport =
96 | #
97 | # BlueToothLESupport =
98 | #
99 | # IPSecSupport =
100 | #
101 | #--*/
102 | [Test Configuration Specific]
103 | GEN_CONFIG_INI_FILE_ON = yes
104 | IGNORE_COMPLIANT_TEST_CSV = no
105 |
106 | [Platform Specific]
107 |
108 | ConsoleDevices = yes
109 | HiiConfigSupport = yes
110 | HiiFontSupport = yes
111 | GraphicalConsoleDevices = yes
112 | PointerDevices = no
113 | BootFromDiskDevices = yes
114 | BootFromNetworkDevices = yes
115 | ValidateBootImageThruNet = no
116 | UartDevices = yes
117 | PciBusSupport = yes
118 | UsbBusSupport = yes
119 | NVMExpressPassThru = no
120 | BootFromNVMe = no
121 | ExtScsiPassThru = no
122 | DebugSupport = no
123 | PlatformDriverOverride = no
124 | AtaPassThru = no
125 | UEFIIPv4Support = yes
126 | BootFromScsi = no
127 | ExtScsiPassThruSupport = no
128 | BootFromIScsi = no
129 | EBCSupport = no
130 | UEFIIPv6Support = no
131 | VLANSupport = no
132 | DNS4Support = no
133 | DNS6Support = no
134 | TLSSupport = no
135 | HTTPSupport = yes
136 | EAPSupport = no
137 | BlueToothClassicSupport = no
138 | BlueToothLESupport = no
139 | IPSecSupport = no
140 |
--------------------------------------------------------------------------------
/brsi/config/buildroot_defconfig:
--------------------------------------------------------------------------------
1 | # Architecture
2 | BR2_riscv=y
3 | BR2_RISCV_64=y
4 |
5 | # Toolchain
6 | BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
7 |
8 | # System
9 | BR2_SYSTEM_DHCP="eth0"
10 |
11 | # FWTS package
12 | BR2_PACKAGE_FWTS=y
13 | BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE=y
14 |
15 | # Filesystem
16 | BR2_TARGET_ROOTFS_CPIO=y
17 |
18 | # Image
19 | #BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
20 | #BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
21 |
22 | # Linux headers same as kernel
23 | BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
24 |
25 | # Kernel
26 | BR2_LINUX_KERNEL=y
27 | BR2_LINUX_KERNEL_CUSTOM_VERSION=y
28 | BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.24"
29 | BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
30 | BR2_LINUX_KERNEL_IMAGE=y
31 |
32 | # Bootloader
33 | BR2_TARGET_OPENSBI=y
34 | BR2_TARGET_OPENSBI_PLAT="generic"
35 |
36 | # host-qemu for gitlab testing
37 | BR2_PACKAGE_HOST_QEMU=y
38 | BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
39 |
--------------------------------------------------------------------------------
/brsi/config/debug_dump.nsh:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are met:
5 | #
6 | # Redistributions of source code must retain the above copyright notice, this
7 | # list of conditions and the following disclaimer.
8 | #
9 | # Redistributions in binary form must reproduce the above copyright notice,
10 | # this list of conditions and the following disclaimer in the documentation
11 | # and/or other materials provided with the distribution.
12 | #
13 | # Neither the name of ARM nor the names of its contributors may be used
14 | # to endorse or promote products derived from this software without specific
15 | # prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 | # POSSIBILITY OF SUCH DAMAGE.
28 |
29 | echo -off
30 |
31 | for %m in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
32 | if exist FS%m:\acs_results then
33 | FS%m:
34 | cd FS%m:\acs_results
35 | if not exist uefi_dump then
36 | mkdir uefi_dump
37 | endif
38 | cd uefi_dump
39 | echo "Starting UEFI Debug dump"
40 | connect -r
41 | pci > pci.log
42 | drivers > drivers.log
43 | devices > devices.log
44 | dmpstore -all > dmpstore.log
45 | dh -d > dh.log
46 | memmap > memmap.log
47 | bcfg boot dump > bcfg.log
48 | map -r > map.log
49 | devtree > devtree.log
50 | ver > uefi_version.log
51 | ifconfig -l > ifconfig.log
52 | dmem > dmem.log
53 |
54 | for %n in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
55 | if exist FS%n:\EFI\BOOT\bsa\ir_bsa.flag then
56 | #IR Specific ->DT
57 | else
58 | smbiosview > smbiosview.log
59 | acpiview -l > acpiview_l.log
60 | acpiview -r 2 > acpiview_r.log
61 | acpiview > acpiview.log
62 | acpiview -d -s acpiview_d
63 | goto Done
64 | endif
65 | goto Done
66 | endfor
67 | endif
68 | endfor
69 | :Done
70 |
--------------------------------------------------------------------------------
/brsi/config/grub-buildroot.cfg:
--------------------------------------------------------------------------------
1 | set timeout=5
2 | set default="BRS test suite"
3 | set fallback=0
4 | set debug="loader,mm"
5 | set term="vt100"
6 |
7 | menuentry 'Linux Buildroot' {
8 | linux /Image rootwait verbose console=ttyS0 earlycon earlyprintk
9 | initrd /ramdisk-buildroot.img
10 | }
11 | menuentry 'BRS test suite' {
12 | chainloader /EFI/BOOT/Shell.efi
13 | }
14 |
--------------------------------------------------------------------------------
/brsi/config/grub_prefix.cfg:
--------------------------------------------------------------------------------
1 | set prefix=($root)/
2 |
--------------------------------------------------------------------------------
/brsi/config/startup.nsh:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2021-2023, ARM Limited and Contributors. All rights reserved.
2 | # Copyright (c) 2023 Intel Corporation
3 | #
4 | # Redistribution and use in source and binary forms, with or without
5 | # modification, are permitted provided that the following conditions are met:
6 | #
7 | # Redistributions of source code must retain the above copyright notice, this
8 | # list of conditions and the following disclaimer.
9 | #
10 | # Redistributions in binary form must reproduce the above copyright notice,
11 | # this list of conditions and the following disclaimer in the documentation
12 | # and/or other materials provided with the distribution.
13 | #
14 | # Neither the name of ARM nor the names of its contributors may be used
15 | # to endorse or promote products derived from this software without specific
16 | # prior written permission.
17 | #
18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | # POSSIBILITY OF SUCH DAMAGE.
29 |
30 | echo -off
31 | connect -r
32 |
33 | for %i in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
34 | if exist FS%i:\EFI\BOOT\brs\SctStartup.nsh then
35 | FS%i:\EFI\BOOT\brs\SctStartup.nsh %1
36 | goto Donebrs
37 | endif
38 | endfor
39 | :Donebrs
40 |
41 | for %e in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
42 | if exist FS%e:\acs_results then
43 | FS%e:
44 | cd FS%e:\acs_results
45 | if not exist app_output then
46 | mkdir app_output
47 | endif
48 | cd app_output
49 | for %q in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
50 | if exist FS%q:\EFI\BOOT\app\CapsuleApp.efi then
51 | echo "Running CapsuleApp"
52 | FS%q:\EFI\BOOT\app\CapsuleApp.efi -P > CapsuleApp_FMP_protocol_info.log
53 | FS%q:\EFI\BOOT\app\CapsuleApp.efi -E > CapsuleApp_ESRT_table_info.log
54 | goto DoneApp
55 | endif
56 | endfor
57 | endif
58 | endfor
59 | :DoneApp
60 |
61 | for %l in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
62 | if exist FS%l:\Image and exist FS%l:\ramdisk-buildroot.img then
63 | FS%l:
64 | cd FS%l:\
65 | Image initrd=\ramdisk-buildroot.img console=ttyS0 earlycon earlyprintk
66 | endif
67 | endfor
68 | echo "Image not found"
69 |
--------------------------------------------------------------------------------
/brsi/prebuilt_images/brs_live_image.img.xz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/intel/rv-brs-test-suite/573824669a8513cda83aac2c06b3d7a250cb2492/brsi/prebuilt_images/brs_live_image.img.xz
--------------------------------------------------------------------------------
/brsi/prebuilt_images/uefi_flash1_23.04.img:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/intel/rv-brs-test-suite/573824669a8513cda83aac2c06b3d7a250cb2492/brsi/prebuilt_images/uefi_flash1_23.04.img
--------------------------------------------------------------------------------
/brsi/scripts/build-scripts/build_brsi.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
4 | # Copyright (c) 2023 Intel Corporation
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are met:
8 | #
9 | # Redistributions of source code must retain the above copyright notice, this
10 | # list of conditions and the following disclaimer.
11 | #
12 | # Redistributions in binary form must reproduce the above copyright notice,
13 | # this list of conditions and the following disclaimer in the documentation
14 | # and/or other materials provided with the distribution.
15 | #
16 | # Neither the name of ARM nor the names of its contributors may be used
17 | # to endorse or promote products derived from this software without specific
18 | # prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 | # POSSIBILITY OF SUCH DAMAGE.
31 |
32 | TOP_DIR=`pwd`
33 |
34 | create_scripts_link()
35 | {
36 | ln -s $TOP_DIR/../../common/scripts/framework.sh $TOP_DIR/build-scripts/framework.sh
37 | ln -s $TOP_DIR/../../common/scripts/parse_params.sh $TOP_DIR/build-scripts/parse_params.sh
38 | ln -s $TOP_DIR/../../common/scripts/build-sct.sh $TOP_DIR/build-scripts/build-sct.sh
39 | ln -s $TOP_DIR/../../common/scripts/build-sbi-test.sh $TOP_DIR/build-scripts/build-sbi-test.sh
40 | ln -s $TOP_DIR/../../common/scripts/build-uefi-apps.sh $TOP_DIR/build-scripts/build-uefi-apps.sh
41 | ln -s $TOP_DIR/../../common/scripts/build-fwts.sh $TOP_DIR/build-scripts/build-fwts.sh
42 | ln -s $TOP_DIR/../../common/scripts/start_qemu.sh $TOP_DIR/build-scripts/start_qemu.sh
43 | ln -s $TOP_DIR/../../common/scripts/build-grub.sh $TOP_DIR/build-scripts/build-grub.sh
44 | ln -s $TOP_DIR/../../common/scripts/build-linux.sh $TOP_DIR/build-scripts/build-linux.sh
45 | ln -s $TOP_DIR/../../common/scripts/build-buildroot.sh $TOP_DIR/build-scripts/build-buildroot.sh
46 | }
47 |
48 | init_dir()
49 | {
50 | mkdir -p $TOP_DIR/build-scripts/config
51 | cp -r $TOP_DIR/../config/* $TOP_DIR/build-scripts/config/
52 | }
53 |
54 | create_scripts_link
55 | init_dir
56 |
57 | source ./build-scripts/build-sct.sh
58 | source ./build-scripts/build-sbi-test.sh
59 | source ./build-scripts/build-grub.sh
60 | source ./build-scripts/build-linux.sh
61 | source ./build-scripts/build-buildroot.sh
62 |
--------------------------------------------------------------------------------
/brsi/scripts/build-scripts/build_image.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Copyright (c) 2021-2023, ARM Limited and Contributors. All rights reserved.
4 | # Copyright (c) 2023 Intel Corporation
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are met:
8 | #
9 | # Redistributions of source code must retain the above copyright notice, this
10 | # list of conditions and the following disclaimer.
11 | #
12 | # Redistributions in binary form must reproduce the above copyright notice,
13 | # this list of conditions and the following disclaimer in the documentation
14 | # and/or other materials provided with the distribution.
15 | #
16 | # Neither the name of ARM nor the names of its contributors may be used
17 | # to endorse or promote products derived from this software without specific
18 | # prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 | # POSSIBILITY OF SUCH DAMAGE.
31 |
32 | #------------------------------------------
33 | # Generate the disk image for busybox boot
34 | #------------------------------------------
35 |
36 |
37 | #variables for image generation
38 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
39 | TOP_DIR=`pwd`
40 | PLATDIR=${TOP_DIR}/output
41 | OUTDIR=${PLATDIR}
42 | GRUB_BUILDROOT_CONFIG_FILE=${TOP_DIR}/../config/grub-buildroot.cfg
43 | EFI_CONFIG_FILE=${TOP_DIR}/../../brsi/config/startup.nsh
44 | SCT_STARTUP_FILE=${TOP_DIR}/../../brsi/config/BRSIStartup.nsh
45 | DEBUG_CONFIG_FILE=${TOP_DIR}/../../brsi/config/debug_dump.nsh
46 | BLOCK_SIZE=512
47 | SEC_PER_MB=$((1024*2))
48 | GRUB_PATH=grub
49 | UEFI_SHELL_PATH=edk2-test/uefi-sct/Build/Shell/DEBUG_GCC5/RISCV64/ShellPkg/Application/Shell/Shell/OUTPUT
50 | SCT_PATH=edk2-test/uefi-sct/RISCV64_SCT
51 | UEFI_APPS_PATH=${TOP_DIR}/edk2-test/uefi-sct/Build/MdeModule/DEBUG_GCC5/RISCV64/MdeModulePkg/Application/CapsuleApp/CapsuleApp/OUTPUT
52 |
53 | create_cfgfiles ()
54 | {
55 | local fatpart_name="$1"
56 |
57 | mcopy -i $fatpart_name -o ${GRUB_BUILDROOT_CONFIG_FILE} ::/grub.cfg
58 | mcopy -i $fatpart_name -o ${SCT_STARTUP_FILE} ::/EFI/BOOT/brs/
59 |
60 | mcopy -i $fatpart_name -o ${EFI_CONFIG_FILE} ::/EFI/BOOT/
61 | mcopy -i $fatpart_name -o ${DEBUG_CONFIG_FILE} ::/EFI/BOOT/debug/
62 |
63 | }
64 |
65 | create_fatpart ()
66 | {
67 | local fatpart_name="$1" #Name of the FAT partition disk image
68 | local fatpart_size="$2" #FAT partition size (in 512-byte blocks)
69 |
70 | dd if=/dev/zero of=$fatpart_name bs=$BLOCK_SIZE count=$fatpart_size
71 | mkfs.vfat $fatpart_name -n $fatpart_name
72 | mmd -i $fatpart_name ::/EFI
73 | mmd -i $fatpart_name ::/EFI/BOOT
74 | mmd -i $fatpart_name ::/grub
75 |
76 | mmd -i $fatpart_name ::/EFI/BOOT/brs
77 | mmd -i $fatpart_name ::/EFI/BOOT/debug
78 | mmd -i $fatpart_name ::/EFI/BOOT/app
79 |
80 | mcopy -i $fatpart_name bootriscv64.efi ::/EFI/BOOT
81 | mcopy -i $fatpart_name Shell.efi ::/EFI/BOOT
82 | mcopy -i $fatpart_name $OUTDIR/Image ::/
83 | mcopy -i $fatpart_name $PLATDIR/ramdisk-buildroot.img ::/
84 |
85 | mcopy -s -i $fatpart_name SCT/* ::/EFI/BOOT/brs
86 | # mcopy -i $fatpart_name ${UEFI_APPS_PATH}/CapsuleApp.efi ::/EFI/BOOT/app
87 |
88 | echo "FAT partition image created"
89 | }
90 |
91 | create_fatpart2 ()
92 | {
93 | local fatpart_name="$1" #Name of the FAT partition disk image
94 | local fatpart_size="$2" #FAT partition size (in 512-byte blocks)
95 |
96 | dd if=/dev/zero of=$fatpart_name bs=$BLOCK_SIZE count=$fatpart_size
97 | mkfs.vfat $fatpart_name -n $fatpart_name
98 | mmd -i $fatpart_name ::/acs_results
99 | echo "FAT partition 2 image created"
100 | }
101 |
102 | create_diskimage ()
103 | {
104 | local image_name="$1"
105 | local part_start="$2"
106 | local fatpart_size="$3"
107 | local fatpart2_size="$4"
108 |
109 | (echo n; echo 1; echo $part_start; echo +$((fatpart_size-1));\
110 | echo 0700; echo w; echo y) | gdisk $image_name
111 | (echo n; echo 2; echo $((part_start+fatpart_size)); echo +$((fatpart2_size-1));\
112 | echo 0700; echo w; echo y) | gdisk $image_name
113 | }
114 |
115 | prepare_disk_image ()
116 | {
117 | echo
118 | echo
119 | echo "-------------------------------------"
120 | echo "Preparing disk image for busybox boot"
121 | echo "-------------------------------------"
122 |
123 | IMG_BB=brs_live_image.img
124 | echo -e "\e[1;32m Build BRS Live Image at $PLATDIR/$IMG_BB \e[0m"
125 |
126 | pushd $TOP_DIR/$GRUB_PATH/output
127 |
128 | local FAT_SIZE_MB=512
129 | local FAT2_SIZE_MB=128
130 | local PART_START=$((1*SEC_PER_MB))
131 | local FAT_SIZE=$((FAT_SIZE_MB*SEC_PER_MB))
132 | local FAT2_SIZE=$((FAT2_SIZE_MB*SEC_PER_MB))
133 |
134 | rm -f $PLATDIR/$IMG_BB
135 | mkdir -p $PLATDIR
136 | cp grubriscv64.efi bootriscv64.efi
137 | cp $TOP_DIR/$UEFI_SHELL_PATH/Shell.efi Shell.efi
138 |
139 | cp -Tr $TOP_DIR/$SCT_PATH/ SCT
140 | grep -q -F 'mtools_skip_check=1' ~/.mtoolsrc || echo "mtools_skip_check=1" >> ~/.mtoolsrc
141 |
142 | #Package images for Busybox
143 | rm -f $IMG_BB
144 | dd if=/dev/zero of=part_table bs=$BLOCK_SIZE count=$PART_START
145 |
146 | #Space for partition table at the top
147 | cat part_table > $IMG_BB
148 |
149 | #Create fat partition
150 | create_fatpart "BOOT" $FAT_SIZE
151 | create_cfgfiles "BOOT"
152 | cat BOOT >> $IMG_BB
153 |
154 | #Result partition
155 | create_fatpart2 "RESULT" $FAT2_SIZE
156 | cat RESULT >> $IMG_BB
157 |
158 | #Space for backup partition table at the bottom (1M)
159 | cat part_table >> $IMG_BB
160 |
161 | # create disk image and copy into output folder
162 | create_diskimage $IMG_BB $PART_START $FAT_SIZE $FAT2_SIZE
163 | cp $IMG_BB $PLATDIR
164 |
165 | #remove intermediate files
166 | rm -f part_table
167 | rm -f BOOT
168 | rm -f RESULT
169 |
170 | echo "Compressing the image : $PLATDIR/$IMG_BB"
171 | xz -z $PLATDIR/$IMG_BB
172 |
173 | if [ -f $PLATDIR/$IMG_BB.xz ]; then
174 | echo "Completed preparation of disk image for busybox boot"
175 | echo "Image path : $PLATDIR/$IMG_BB.xz"
176 | fi
177 | echo "----------------------------------------------------"
178 | }
179 | exit_fun() {
180 | exit 1 # Exit script
181 | }
182 |
183 | #prepare the disk image
184 | prepare_disk_image
185 |
186 |
--------------------------------------------------------------------------------
/brsi/scripts/build-scripts/config/BRSIStartup.nsh:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2021, 2023 ARM Limited and Contributors. All rights reserved.
2 | # Copyright (c) 2023 Intel Corporation
3 | #
4 | # Redistribution and use in source and binary forms, with or without
5 | # modification, are permitted provided that the following conditions are met:
6 | #
7 | # Redistributions of source code must retain the above copyright notice, this
8 | # list of conditions and the following disclaimer.
9 | #
10 | # Redistributions in binary form must reproduce the above copyright notice,
11 | # this list of conditions and the following disclaimer in the documentation
12 | # and/or other materials provided with the distribution.
13 | #
14 | # Neither the name of ARM nor the names of its contributors may be used
15 | # to endorse or promote products derived from this software without specific
16 | # prior written permission.
17 | #
18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | # POSSIBILITY OF SUCH DAMAGE.
29 |
30 | echo -off
31 |
32 | for %i in 0 1 2 3 4 5 6 7 8 9 A B C D E F
33 | if exist FS%i:\EFI\BOOT\brs\SCT then
34 | #
35 | # Found EFI SCT harness
36 | #
37 | FS%i:
38 | cd FS%i:\EFI\BOOT\brs\SCT
39 | echo Press any key to stop the EFI SCT running
40 | stallforkey.efi 5
41 | if %lasterror% == 0 then
42 | goto Done
43 | endif
44 | for %j in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
45 | if exists FS%j:\acs_results\ then
46 | if exists FS%j:\acs_results\sct_results then
47 |
48 | #Check if SCT run has already completed
49 | if exist FS%j:\acs_results\sct_results\Overall\Summary.log then
50 | echo SCT has completed run. Press any key to start SCT execution from the beginning. WARNING: Ensure you have backed up the existing logs.
51 | stallforkey.efi 5
52 | if %lasterror% == 0 then
53 | #Backup the existing logs
54 | rm -q FS%j:\acs_results\sct_results_previous_run
55 | mkdir FS%j:\acs_results\sct_results_previous_run
56 | cp -r FS%j:\acs_results\sct_results FS%j:\acs_results\sct_results_previous_run
57 | rm -q FS%j:\acs_results\sct_results
58 | goto StartSCT
59 | else
60 | goto Done
61 | endif
62 | endif
63 |
64 | if exist FS%i:\EFI\BOOT\brs\SCT\.passive.mode then
65 | if exist FS%i:\EFI\BOOT\brs\SCT\.verbose.mode then
66 | Sct -c -p mnp -v
67 | else
68 | Sct -c -p mnp
69 | endif
70 | else
71 | if exist FS%i:\EFI\BOOT\brs\SCT\.verbose.mode then
72 | Sct -c -v
73 | else
74 | Sct -c
75 | endif
76 |
77 | #SCT execution has finished. Copy the logs to acs_results
78 | if exist FS%j:\acs_results\sct_results\ then
79 | if exist FS%i:\EFI\BOOT\brs\SCT\Overall then
80 | cp -r FS%i:\EFI\BOOT\brs\SCT\Overall FS%j:\acs_results\sct_results\
81 | endif
82 | if exist FS%i:\EFI\BOOT\brs\SCT\Dependency\EfiCompliantBBTest then
83 | cp -r FS%i:\EFI\BOOT\brs\SCT\Dependency\EfiCompliantBBTest FS%j:\acs_results\sct_results\
84 | endif
85 | if exist FS%i:\EFI\BOOT\brs\SCT\Sequence then
86 | cp -r FS%i:\EFI\BOOT\brs\SCT\Sequence FS%j:\acs_results\sct_results\
87 | endif
88 |
89 | #Restart to avoid an impact of running SCT tests on rest of the suites
90 | echo Reset the system ...
91 | reset
92 | endif
93 | #goto Done
94 | endif
95 | else
96 | :StartSCT
97 | FS%j:
98 | cd FS%j:\acs_results
99 | mkdir sct_results
100 | FS%i:
101 | cd FS%i:\EFI\BOOT\brs\SCT
102 | if %1 == sct_extd then
103 | echo "Starting extended run of SCT"
104 | Sct -s BRSI_extd_run.seq
105 | else
106 | Sct -s BRSI.seq
107 | endif
108 | goto Done
109 | endif
110 | endif
111 | endfor
112 | endif
113 | endfor
114 |
115 | :Done
116 |
117 |
--------------------------------------------------------------------------------
/brsi/scripts/build-scripts/config/debug_dump.nsh:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are met:
5 | #
6 | # Redistributions of source code must retain the above copyright notice, this
7 | # list of conditions and the following disclaimer.
8 | #
9 | # Redistributions in binary form must reproduce the above copyright notice,
10 | # this list of conditions and the following disclaimer in the documentation
11 | # and/or other materials provided with the distribution.
12 | #
13 | # Neither the name of ARM nor the names of its contributors may be used
14 | # to endorse or promote products derived from this software without specific
15 | # prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 | # POSSIBILITY OF SUCH DAMAGE.
28 |
29 | echo -off
30 |
31 | for %m in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
32 | if exist FS%m:\acs_results then
33 | FS%m:
34 | cd FS%m:\acs_results
35 | if not exist uefi_dump then
36 | mkdir uefi_dump
37 | endif
38 | cd uefi_dump
39 | echo "Starting UEFI Debug dump"
40 | connect -r
41 | pci > pci.log
42 | drivers > drivers.log
43 | devices > devices.log
44 | dmpstore -all > dmpstore.log
45 | dh -d > dh.log
46 | memmap > memmap.log
47 | bcfg boot dump > bcfg.log
48 | map -r > map.log
49 | devtree > devtree.log
50 | ver > uefi_version.log
51 | ifconfig -l > ifconfig.log
52 | dmem > dmem.log
53 |
54 | for %n in 0 1 2 3 4 5 6 7 8 9 A B C D E F then
55 | if exist FS%n:\EFI\BOOT\bsa\ir_bsa.flag then
56 | #IR Specific ->DT
57 | else
58 | smbiosview > smbiosview.log
59 | acpiview -l > acpiview_l.log
60 | acpiview -r 2 > acpiview_r.log
61 | acpiview > acpiview.log
62 | acpiview -d -s acpiview_d
63 | goto Done
64 | endif
65 | goto Done
66 | endfor
67 | endif
68 | endfor
69 | :Done
70 |
--------------------------------------------------------------------------------
/brsi/scripts/build-scripts/get_brsi_source.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
4 | # Copyright (c) 2023 Intel Corporation
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are met:
8 | #
9 | # Redistributions of source code must retain the above copyright notice, this
10 | # list of conditions and the following disclaimer.
11 | #
12 | # Redistributions in binary form must reproduce the above copyright notice,
13 | # this list of conditions and the following disclaimer in the documentation
14 | # and/or other materials provided with the distribution.
15 | #
16 | # Neither the name of ARM nor the names of its contributors may be used
17 | # to endorse or promote products derived from this software without specific
18 | # prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 | # POSSIBILITY OF SUCH DAMAGE.
31 |
32 | TOP_DIR=`pwd`
33 |
34 | create_scripts_link()
35 | {
36 | ln -s $TOP_DIR/../../common/scripts/get_source.sh $TOP_DIR/build-scripts/get_source.sh
37 | }
38 |
39 | create_scripts_link
40 | source ./build-scripts/get_source.sh
41 |
--------------------------------------------------------------------------------
/brsi/scripts/build-scripts/get_efi_offset.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script: get_efi_offset.sh
5 | #
6 | # Description:
7 | # This script is used to extract the load address of an EFI file for GDB
8 | # debugging purposes. It assumes that you have an example EFI file which you
9 | # want to debug.
10 | #
11 | # Usage:
12 | # ./get_efi_offset.sh