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; and 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.