• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## @file
2# Entry Point of Emu Emulator
3#
4# Main executable file of Unix Emulator that loads PEI core after initialization finished.
5# Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
6# Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
7#
8#  This program and the accompanying materials
9#  are licensed and made available under the terms and conditions of the BSD License
10#  which accompanies this distribution. The full text of the license may be found at
11#  http://opensource.org/licenses/bsd-license.php
12#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14#
15#
16##
17
18[Defines]
19  INF_VERSION                    = 0x00010005
20  BASE_NAME                      = Host
21  FILE_GUID                      = 8863C0AD-7724-C84B-88E5-A33B116D1485
22  MODULE_TYPE                    = USER_DEFINED
23  VERSION_STRING                 = 1.0
24
25#
26# The following information is for reference only and not required by the build tools.
27#
28#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
29#
30
31[Sources]
32  Host.c
33  EmuThunk.c
34  X11GraphicsWindow.c
35  Pthreads.c
36  PosixFileSystem.c
37  BlockIo.c
38  LinuxPacketFilter.c
39  BerkeleyPacketFilter.c
40  MemoryAllocationLib.c
41
42[Sources.X64]
43  X64/Gasket.S        # convert between Emu x86_64 ABI and EFI X64 ABI
44  X64/SwitchStack.S
45
46[Sources.IA32]
47  Ia32/Gasket.S       # enforce 16-byte stack alignment for Mac OS X
48  Ia32/SwitchStack.c
49
50
51[Packages]
52  MdePkg/MdePkg.dec
53  MdeModulePkg/MdeModulePkg.dec
54  EmulatorPkg/EmulatorPkg.dec
55
56[LibraryClasses]
57  DebugLib
58  PcdLib
59  PrintLib
60  BaseMemoryLib
61  BaseLib
62  PeCoffLib
63  ThunkPpiList
64  ThunkProtocolList
65  PpiListLib
66  PeiServicesLib
67  PeCoffGetEntryPointLib
68
69[Ppis]
70  gEfiPeiStatusCodePpiGuid                      # PPI ALWAYS_PRODUCED
71  gEmuThunkPpiGuid
72
73[Protocols]
74  gEmuIoThunkProtocolGuid
75  gEmuIoThunkProtocolGuid
76  gEmuGraphicsWindowProtocolGuid
77  gEmuThreadThunkProtocolGuid
78  gEmuBlockIoProtocolGuid
79  gEmuSnpProtocolGuid
80  gEfiSimpleFileSystemProtocolGuid
81
82[Guids]
83  gEfiFileSystemVolumeLabelInfoIdGuid           # SOMETIMES_CONSUMED
84  gEfiFileInfoGuid                              # SOMETIMES_CONSUMED
85  gEfiFileSystemInfoGuid                        # SOMETIMES_CONSUMED
86
87[Pcd]
88  gEmulatorPkgTokenSpaceGuid.PcdEmuBootMode
89  gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume
90  gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize
91  gEmulatorPkgTokenSpaceGuid.PcdEmuFdBaseAddress
92  gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize
93  gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize
94  gEmulatorPkgTokenSpaceGuid.PcdEmuApCount
95  gEmulatorPkgTokenSpaceGuid.PcdEmuVirtualDisk
96  gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window"
97  gEmulatorPkgTokenSpaceGuid.PcdEmuFileSystem
98  gEmulatorPkgTokenSpaceGuid.PcdEmuSerialPort
99  gEmulatorPkgTokenSpaceGuid.PcdEmuNetworkInterface
100  gEmulatorPkgTokenSpaceGuid.PcdNetworkPacketFilterSize
101
102  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoveryBase
103  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize
104  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageVariableBase
105  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
106  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogBase
107  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogSize
108  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwWorkingBase
109  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
110  gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwSpareBase
111  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
112  gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage
113
114[FeaturePcd]
115  gEmulatorPkgTokenSpaceGuid.PcdEmulatorLazyLoadSymbols
116
117
118[BuildOptions]
119   GCC:*_*_IA32_DLINK_FLAGS == -o $(BIN_DIR)/Host -m32 -L/usr/X11R6/lib
120   GCC:*_*_IA32_CC_FLAGS == -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
121   GCC:*_*_IA32_PP_FLAGS == -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
122   GCC:*_*_IA32_ASM_FLAGS == -m32 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
123
124   GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib
125   GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
126   GCC:*_GCC44_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
127   GCC:*_GCC45_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
128   GCC:*_GCC46_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
129   GCC:*_GCC47_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
130   GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
131   GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
132   GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
133   GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
134
135   GCC:*_*_*_DLINK2_FLAGS == -lpthread -ldl -lXext -lX11
136
137#
138# Need to do this link via gcc and not ld as the pathing to libraries changes from OS version to OS version
139#
140   XCODE:*_*_IA32_DLINK_PATH == gcc
141   XCODE:*_*_IA32_CC_FLAGS == -arch i386 -O0 -g -include $(DEST_DIR_DEBUG)/AutoGen.h -c -fshort-wchar -fno-strict-aliasing
142   XCODE:*_*_IA32_DLINK_FLAGS == -arch i386 -o $(BIN_DIR)/Host -L/usr/X11R6/lib -lXext -lX11 -framework Carbon
143   XCODE:*_*_IA32_ASM_FLAGS == -arch i386 -g
144
145   XCODE:*_*_X64_DLINK_PATH == gcc
146   XCODE:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/Host -L/usr/X11R6/lib -lXext -lX11 -framework Carbon
147   XCODE:*_*_X64_ASM_FLAGS == -g
148   XCODE:*_*_X64_CC_FLAGS = -I$(WORKSPACE)/EmulatorPkg/Unix/Host/X11IncludeHack
149