後來我還是用Simon的helloworld查了一下
結果發現自己真的是問題很大,所以紀錄一下
Size大了十倍以上
笑死
難怪上面跟工程師吵著要摘廢code
不然200T也不夠用
--dec.dec--Start
[Defines]
DEC_SPECIFICATION = 0x00010005
PACKAGE_NAME = SimonPkg
PACKAGE_GUID = 39FBA1D6-6DCE-4a75-B150-017A53B4548B
PACKAGE_VERSION = 0.01
[Includes]
Include
--dec.dec--End
--dsc.dsc--Start
[Defines]
PLATFORM_NAME = SimonPkg
PLATFORM_GUID = B04C9282-097B-4616-8712-1E4E5502A1E7
PLATFORM_VERSION = 0.01
DSC_SPECIFICATION = 0x00010006
OUTPUT_DIRECTORY = 0Qoo
SUPPORTED_ARCHITECTURES = IA32|X64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
!if $(TARGET) == DEBUG
DEFINE DEBUG_ENABLE_OUTPUT = TRUE # Set to TRUE to enable debug output
DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000044 # Flags to control amount of debug output
DEFINE DEBUG_PROPERTY_MASK = 0x2F
!else
DEFINE DEBUG_ENABLE_OUTPUT = FALSE # Set to TRUE to enable debug output
DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000040 # Flags to control amount of debug output
DEFINE DEBUG_PROPERTY_MASK = 0
!endif
[PcdsFixedAtBuild]
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
[LibraryClasses]
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
!if $(DEBUG_ENABLE_OUTPUT)
DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
!else ## DEBUG_ENABLE_OUTPUT
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
!endif ## DEBUG_ENABLE_OUTPUT
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
[Components]
0sample/inf.inf
--dsc.dsc--End
--inf.inf--Start
[Defines]
INF_VERSION = 0x00010006
BASE_NAME = HelloWorld
FILE_GUID = FDBA06BF-0785-40fe-9266-4A9BE8731C24
MODULE_TYPE = UEFI_APPLICATION
VERSION_STRING = 0.1
ENTRY_POINT = UefiMain
[Sources]
HelloWorld.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
UefiApplicationEntryPoint
UefiLib
IoLib
--inf.inf--End
--HelloWorld.c--Start
#include <Library/IoLib.h>
#include <Library/UefiLib.h>
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
IoWrite8 (0x70, 0x04);
IoWrite8 (0x71, 0);
IoWrite8 (0x70, 0x02);
IoWrite8 (0x71, 0);
IoWrite8 (0x70, 0x00);
IoWrite8 (0x71, 0);
return EFI_SUCCESS;
}
--HelloWorld.c--End