創作內容

1 GP

呵呵

作者:QooOGC│2023-07-27 16:20:49│巴幣:2│人氣:59
後來我還是用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
引用網址:https://home.gamer.com.tw/TrackBack.php?sn=5763170
All rights reserved. 版權所有,保留一切權利

相關創作

留言共 1 篇留言

Àikhùn龜台文
:0

07-27 21:54

QooOGC
[e35]07-31 15:03
我要留言提醒:您尚未登入,請先登入再留言

1喜歡★juju0500 可決定是否刪除您的留言,請勿發表違反站規文字。

前一篇:無題... 後一篇:裝完vs2022還有1T...

追蹤私訊切換新版閱覽

作品資料夾

black0975???
今天天氣真好,很適合發脾氣。看更多我要大聲說昨天16:38


face基於日前微軟官方表示 Internet Explorer 不再支援新的網路標準,可能無法使用新的應用程式來呈現網站內容,在瀏覽器支援度及網站安全性的雙重考量下,為了讓巴友們有更好的使用體驗,巴哈姆特即將於 2019年9月2日 停止支援 Internet Explorer 瀏覽器的頁面呈現和功能。
屆時建議您使用下述瀏覽器來瀏覽巴哈姆特:
。Google Chrome(推薦)
。Mozilla Firefox
。Microsoft Edge(Windows10以上的作業系統版本才可使用)

face我們了解您不想看到廣告的心情⋯ 若您願意支持巴哈姆特永續經營,請將 gamer.com.tw 加入廣告阻擋工具的白名單中,謝謝 !【教學】