Patent ID: 7844962

Claim:
A patching device for use with a processor having a first non-volatile memory which stores data and a second memory for storing a plurality of patch data items, wherein each patch data item in the second memory is associated with an indicator indicating whether the patch data item precedes one of the other patch data items in a block of patch data items, the patching device comprising: a third memory having a plurality of memory locations, one memory location being a patch block memory location, each memory location configured to store an address, in the first memory, at which a patch is to be performed, wherein each address stored in the plurality of memory locations in the third memory is associated with one of the plurality of data items in the second memory; a comparator which is configured to compare a first address of the first memory that is being accessed by the processor with the addresses stored in the third memory; and a control unit which is configured to select between data from the first memory or one of the plurality of patch data items from the second memory depending on the comparison, and when the first address of the first memory that is being accessed by the processor matches an address stored in the third memory to: select the one of the plurality of patch data items that corresponds to the first address of the first memory that is being accessed; determine whether the indicator associated with the selected one of the plurality of patch data items indicates that the selected one of the plurality of patch data items precedes one of the other patch data items in a block of patch data items, such that a data item at the first address in the first memory is to be patched with a plurality of patch data items in the block of patch data items; and when the control unit determines that the selected one of the plurality of patch data items precedes one of the other patch data items in a block of patch data items: store in the patch block memory location a next address in the first memory that is subsequent to the first address of the first memory that is being accessed by the processor; and associate the next address in the first memory with the one of the other patch data items that the selected one of the plurality of patch data items precedes in the block of patch data items.