├── uefi_bootloader ├── efi_prebuilts │ └── gnu-efi │ │ └── linux-x86_64 │ │ ├── lib │ │ ├── libefi.a │ │ ├── libgnuefi.a │ │ ├── crt0-efi-x86_64.o │ │ └── elf_x86_64_efi.lds │ │ └── include │ │ └── efi │ │ ├── x86_64 │ │ └── efilibplat.h │ │ ├── protocol │ │ ├── intload.h │ │ ├── adapterdebug.h │ │ ├── eficonsplit.h │ │ ├── vgaclass.h │ │ ├── legacyboot.h │ │ ├── piflash64.h │ │ ├── efivar.h │ │ └── efidbg.h │ │ ├── efistdarg.h │ │ ├── romload.h │ │ ├── efi.h │ │ ├── efiui.h │ │ ├── efipart.h │ │ ├── efigpt.h │ │ ├── efierr.h │ │ ├── efi_nii.h │ │ ├── efirtlib.h │ │ ├── efidebug.h │ │ ├── efifs.h │ │ ├── libsmbios.h │ │ ├── efiser.h │ │ ├── efilink.h │ │ ├── pci22.h │ │ └── efidef.h ├── build.sh ├── Makefile └── preload.h ├── common ├── ld │ ├── elf_ld │ │ ├── Makefile │ │ ├── elf32_ld.h │ │ ├── elf64_ld.h │ │ ├── elf_ld_env.h │ │ ├── elf_info.c │ │ └── elf_ld.c │ ├── image_accessors │ │ ├── Makefile │ │ ├── image_access_mem.c │ │ └── image_access_file.c │ └── Makefile ├── util │ ├── linux │ │ ├── Makefile │ │ └── common.c │ └── Makefile └── include │ ├── common.h │ └── error_code.h ├── pre_os ├── xmon_loader │ ├── utils │ │ ├── string │ │ │ ├── Makefile │ │ │ ├── cmdline.h │ │ │ ├── string.h │ │ │ ├── ctype.h │ │ │ ├── cmdline.c │ │ │ └── string.c │ │ ├── x64 │ │ │ ├── Makefile │ │ │ ├── x32_gdt64.h │ │ │ ├── x32_pt64.h │ │ │ ├── x32_pt64.c │ │ │ └── x32_gdt64.c │ │ ├── Makefile │ │ ├── screen │ │ │ ├── Makefile │ │ │ ├── screen.h │ │ │ └── screen.c │ │ └── memory │ │ │ ├── Makefile │ │ │ ├── memory.h │ │ │ └── memory.c │ ├── e820.h │ ├── xmon_loader.h │ ├── boot_protocol_util.h │ ├── boot_protocol_util.c │ ├── Makefile │ └── e820.c ├── common │ ├── Makefile │ ├── loader_serial │ │ ├── Makefile │ │ └── loader_serial.h │ └── include │ │ └── ikgtboot.h ├── tools │ ├── readme.txt │ └── Makefile ├── Makefile └── starter │ ├── run_xmon_loader.c │ ├── starter.S │ ├── Makefile │ └── starter_main.c ├── startap ├── startap.h ├── x32_init64.c ├── Makefile ├── x32_init64.h ├── startap.c ├── wakeup_init64.S └── ap_procs_init.h ├── Makefile └── rule.linux /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/lib/libefi.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/ikgt-uefi-loader/HEAD/uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/lib/libefi.a -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/lib/libgnuefi.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/ikgt-uefi-loader/HEAD/uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/lib/libgnuefi.a -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/lib/crt0-efi-x86_64.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/ikgt-uefi-loader/HEAD/uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/lib/crt0-efi-x86_64.o -------------------------------------------------------------------------------- /uefi_bootloader/build.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | 3 | MAKE_CMD="make -f Makefile" 4 | 5 | rm -rf out/ 6 | 7 | mkdir out 8 | # Generate prebuilts for x86_64 9 | $MAKE_CMD ARCH=x86_64 10 | cp preload.efi ./out/preload_x64.efi 11 | $MAKE_CMD ARCH=x86_64 clean 12 | -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/include/efi/x86_64/efilibplat.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Intel Corporation 4 | 5 | Module Name: 6 | 7 | efilibplat.h 8 | 9 | Abstract: 10 | 11 | EFI to compile bindings 12 | 13 | 14 | 15 | 16 | Revision History 17 | 18 | --*/ 19 | 20 | VOID 21 | InitializeLibPlatform ( 22 | IN EFI_HANDLE ImageHandle, 23 | IN EFI_SYSTEM_TABLE *SystemTable 24 | ); 25 | 26 | 27 | -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/include/efi/protocol/intload.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1999 Intel Corporation 4 | 5 | Module Name: 6 | 7 | intload 8 | 9 | Abstract: 10 | 11 | EFI support for loading internally linked in apps 12 | 13 | 14 | 15 | Revision History 16 | 17 | --*/ 18 | 19 | #ifndef _INTERNAL_LOAD_INCLUDE_ 20 | #define _INTERNAL_LOAD_INCLUDE_ 21 | 22 | // {D65A6B8C-71E5-4df0-A909-F0D2992B5AA9} 23 | #define INTERNAL_SHELL_GUID \ 24 | { 0xd65a6b8c, 0x71e5, 0x4df0, {0xa9, 0x09, 0xf0, 0xd2, 0x99, 0x2b, 0x5a, 0xa9} } 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/include/efi/protocol/adapterdebug.h: -------------------------------------------------------------------------------- 1 | #ifndef _ADAPTER_DEBUG_H 2 | #define _ADAPTER_DEBUG_H 3 | 4 | /*++ 5 | 6 | Copyright (c) 1999 Intel Corporation 7 | 8 | Module Name: 9 | 10 | AdapterDebug.h 11 | 12 | Abstract: 13 | 14 | Protocol to debug the EDD 3.0 enablement of BIOS option ROMs 15 | 16 | 17 | 18 | Revision History 19 | 20 | --*/ 21 | 22 | // {82F86881-282B-11d4-BC7D-0080C73C8881} 23 | #define ADAPTER_DEBUG_PROTOCOL \ 24 | { 0x82f86881, 0x282b, 0x11d4, {0xbc, 0x7d, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} } 25 | 26 | // 27 | // This protocol points to the BIOS_LEGACY_DRIVE data structure 28 | // see edd.h for more details 29 | // 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/include/efi/protocol/eficonsplit.h: -------------------------------------------------------------------------------- 1 | #ifndef _EFI_CONFORK_H 2 | #define _EFI_CONFORK_H 3 | /*++ 4 | 5 | Copyright (c) 1999 Intel Corporation 6 | 7 | Module Name: 8 | 9 | Abstract: 10 | 11 | 12 | 13 | Revision History 14 | 15 | --*/ 16 | 17 | 18 | 19 | // 20 | // ConOut Forker Protocol 21 | // 22 | 23 | #define TEXT_OUT_SPLITER_PROTOCOL \ 24 | { 0x56d830a0, 0x7e7a, 0x11d3, {0xbb, 0xa0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 25 | 26 | #define ERROR_OUT_SPLITER_PROTOCOL \ 27 | { 0xf0ba9039, 0x68f1, 0x425e, {0xaa, 0x7f, 0xd9, 0xaa, 0xf9, 0x1b, 0x82, 0xa1}} 28 | 29 | #define TEXT_IN_SPLITER_PROTOCOL \ 30 | { 0xf9a3c550, 0x7fb5, 0x11d3, {0xbb, 0xa0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /uefi_bootloader/efi_prebuilts/gnu-efi/linux-x86_64/include/efi/efistdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef _EFISTDARG_H_ 2 | #define _EFISTDARG_H_ 3 | 4 | /*++ 5 | 6 | Copyright (c) 1998 Intel Corporation 7 | 8 | Module Name: 9 | 10 | devpath.h 11 | 12 | Abstract: 13 | 14 | Defines for parsing the EFI Device Path structures 15 | 16 | 17 | 18 | Revision History 19 | 20 | --*/ 21 | #ifdef __GNUC__ 22 | #include "stdarg.h" 23 | #else 24 | #define _INTSIZEOF(n) ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) ) 25 | 26 | typedef CHAR8 * va_list; 27 | 28 | #define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) 29 | #define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) 30 | #define va_end(ap) ( ap = (va_list)0 ) 31 | #endif 32 | 33 | #endif /* _INC_STDARG */ 34 | -------------------------------------------------------------------------------- /common/ld/elf_ld/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | CSOURCES = $(wildcard *.c) 18 | include $(PROJS)/loader/rule.linux 19 | -------------------------------------------------------------------------------- /common/util/linux/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | CSOURCES = $(wildcard *.c) 18 | include $(PROJS)/loader/rule.linux 19 | -------------------------------------------------------------------------------- /common/ld/image_accessors/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | CSOURCES = image_access_mem.c 18 | include $(PROJS)/loader/rule.linux 19 | -------------------------------------------------------------------------------- /pre_os/xmon_loader/utils/string/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | CSOURCES = $(wildcard *.c) 18 | include $(PROJS)/loader/rule.linux 19 | -------------------------------------------------------------------------------- /pre_os/xmon_loader/utils/x64/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | CSOURCES = $(wildcard *.c) 18 | include $(PROJS)/loader/rule.linux 19 | -------------------------------------------------------------------------------- /pre_os/common/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | SUBDIRS = loader_serial 18 | 19 | .PHONY: all 20 | 21 | all: 22 | $(foreach D, $(SUBDIRS), $(MAKE) -C $(D);) 23 | -------------------------------------------------------------------------------- /pre_os/xmon_loader/utils/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2015 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | 17 | SUBDIRS = memory screen string 18 | 19 | .PHONY: all 20 | 21 | all: 22 | $(foreach D, $(SUBDIRS), $(MAKE) -C $(D);) 23 | -------------------------------------------------------------------------------- /pre_os/tools/readme.txt: -------------------------------------------------------------------------------- 1 | this tool: 2 | 1. is used to append other binaries (e.g. starter.bin, xmon_loader, startap, xmon) to ikgt_pkg.bin 3 | 2. after that it will update the file offset header in ikgt_pkg.bin file. 4 | 3. also, it does build time oversize check, to find error as early as possible. 5 | 4. will pack secondary guest image if it exists in pre_os/build/linux/release 6 | 7 | 8 | usage: 9 | [