小编Pet*_*ost的帖子

UEFI 引导服务 CreateEvent() 返回状态 EFI_INVALID_PARAMETER

我正在 NASM 程序集中编写一个简单的 UEFI 应用程序,并且我正在尝试为一个自由运行的计时器创建一个事件,但是CreateEvent总是返回调用,EFI_INVALID_PARAMETER我不知道为什么。

section .text

_start:
    mov [ptrSystemTable], rdx
...
    mov rcx, EVT_TIMER
    mov rdx, TPL_APPLICATION
    mov r8, 0
    mov r9, 0
    lea rbx, [ptrTimerEvent]
    push rbx

    mov rax, [ptrSystemTable]
    mov rax, [rax + EFI_SYSTEM_TABLE.BootServices]
    call [rax + EFI_BOOT_SERVICES.CreateEvent]

    cmp rax, EFI_SUCCESS
    jne errorCode
...
Run Code Online (Sandbox Code Playgroud)
section .data    
    ptrSystemTable  dq  0          
    ptrTimerEvent   dq  0
Run Code Online (Sandbox Code Playgroud)
; Include file with a bunch of definitions and structures

EVT_TIMER               equ 0x80000000
TPL_APPLICATION         equ 4

%macro POINTER 0
    RESQ 1 …
Run Code Online (Sandbox Code Playgroud)

x86 assembly x86-64 nasm uefi

5
推荐指数
1
解决办法
223
查看次数

标签 统计

assembly ×1

nasm ×1

uefi ×1

x86 ×1

x86-64 ×1