Delayed reset for code execution from memory device
A memory device includes a non-volatile memory (NVM) and circuitry. The circuitry is configured to initialize and prepare the NVM for executing memory-access operations for a processor, and to ascertain that no memory-access operations are received from the processor before the NVM is ready, by preventing the processor from bootstrapping during at least part of initialization and preparation of the NVM.
1. A memory device, comprising:
a non-volatile memory (NVM), which is configured to store boot code of a processor; and
circuitry, configured to:
initialize and prepare the NVM for executing memory-access operations for a processor; and
ascertain that no memory-access operations are received from the processor before the NVM is ready, by responding to a request from the processor for the boot code during at least part of initialization and preparation of the NVM by providing an alternative code for execution by the processor, such that while executing the alternative code, the processor is prevented from bootstrapping,
wherein the alternative code comprises a first part that is executed once, and a second part that is executed repeatedly until the at least part of the initialization and preparation of the NVM is complete.
2. The memory device according to claim 1 , wherein the circuitry is configured to
respond to a subsequent request from the processor for the boot code after the at least part of the initialization and preparation of the NVM by providing the boot code.
3. The memory device according to claim 1 , wherein the alternative code causes the processor to repeatedly loop until the at least part of the initialization and preparation of the NVM is complete.
4. The memory device according to claim 1 , wherein the first part comprises instructions that load a register of the processor.
5. The memory device according to claim 1 , wherein the NVM and the circuitry are packaged in a same Integrated Circuit (IC) package.
6. A method in a memory device, comprising:
using circuitry in the memory device, initializing and preparing a non-volatile memory (NVM) in the memory device for executing memory-access operations for a processor;
storing boot code of the processor in the NVM; and
ascertaining, by the circuitry in the memory device, that no memory-access operations are received from the processor before the NVM is ready, by responding to a request from the processor for the boot code during at least part of initialization and preparation of the NVM by providing an alternative code for execution by the processor, such that while executing the alternative code, the processor is prevented from bootstrapping,
wherein the alternative code comprises a first part that is executed once, and a second part that is executed repeatedly until the at least part of the initialization and preparation of the NVM is complete.
7. The method according to claim 6 , and comprising
after the at least part of the initialization and preparation of the NVM, responding to a subsequent request from the processor for the boot code by providing the boot code.
8. The method according to claim 6 , wherein the alternative code causes the processor to repeatedly loop until the at least part of the initialization and preparation of the NVM is complete.
9. The method according to claim 6 , wherein the first part comprises instructions that load a register of the processor.
10. The method according to claim 6 , wherein the NVM and the circuitry are packaged in a same Integrated Circuit (IC) package.