diff options
Diffstat (limited to 'src')
40 files changed, 96 insertions, 0 deletions
diff --git a/src/include/ipxe/efi/Base.h b/src/include/ipxe/efi/Base.h index 6042841..d95f24b 100644 --- a/src/include/ipxe/efi/Base.h +++ b/src/include/ipxe/efi/Base.h @@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __BASE_H__ #define __BASE_H__ +FILE_LICENCE ( BSD3 ); + // // Include processor specific binding // diff --git a/src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h b/src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h index ab508fd..c8f3721 100644 --- a/src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h +++ b/src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h @@ -17,6 +17,8 @@ #ifndef __EFI_HII_FORMMAP_GUID_H__ #define __EFI_HII_FORMMAP_GUID_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_HII_STANDARD_FORM_GUID \ { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } } diff --git a/src/include/ipxe/efi/Guid/PcAnsi.h b/src/include/ipxe/efi/Guid/PcAnsi.h index 8f31254..8b3e63f 100644 --- a/src/include/ipxe/efi/Guid/PcAnsi.h +++ b/src/include/ipxe/efi/Guid/PcAnsi.h @@ -18,6 +18,8 @@ #ifndef __PC_ANSI_H__ #define __PC_ANSI_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_PC_ANSI_GUID \ { \ 0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ diff --git a/src/include/ipxe/efi/Guid/SmBios.h b/src/include/ipxe/efi/Guid/SmBios.h index 4bda1f3..cc4a1f9 100644 --- a/src/include/ipxe/efi/Guid/SmBios.h +++ b/src/include/ipxe/efi/Guid/SmBios.h @@ -22,6 +22,8 @@ #ifndef __SMBIOS_GUID_H__ #define __SMBIOS_GUID_H__ +FILE_LICENCE ( BSD3 ); + #define SMBIOS_TABLE_GUID \ { \ 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ diff --git a/src/include/ipxe/efi/Guid/WinCertificate.h b/src/include/ipxe/efi/Guid/WinCertificate.h index 3f91b12..75fc642 100644 --- a/src/include/ipxe/efi/Guid/WinCertificate.h +++ b/src/include/ipxe/efi/Guid/WinCertificate.h @@ -17,6 +17,8 @@ #ifndef __EFI_WIN_CERTIFICATE_H__ #define __EFI_WIN_CERTIFICATE_H__ +FILE_LICENCE ( BSD3 ); + // // _WIN_CERTIFICATE.wCertificateType // diff --git a/src/include/ipxe/efi/Ia32/ProcessorBind.h b/src/include/ipxe/efi/Ia32/ProcessorBind.h index 38de245..20cf407 100644 --- a/src/include/ipxe/efi/Ia32/ProcessorBind.h +++ b/src/include/ipxe/efi/Ia32/ProcessorBind.h @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PROCESSOR_BIND_H__ #define __PROCESSOR_BIND_H__ +FILE_LICENCE ( BSD3 ); + /// /// Define the processor type so other code can make processor based choices. /// diff --git a/src/include/ipxe/efi/IndustryStandard/Pci22.h b/src/include/ipxe/efi/IndustryStandard/Pci22.h index 62f0a26..b57059a 100644 --- a/src/include/ipxe/efi/IndustryStandard/Pci22.h +++ b/src/include/ipxe/efi/IndustryStandard/Pci22.h @@ -20,6 +20,8 @@ #ifndef _PCI22_H_ #define _PCI22_H_ +FILE_LICENCE ( BSD3 ); + #define PCI_MAX_BUS 255 #define PCI_MAX_DEVICE 31 #define PCI_MAX_FUNC 7 diff --git a/src/include/ipxe/efi/IndustryStandard/PeImage.h b/src/include/ipxe/efi/IndustryStandard/PeImage.h index 74941f5..281d486 100644 --- a/src/include/ipxe/efi/IndustryStandard/PeImage.h +++ b/src/include/ipxe/efi/IndustryStandard/PeImage.h @@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PE_IMAGE_H__ #define __PE_IMAGE_H__ +FILE_LICENCE ( BSD3 ); + // // PE32+ Subsystem type for EFI images // diff --git a/src/include/ipxe/efi/Pi/PiBootMode.h b/src/include/ipxe/efi/Pi/PiBootMode.h index 504a67f..30fd443 100644 --- a/src/include/ipxe/efi/Pi/PiBootMode.h +++ b/src/include/ipxe/efi/Pi/PiBootMode.h @@ -18,6 +18,8 @@ #ifndef __PI_BOOT_MODE_H__ #define __PI_BOOT_MODE_H__ +FILE_LICENCE ( BSD3 ); + /// /// EFI boot mode /// diff --git a/src/include/ipxe/efi/Pi/PiDependency.h b/src/include/ipxe/efi/Pi/PiDependency.h index 7d67da5..7ad81a7 100644 --- a/src/include/ipxe/efi/Pi/PiDependency.h +++ b/src/include/ipxe/efi/Pi/PiDependency.h @@ -17,6 +17,8 @@ #ifndef __PI_DEPENDENCY_H__ #define __PI_DEPENDENCY_H__ +FILE_LICENCE ( BSD3 ); + /// /// If present, this must be the first and only opcode, /// EFI_DEP_BEFORE is only used by DXE driver. diff --git a/src/include/ipxe/efi/Pi/PiDxeCis.h b/src/include/ipxe/efi/Pi/PiDxeCis.h index 959d00a..6c4f44b 100644 --- a/src/include/ipxe/efi/Pi/PiDxeCis.h +++ b/src/include/ipxe/efi/Pi/PiDxeCis.h @@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_DXECIS_H__ #define __PI_DXECIS_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Uefi/UefiMultiPhase.h> #include <ipxe/efi/Pi/PiMultiPhase.h> diff --git a/src/include/ipxe/efi/Pi/PiFirmwareFile.h b/src/include/ipxe/efi/Pi/PiFirmwareFile.h index b0dea86..6909018 100644 --- a/src/include/ipxe/efi/Pi/PiFirmwareFile.h +++ b/src/include/ipxe/efi/Pi/PiFirmwareFile.h @@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_FIRMWARE_FILE_H__ #define __PI_FIRMWARE_FILE_H__ +FILE_LICENCE ( BSD3 ); + #pragma pack(1) /// /// Used to verify the integrity of the file. diff --git a/src/include/ipxe/efi/Pi/PiFirmwareVolume.h b/src/include/ipxe/efi/Pi/PiFirmwareVolume.h index 4d2ba88..605c468 100644 --- a/src/include/ipxe/efi/Pi/PiFirmwareVolume.h +++ b/src/include/ipxe/efi/Pi/PiFirmwareVolume.h @@ -18,6 +18,8 @@ #ifndef __PI_FIRMWAREVOLUME_H__ #define __PI_FIRMWAREVOLUME_H__ +FILE_LICENCE ( BSD3 ); + /// /// EFI_FV_FILE_ATTRIBUTES /// diff --git a/src/include/ipxe/efi/Pi/PiHob.h b/src/include/ipxe/efi/Pi/PiHob.h index 4d09521..cd196cb 100644 --- a/src/include/ipxe/efi/Pi/PiHob.h +++ b/src/include/ipxe/efi/Pi/PiHob.h @@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_HOB_H__ #define __PI_HOB_H__ +FILE_LICENCE ( BSD3 ); + // // HobType of EFI_HOB_GENERIC_HEADER. // diff --git a/src/include/ipxe/efi/Pi/PiMultiPhase.h b/src/include/ipxe/efi/Pi/PiMultiPhase.h index a902083..d5d7aaa 100644 --- a/src/include/ipxe/efi/Pi/PiMultiPhase.h +++ b/src/include/ipxe/efi/Pi/PiMultiPhase.h @@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_MULTIPHASE_H__ #define __PI_MULTIPHASE_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Pi/PiFirmwareVolume.h> #include <ipxe/efi/Pi/PiFirmwareFile.h> #include <ipxe/efi/Pi/PiBootMode.h> diff --git a/src/include/ipxe/efi/Pi/PiS3BootScript.h b/src/include/ipxe/efi/Pi/PiS3BootScript.h index e4ce688..01cae15 100644 --- a/src/include/ipxe/efi/Pi/PiS3BootScript.h +++ b/src/include/ipxe/efi/Pi/PiS3BootScript.h @@ -16,6 +16,8 @@ #ifndef _PI_S3_BOOT_SCRIPT_H_ #define _PI_S3_BOOT_SCRIPT_H_ +FILE_LICENCE ( BSD3 ); + //******************************************* // EFI Boot Script Opcode definitions //******************************************* diff --git a/src/include/ipxe/efi/Pi/PiStatusCode.h b/src/include/ipxe/efi/Pi/PiStatusCode.h index cca7b1a..71fd22a 100644 --- a/src/include/ipxe/efi/Pi/PiStatusCode.h +++ b/src/include/ipxe/efi/Pi/PiStatusCode.h @@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_STATUS_CODE_H__ #define __PI_STATUS_CODE_H__ +FILE_LICENCE ( BSD3 ); + // // Required for IA32 and IPF defines for CPU exception types // diff --git a/src/include/ipxe/efi/PiDxe.h b/src/include/ipxe/efi/PiDxe.h index 5ffd1a5..9443368 100644 --- a/src/include/ipxe/efi/PiDxe.h +++ b/src/include/ipxe/efi/PiDxe.h @@ -16,6 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_DXE_H__ #define __PI_DXE_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Uefi/UefiBaseType.h> #include <ipxe/efi/Uefi/UefiSpec.h> diff --git a/src/include/ipxe/efi/Protocol/ComponentName2.h b/src/include/ipxe/efi/Protocol/ComponentName2.h index 3c5ec07..978ede5 100644 --- a/src/include/ipxe/efi/Protocol/ComponentName2.h +++ b/src/include/ipxe/efi/Protocol/ComponentName2.h @@ -17,6 +17,8 @@ #ifndef __EFI_COMPONENT_NAME2_H__ #define __EFI_COMPONENT_NAME2_H__ +FILE_LICENCE ( BSD3 ); + /// /// Global ID for the Component Name Protocol /// diff --git a/src/include/ipxe/efi/Protocol/Cpu.h b/src/include/ipxe/efi/Protocol/Cpu.h index 73200aa..ebcaf5f 100644 --- a/src/include/ipxe/efi/Protocol/Cpu.h +++ b/src/include/ipxe/efi/Protocol/Cpu.h @@ -17,6 +17,8 @@ #ifndef __ARCH_PROTOCOL_CPU_H__ #define __ARCH_PROTOCOL_CPU_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Protocol/DebugSupport.h> #define EFI_CPU_ARCH_PROTOCOL_GUID \ diff --git a/src/include/ipxe/efi/Protocol/CpuIo.h b/src/include/ipxe/efi/Protocol/CpuIo.h index 5328317..39b82b3 100644 --- a/src/include/ipxe/efi/Protocol/CpuIo.h +++ b/src/include/ipxe/efi/Protocol/CpuIo.h @@ -24,6 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _CPUIO_H_ #define _CPUIO_H_ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Protocol/CpuIo2.h> #define EFI_CPU_IO_PROTOCOL_GUID \ diff --git a/src/include/ipxe/efi/Protocol/CpuIo2.h b/src/include/ipxe/efi/Protocol/CpuIo2.h index e6fd0f2..aef8157 100644 --- a/src/include/ipxe/efi/Protocol/CpuIo2.h +++ b/src/include/ipxe/efi/Protocol/CpuIo2.h @@ -30,6 +30,8 @@ #ifndef __CPU_IO2_H__ #define __CPU_IO2_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_CPU_IO2_PROTOCOL_GUID \ { \ 0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f} \ diff --git a/src/include/ipxe/efi/Protocol/DebugSupport.h b/src/include/ipxe/efi/Protocol/DebugSupport.h index 0b6f4ed..ea5cec5 100644 --- a/src/include/ipxe/efi/Protocol/DebugSupport.h +++ b/src/include/ipxe/efi/Protocol/DebugSupport.h @@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __DEBUG_SUPPORT_H__ #define __DEBUG_SUPPORT_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/IndustryStandard/PeImage.h> typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL; diff --git a/src/include/ipxe/efi/Protocol/DevicePath.h b/src/include/ipxe/efi/Protocol/DevicePath.h index f8556b8..5c67870 100644 --- a/src/include/ipxe/efi/Protocol/DevicePath.h +++ b/src/include/ipxe/efi/Protocol/DevicePath.h @@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__ #define __EFI_DEVICE_PATH_PROTOCOL_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Guid/PcAnsi.h> /// diff --git a/src/include/ipxe/efi/Protocol/DriverBinding.h b/src/include/ipxe/efi/Protocol/DriverBinding.h index 94fe36f..1f464a7 100644 --- a/src/include/ipxe/efi/Protocol/DriverBinding.h +++ b/src/include/ipxe/efi/Protocol/DriverBinding.h @@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_DRIVER_BINDING_H__ #define __EFI_DRIVER_BINDING_H__ +FILE_LICENCE ( BSD3 ); + /// /// The global ID for the ControllerHandle Driver Protocol. /// diff --git a/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h b/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h index dc0c709..ac86e97 100644 --- a/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h +++ b/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h @@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__ #define __EFI_NETWORK_INTERFACE_IDENTIFER_H__ +FILE_LICENCE ( BSD3 ); + // // GUID retired from UEFI Specification 2.1b // diff --git a/src/include/ipxe/efi/Protocol/PciIo.h b/src/include/ipxe/efi/Protocol/PciIo.h index 3ec9a42..d998208 100644 --- a/src/include/ipxe/efi/Protocol/PciIo.h +++ b/src/include/ipxe/efi/Protocol/PciIo.h @@ -16,6 +16,8 @@ #ifndef __PCI_IO_H__ #define __PCI_IO_H__ +FILE_LICENCE ( BSD3 ); + /// /// Global ID for the PCI I/O Protocol /// diff --git a/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h b/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h index 482c438..5d87241 100644 --- a/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h +++ b/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h @@ -19,6 +19,8 @@ #ifndef __PCI_ROOT_BRIDGE_IO_H__ #define __PCI_ROOT_BRIDGE_IO_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \ { \ 0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ diff --git a/src/include/ipxe/efi/Protocol/SimpleNetwork.h b/src/include/ipxe/efi/Protocol/SimpleNetwork.h index 3057590..2b521a9 100644 --- a/src/include/ipxe/efi/Protocol/SimpleNetwork.h +++ b/src/include/ipxe/efi/Protocol/SimpleNetwork.h @@ -26,6 +26,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __SIMPLE_NETWORK_H__ #define __SIMPLE_NETWORK_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ { \ 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \ diff --git a/src/include/ipxe/efi/Protocol/SimpleTextIn.h b/src/include/ipxe/efi/Protocol/SimpleTextIn.h index 83ba9e7..31cab3d 100644 --- a/src/include/ipxe/efi/Protocol/SimpleTextIn.h +++ b/src/include/ipxe/efi/Protocol/SimpleTextIn.h @@ -18,6 +18,8 @@ #ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__ #define __SIMPLE_TEXT_IN_PROTOCOL_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ { \ 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ diff --git a/src/include/ipxe/efi/Protocol/SimpleTextOut.h b/src/include/ipxe/efi/Protocol/SimpleTextOut.h index 7e1c70c..a79cf43 100644 --- a/src/include/ipxe/efi/Protocol/SimpleTextOut.h +++ b/src/include/ipxe/efi/Protocol/SimpleTextOut.h @@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __SIMPLE_TEXT_OUT_H__ #define __SIMPLE_TEXT_OUT_H__ +FILE_LICENCE ( BSD3 ); + #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \ { \ 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ diff --git a/src/include/ipxe/efi/Uefi.h b/src/include/ipxe/efi/Uefi.h index 6950bb2..a5a25a9 100644 --- a/src/include/ipxe/efi/Uefi.h +++ b/src/include/ipxe/efi/Uefi.h @@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_UEFI_H__ #define __PI_UEFI_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Uefi/UefiBaseType.h> #include <ipxe/efi/Uefi/UefiSpec.h> diff --git a/src/include/ipxe/efi/Uefi/UefiBaseType.h b/src/include/ipxe/efi/Uefi/UefiBaseType.h index 4fdca57..0517039 100644 --- a/src/include/ipxe/efi/Uefi/UefiBaseType.h +++ b/src/include/ipxe/efi/Uefi/UefiBaseType.h @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_BASETYPE_H__ #define __UEFI_BASETYPE_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Base.h> // diff --git a/src/include/ipxe/efi/Uefi/UefiGpt.h b/src/include/ipxe/efi/Uefi/UefiGpt.h index 9f56338..0ea2d70 100644 --- a/src/include/ipxe/efi/Uefi/UefiGpt.h +++ b/src/include/ipxe/efi/Uefi/UefiGpt.h @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_GPT_H__ #define __UEFI_GPT_H__ +FILE_LICENCE ( BSD3 ); + /// /// The primary GUID Partition Table Header must be /// located in LBA 1 (i.e., the second logical block). diff --git a/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h b/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h index d9ddff5..6b6d1e0 100644 --- a/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h +++ b/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h @@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__ #define __UEFI_INTERNAL_FORMREPRESENTATION_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Guid/HiiFormMapMethodGuid.h> /// diff --git a/src/include/ipxe/efi/Uefi/UefiMultiPhase.h b/src/include/ipxe/efi/Uefi/UefiMultiPhase.h index d1fe616..6ecbcf1 100644 --- a/src/include/ipxe/efi/Uefi/UefiMultiPhase.h +++ b/src/include/ipxe/efi/Uefi/UefiMultiPhase.h @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_MULTIPHASE_H__ #define __UEFI_MULTIPHASE_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Guid/WinCertificate.h> /// /// Enumeration of memory types introduced in UEFI. diff --git a/src/include/ipxe/efi/Uefi/UefiPxe.h b/src/include/ipxe/efi/Uefi/UefiPxe.h index 582d0f8..0b8da5f 100644 --- a/src/include/ipxe/efi/Uefi/UefiPxe.h +++ b/src/include/ipxe/efi/Uefi/UefiPxe.h @@ -21,6 +21,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_PXE_H__ #define __EFI_PXE_H__ +FILE_LICENCE ( BSD3 ); + #pragma pack(1) #define PXE_BUSTYPE(a, b, c, d) \ diff --git a/src/include/ipxe/efi/Uefi/UefiSpec.h b/src/include/ipxe/efi/Uefi/UefiSpec.h index 6e2f26b..6fe5752 100644 --- a/src/include/ipxe/efi/Uefi/UefiSpec.h +++ b/src/include/ipxe/efi/Uefi/UefiSpec.h @@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_SPEC_H__ #define __UEFI_SPEC_H__ +FILE_LICENCE ( BSD3 ); + #include <ipxe/efi/Uefi/UefiMultiPhase.h> #include <ipxe/efi/Protocol/DevicePath.h> diff --git a/src/include/ipxe/efi/X64/ProcessorBind.h b/src/include/ipxe/efi/X64/ProcessorBind.h index b026859..0b1a3e1 100644 --- a/src/include/ipxe/efi/X64/ProcessorBind.h +++ b/src/include/ipxe/efi/X64/ProcessorBind.h @@ -15,6 +15,8 @@ #ifndef __PROCESSOR_BIND_H__ #define __PROCESSOR_BIND_H__ +FILE_LICENCE ( BSD3 ); + /// /// Define the processor type so other code can make processor based choices /// diff --git a/src/include/ipxe/efi/import.pl b/src/include/ipxe/efi/import.pl index 4ea5175..629624c 100755 --- a/src/include/ipxe/efi/import.pl +++ b/src/include/ipxe/efi/import.pl @@ -16,6 +16,7 @@ sub try_import_file { return unless $filename =~ /\.h$/; print "$filename..."; + ( undef, undef, my $basename ) = splitpath ( $filename ); my $outfile = catfile ( $ipxedir, $filename ); foreach my $edkdir ( @$edkdirs ) { my $infile = catfile ( $edkdir, $filename ); @@ -27,6 +28,8 @@ sub try_import_file { mkpath ( $outdir ); open my $outfh, ">$outfile" or die "Could not open $outfile: $!\n"; my @dependencies = (); + my $licence; + my $guard; while ( <$infh> ) { # Strip CR and trailing whitespace s/\r//g; @@ -36,10 +39,25 @@ sub try_import_file { if ( s/^\#include\s+[<\"](\S+)[>\"]/\#include <ipxe\/efi\/$1>/ ) { push @dependencies, $1; } + # Check for BSD licence statement + if ( /^\s*THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE/ ) { + die "Licence detected after header guard\n" if $guard; + $licence = "BSD3"; + } + # Write out line print $outfh "$_\n"; + # Apply FILE_LICENCE() immediately after include guard + if ( /^\#define\s+_?_\S+_H_?_$/ ) { + die "Duplicate header guard detected in $infile\n" if $guard; + $guard = 1; + print $outfh "\nFILE_LICENCE ( $licence );\n" if $licence; + } } close $outfh; close $infh; + # Warn if no licence was detected + warn "Cannot detect licence in $infile\n" unless $licence; + warn "Cannot detect header guard in $infile\n" unless $guard; # Recurse to handle any included files that we don't already have foreach my $dependency ( @dependencies ) { if ( ! -e catfile ( $ipxedir, $dependency ) ) { |