1. A method of obtaining an instruction for triggering a function, adapted to a computer system using a unified extensible firmware interface (UEFI), the method comprising: accessing a variable in a read-only memory (ROM) of a basic input/output system (BIOS) during a power-on self test (POST) of the computer system, wherein the variable comprises a first element, a second element, and a third element; determining whether values of the first element and the second element respectively match a variable name and a globally unique identifier (GUID) corresponding to the instruction; when the values of the first element and the second element respectively match the variable name and the GUID corresponding to the instruction, executing the function triggered by the instruction according to a value of the third element; and respectively setting the values of the first element, the second element, and the third element of the variable through a runtime service of the UEFI before accessing the variable during the POST of the computer system, wherein the third element comprises a plurality of register fields, a correspondence exists between the register fields and a plurality of registers of a central processing unit (CPU) of the computer system, and the step of respectively setting the values of the first element, the second element, and the third element of the variable through the runtime service comprises: when the values of the first element and the second element are set as the variable name and the GUID corresponding to the instruction, obtaining at least one register value required by the function triggered by the instruction, wherein each of the at least one register value is corresponding to one of the registers; and writing each of the at least one register value into one of the register fields according to the correspondence.