Method and apparatus for micro-code execution
AssigneeRealtek Semiconductor Corp.
InventorsChing-Hua Su, Hsin-Hung Chen
Life of this patent
Estimating the term…
Abstract
A method for micro-code execution for an electronic device is disclosed. The method includes: providing the electronic device with a micro-code partitioned into a main core and at least a function code, the micro-code being stored in a first storage module of the electronic device; and when the electronic device is powered on, loading the main core from the first storage module into a second storage module of the electronic device, and switching between the second storage module for executing the main core and the first storage module for executing the function code to control operation of the electronic device. The function code is executed when called by execution of the main core.
Claims18
A method for micro-code execution, comprising the steps of:
- loading a main core of a micro-code from a first storage module into a second storage module of an electronic device;
- switching execution between the second storage module for executing the main core and the first storage module for executing one or a plurality of function codes of the micro-code to control operation of the electronic device;
- the main core being executed from the second storage module, and the function code or the function codes being stored in and executed from the first storage module, each of the function codes corresponding to a type of a storage medium;
- executing an update program in the main core from the second storage module to update the micro-code stored in the first storage module when data of the micro-code is to be updated;
- executing the main core to monitor for receiving a command issued by a host;
- executing the main core to check a type of a storage medium;
- when the type is determined as a specific type and the corresponding function code is required to act upon the storage medium, switching execution of the main core to execution of the function code;
- and
- after the corresponding function code acting upon the storage medium is finished, switching execution of the function code to execution of the main core;
- wherein the function code or the function codes are executed when called by execution of the main core in the second storage module after the electronic device has completely booted.
An electronic device comprising:
- a first storage module storing a micro-code partitioned into a main core and at least a function code;
- a second storage module;
- and
- a microprocessor, coupled to the first storage module and the second storage module, for loading the main core from the first storage module into the second storage module and for switching execution between the second storage module for executing the main core and the first storage module for executing the function code to control operation of the electronic device;
- the main core being executed from the second storage module, and the function code or the function codes being stored in and executed from the first storage module;
- wherein the function code is executed when called by execution of the main core after the electronic device has completely booted, wherein the micro-code includes a plurality of function codes each corresponding to a type of a storage medium, wherein the main core comprises an update program, wherein the microprocessor is configured to execute the update program of the main core read from the second storage module to update the micro-code stored in the first storage module when data of the micro-code is to be updated, wherein the microprocessor executes the main core to monitor for receiving a command issued by a host, and wherein the microprocessor executes the main core to check a type of a storage medium, switches execution of the main core to execution of the function code when the type is determined as a specific type and the corresponding function code is required to act upon the storage medium, and switches execution of the function code to execution of the main core when the corresponding function code acting upon the storage medium is finished.
A micro-code execution method for an electronic device, the electronic device comprising a first storage module and a second storage module, the first storage module for storing a micro-code partitioned into a loader, a main core and a plurality of function codes, each of the function codes corresponding to a type of a storage medium, the method comprising the steps of:
- executing the loader to load the main core from the first storage module into the second storage module;
- executing the main core in the second storage module to monitor for receiving a command issued by a host;
- executing the main core to check a type of a storage medium;
- when the type is determined as a specific type and the corresponding function code is required to act upon the storage medium, switching execution of the main core to execution of the function code;
- and
- after the corresponding function code acting upon the storage medium is finished, switching execution of the function code to execution of the main core;
- executing an update program of the main core in the second storage module to update the micro-code stored in the first storage module when data of the micro-code is to be updated;
- wherein the main core is executed from the second storage module, and the corresponding function code is stored in and executed from the first storage module;
- and
- the function code is executed when called by execution of the main core after the electronic device has completely booted.
Dependencies are inferred from the claim text.