Patent ID: 8156486

Claim:
A patching device, comprising: a memory, comprising a read-only memory (ROM) code region storing a plurality of firmware functions, and a patch function region storing a patch function provided to substitute for one of the firmware functions; an instruction generator; a first multiplexer, coupled to the memory and the instruction generator; and a patch determination unit, coupled to the instruction generator and the first multiplexer, obtaining a fetch address from a processor, determining whether the fetch address corresponds to the replaced firmware function, directing the first multiplexer to output an instruction of the fetch address of the ROM code region to respond to the processor when the fetch address does not correspond to the replaced firmware function, and directing the first multiplexer to output an artificial instruction generated by the instruction generator to respond to the processor when the fetch address corresponds to the replaced firmware function, wherein the generated artificial instruction is one of series of machine codes corresponding to a plurality of patch intermediary instructions utilized to direct the processor to jump to the beginning address of the patch function.