WO2014160375A1 - Boot sequencing for multi boot devices - Google Patents

Boot sequencing for multi boot devices Download PDF

Info

Publication number
WO2014160375A1
WO2014160375A1 PCT/US2014/026424 US2014026424W WO2014160375A1 WO 2014160375 A1 WO2014160375 A1 WO 2014160375A1 US 2014026424 W US2014026424 W US 2014026424W WO 2014160375 A1 WO2014160375 A1 WO 2014160375A1
Authority
WO
WIPO (PCT)
Prior art keywords
boot
image
boot image
sequence number
memory
Prior art date
Application number
PCT/US2014/026424
Other languages
French (fr)
Inventor
Roshan Samuel
Rodney Pesavento
Igor Wojewoda
Original Assignee
Microchip Technology Incorporated
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Microchip Technology Incorporated filed Critical Microchip Technology Incorporated
Priority to EP14720356.6A priority Critical patent/EP2972809B1/en
Priority to KR1020157023560A priority patent/KR20150129692A/en
Priority to CN201480011451.3A priority patent/CN105027080B/en
Publication of WO2014160375A1 publication Critical patent/WO2014160375A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/441Multiboot arrangements, i.e. selecting an operating system to be loaded
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/4408Boot device selection

Definitions

  • FIG. 2 schematically illustrates operation of embodiments.
  • any examples or illustrations given herein are not to be regarded in any way as restrictions on, limits to, or express definitions of, any term or terms with which they are utilized. Instead these examples or illustrations are to be regarded as being described with respect to one particular embodiment and as illustrative only. Those of ordinary skill in the art will appreciate that any term or terms with which these examples or illustrations are utilized encompass other embodiments as well as implementations and adaptations thereof which may or may not be given therewith or elsewhere in the specification and all such embodiments are intended to be included within the scope of that term or terms. Language designating such non-limiting examples and illustrations includes, but is not limited to: “for example,” “for instance,” “e.g.,” “in one embodiment,” and the like.
  • the finite state machine 120 can be used to determine the relative ordering of any number of boot images.
  • the finite state machine 120 compares the boot sequence numbers of two boot images at one time.
  • a series of pair-wise comparisons can be made in order to determine the relative ordering of the boot sequence numbers for any number of boot images.

Abstract

A multi-boot device capable of booting from a plurality of boot devices, each storing a boot image. The multi-boot device determines which boot device to load based on sequence numbers assigned to each of the boot devices. Some embodiments will make this determination using only hardware operations. The multi-boot device compares the sequence numbers of the available boot devices in order to determine the boot image to be loaded. The address of the selected boot image is then mapped to the device's default boot vector. The remaining images are likewise mapped to a secondary boot memory. The device then boots from the default boot vector. The user can change the boot device to be loaded by modifying one or more of the boot sequence numbers. The boot images can be updated without resetting the device by switching execution to and from boot images in the secondary boot memory.

Description

BOOT SEQUENCING FOR MULTI BOOT DEVICES
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit of U.S. Provisional Application No. 61/784,833 filed on March 14, 2013, which is incorporated herein in its entirety.
TECHNICAL FIELD
The present disclosure relates to microcontrollers and microprocessors and, particularly, boot sequencing for multi-booting embedded microcontroller systems.
BACKGROUND
Upon being powered or reset, an embedded microcontroller must select a boot device containing a boot image from which the embedded system will run. The microcontroller may support the use of more than one boot device. Multi-booting refers to the microcontroller selecting between multiple available boot devices. In order to support multi-booting, a mechanism is required that allows the microcontroller to select the desired boot device from the set of available boot devices.
Systems typically utilize a default boot vector to identify the boot device containing the boot image that is to be loaded. A default boot vector, which is sometimes referred to as a reset vector, is a designated address space that identifies the location of the boot device from which the system is presently configured to run. Upon a reboot or reset, the CPU accesses the boot vector and is directed to the location of a boot device containing a boot image, which is then loaded. Each boot image will typically include application code for operation of the embedded system and boot loader code for loading the application code. The boot loader initializes the system and loads the application code for execution by the system. In a single boot system, the sole boot image is identified by the boot vector. However, in a multi-boot system, the problem arises as to how to adapt this boot vector mechanism for selecting between multiple available boot devices.
One solution for supporting multi-booting is to change the boot vector that is utilized. This can be accomplished by inserting a jump instruction to be executed in conjunction with a reset instruction. The jump instruction directs the system to the location of a selected boot device. Another possibility is to redefine the location of the boot vector prior to the issuance of a reset command such that, upon reset, the system loads the boot image specified by this redefined boot vector. Another possibility is to circumvent the boot vector by placing the boot image at a fixed address and programming the system to boot directly from this address.
These conventional approaches require making significant changes to the system's software each time a different boot device is selected. For instance, if the location of the boot vector is changed, boot images must be recompiled in order to utilize the new boot vector. As changes to the boot images are made, the user must ensure that updated boot images are configured according to the remapped boot vector. With each change to the location of the boot vector, the user must propagate these changes to all relevant boot images. If the boot vector is circumvented entirely, not only must each boot image be recompiled to point to the address location of the boot code to be used, the device logic itself must be altered to circumvent the default boot vector and, as before, each boot image would have to be recompiled in order to reset to this new boot code location. It would be desirable to have a configurable multi-booting solution that does not require recompiling boot images each time a change to the selected boot device is made. It would be further desirable to enable the multi-booting selections to be made via a simple hardware configuration.
SUMMARY Conventional dual-booting approaches require substantial reconfiguration in order to change the selected boot image and provide no ability to update boot images in a fail-safe manner. Hence, there is a need for configurable dual-booting solution that allows boot determinations to be made in hardware and provides for seamless updating of boot images. These and other drawbacks in the prior art are overcome in large part by a system and method according to embodiments of the present invention.
According to an embodiment, a method for booting a multi-boot device having a first boot image and a second boot image, comprising: determining a first boot sequence number associated with the first boot image; determining a second boot sequence number associated with the second boot image; identifying a selected boot image by comparing the first sequence number and the second boot sequence number wherein the comparison determines whether the first boot image or the second boot image is the selected boot image, wherein the selected boot image is identified by device hardware operations; mapping the address of the selected boot image to a primary boot memory location specified by a default boot vector; and booting the device from the default boot vector.
Further embodiments may also include: determining the first boot sequence number and determining the second boot sequence number comprises, respectively, reading the first boot sequence number from a predetermined location associated with the first boot image and reading the second boot sequence number from a predetermined location associated with the second boot image. Further embodiments may also include verifying that multi-booting of the device has been enabled. In further embodiments, the boot image not determined to be the selected boot image is a secondary boot image and may also include mapping the address of the secondary boot image to a secondary boot memory location wherein the contents of the secondary boot memory location can be updated without affecting device operations executing from the primary boot memory location. Further embodiments may also include: processing a command directing the device to swap from the selected boot image to the boot image stored in the secondary boot memory location; and switching execution of the device from the selected boot image to the boot image stored in the secondary boot memory location wherein the switch is made without resetting the device. Further embodiments may also include: setting a configuration parameter indicating whether the device is executing from the primary boot memory location or the secondary boot memory location. In further embodiments, the verification that multi-booting is enabled comprises determining whether the first boot image and the second boot image are both valid boot images.
BRIEF DESCRIPTION OF THE DRAWINGS
The present invention may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings. The use of the same reference symbols in different drawings indicates similar or identical items.
FIG. 1 is a block diagram of an exemplary processor according to embodiments.
FIG. 2 schematically illustrates operation of embodiments.
FIG. 3 is a flowchart illustrating operation of embodiments.
FIG. 4 is a flowchart illustrating operation of embodiments.
DETAILED DESCRIPTION
The disclosure and various features and advantageous details thereof are explained more fully with reference to the exemplary, and therefore non-limiting, embodiments illustrated in the accompanying drawings and detailed in the following description. Descriptions of known programming techniques, computer software, hardware, operating platforms and protocols may be omitted so as not to unnecessarily obscure the disclosure in detail. It should be understood, however, that the detailed description and the specific examples, while indicating the preferred embodiments, are given by way of illustration only and not by way of limitation. Various substitutions, modifications, additions and/or rearrangements within the spirit and/or scope of the underlying inventive concept will become apparent to those skilled in the art from this disclosure.
As used herein, the terms "comprises," "comprising," "includes," "including," "has," "having," or any other variation thereof, are intended to cover a non-exclusive inclusion. For example, a process, product, article, or apparatus that comprises a list of elements is not necessarily limited only those elements but may include other elements not expressly listed or inherent to such process, process, article, or apparatus. Further, unless expressly stated to the contrary, "or" refers to an inclusive or and not to an exclusive or. For example, a condition A or B is satisfied by any one of the following: A is true (or present) and B is false (or not present), A is false (or not present) and B is true (or present), and both A and B are true (or present). Additionally, any examples or illustrations given herein are not to be regarded in any way as restrictions on, limits to, or express definitions of, any term or terms with which they are utilized. Instead these examples or illustrations are to be regarded as being described with respect to one particular embodiment and as illustrative only. Those of ordinary skill in the art will appreciate that any term or terms with which these examples or illustrations are utilized encompass other embodiments as well as implementations and adaptations thereof which may or may not be given therewith or elsewhere in the specification and all such embodiments are intended to be included within the scope of that term or terms. Language designating such non-limiting examples and illustrations includes, but is not limited to: "for example," "for instance," "e.g.," "in one embodiment," and the like.
As discussed above, an embedded system typically runs from a boot image where the location of the boot image in memory is identified by the default boot vector. The default boot vector specifies the boot image that is to be loaded whenever the system is booted or reset. This default boot vector may be located at any predetermined location in program memory as long as this location is uniformly known to the CPU and the boot images as the address of the first boot instruction to be executed upon a reboot or a rest. Upon the system being booted or reset, the address specified by the default boot vector identifies the boot image to be loaded. However, unlike conventional systems, embodiments provide for the ability to change the boot image to be loaded via a simple configuration process that can be executed in hardware.
As described above, changing the location of the default boot vector is possible but requires recompiling each of the boot images to point to this new boot vector location. Instead, embodiments provide the ability to change the boot image that is to be used without having to recompile the boot images or alter the logic by which selected boot image is determined by the system. In other words, embodiments utilize a conventional default boot vector that is the first instruction executed upon any reboot or reset of the system. Embodiments provide the ability to switch boot images by re-ordering the available boot devices. Thus, a different boot device can be designated as the selected boot devices by reordering the boot devices in the sequence. According to embodiments, a boot device may any memory device that can be assigned to the boot vector, such as internal or external volatile memory (such as RAM), or internal or external non-volatile memory such as Flash memory, EEPROM or an SD Card. According to embodiments, boot devices are assigned sequence numbers that specify the rank of each boot device containing a boot image among the available set of boot devices. Upon a reboot or reset, the system may use a state machine implemented in hardware to determine the relative ordering of the available boot devices based on the sequence numbers of the boot devices. Once the selected boot device has been identified, the address of the selected boot device is mapped to the default boot vector without altering the boot image. This allows the CPU to boot conventionally from the default boot vector which is redirected to the selected boot image. In this fashion, any number of boot images can be made available and selected using configurable sequence numbers where the process for selecting the desired boot image can be implemented in hardware and thus executed without the CPU having to load and execute any software.
According to some embodiments, the sequence number provided to each boot image signifies the relative order of the boot images. In one embodiment, the boot image assigned the lowest sequence number is the selected boot image, with the boot image with the next lowest sequence number being the first alternate selected boot image. In another embodiment, the boot image that is provided the highest sequence number is the selected boot image.
In some embodiments, the sequence number for each boot device is stored in a predetermined location of that boot image such that each boot device provides a standardized mechanisms for identifying the sequence number of the boot device. In this manner, the user is able to assign a sequence number to each boot device such that the sequence number is stored as part of the boot image. Each available boot device can then be queried in order to ascertain its assigned sequence number. In another embodiment, the boot device sequence numbers are stored a data structure present in memory. This data structure can be queried in order to determine the available boot devices and the sequence number for each boot device. In another embodiment, sequence numbers are stored external to the boot devices such that each sequence number is stored in a memory location that is associated with a boot device.
After the reset, the sequence numbers are utilized to identify the selected boot device. In some embodiments, a state machine is utilized to read the sequence numbers for all available boot devices and to determine the boot device with the lowest (or highest) sequence number. In this manner, the state machine identifies the selected boot device. According to embodiments, once the relative ordering of the sequence numbers has been used to identify the selected boot device, the address of the selected boot device is mapped to the boot memory specified by the default boot vector. The selected boot image will thus become the default boot image that is loaded on a subsequent reboots or resets and will remain the default boot image until the sequence numbers of the available boot images are altered to indicate that a different boot image has been selected. Also according to embodiments, the address of the boot image with the second ranked sequence number is mapped to a secondary boot memory location. As described below, embodiments provide the ability for users to trigger swapping execution between the boot memory and the secondary boot memory. This provides the opportunity for the device to switch execution to the secondary boot memory while updating the boot image in the boot memory. This allows failsafe updating of boot images and also allows updates to be made without resetting the device.
The CPU then proceeds to execute from the selected boot device. According to some embodiments, sequence numbers of boot devices may be changed via software instructions within the application code where these changes either increment or decrement the sequence number of one or more boot devices. After a boot or reset of the device, the updated sequence numbers are used in determining the relative ordering of the boot devices. In this manner, the user can change the selected boot image without having to recompile any software or alter the booting logic of the device. Consequently, the selected boot image can be determined in hardware by ordering the valid sequence numbers of available boot images.
Each boot memory location is a region in memory that contains a boot image, which is a set of booting instructions and application code from which the CPU can run. However, a region in memory corresponding to a boot memory location may also be blank. This allows the ability to reserve a region in memory, but has the effect of establishing an invalid boot image. The device can then update these invalid boot images while executing from a valid boot image.
In another embodiment explained in further detail below, a user may "hot swap" from one boot image to another without having to reset the device. For example, while executing the application code loaded by a first boot image, the user can trigger an immediate swap to the execution of a second boot image. This provides the ability to swap from the previously selected boot image loaded in boot memory with the boot image loaded in the secondary boot memory, as long as the trigger remains in effect. In some embodiments, this temporary boot image swap can be adopted for use in subsequent resets by adjusting the boot sequence numbers of the boot images. Upon the next reset, the boot images will be remapped accordingly.
Turning now Figure 1, a block diagram of an exemplary microcontroller 100 that implements a multi-boot system in accordance with embodiments is shown. It is noted that other configurations of the microcontroller are possible. Thus, Figure 1 is an exemplary embodiment. The microcontroller 100 includes a bus 101 and a central processing unit (CPU) core 102 coupled to the bus 101. The CPU core 102 may include one or more register arrays 150, an arithmetic logic unit 154, an instruction decode module 156 and a program counter 158. Upon being booted or reset, the CPU core 102 is configured to read its first instruction from the default boot vector 115 stored in program memory.
In the embodiment illustrated in Figure 1 , data memory 108 communicates with the CPU core 102 via the bus 101. The bus 101 also provides the CPU core 102 with access to microcontroller services such as interrupt controllers 1 10 and clock module 11 1. The CPU core 102 can also access one or more peripheral components 1 14 via the bus 101. These peripheral components may be implemented entirely by the microcontroller or may be implemented in some part external to the microcontroller. The peripherals 1 14 available to the microcontroller may implement, for example, timing support, I/O (input/output) interfaces, PWM (pulse width modulation) and USB functionality. The CPU core 101 also communicates with program memory 104. In some embodiments one or more boot images 1 16, 118 are stored in program memory 104. Other embodiments may allow for boot images to be stored in a separate, dedicated memory. The boot images are comprised of a first boot image 1 16 and one or more second boot images 1 18. As described below, embodiments allow the microcontroller 100 to selectively boot based on either the first boot images 116 or one of the second boot images 118. As described above, some embodiments may refer to boot memory locations, regions or devices rather than boot images. Thus, in some embodiments, first boot image 1 16 and second boot image 118 may be represented as regions in memory that are boot memory locations with no guarantee that the region contains a valid boot image. According to the embodiment of Figure 1, a default boot vector 1 15 is located in program memory 104. The CPU core 102 is configured to read its first instruction from the default boot vector 1 15. Some embodiments may allow for the boot vector 1 15 to be located in other non- volatile or volatile memory. The default boot vector 1 15 may be located anywhere in the program memory as long as the CPU core 102 has been configured to access the default boot vector 1 15 upon a boot or reset. The default boot vector 1 15 specifies the location in memory of the boot image to be loaded, which is referred to as the boot memory 130. Thus, upon a boot or reset the CPU core 102 accesses the default boot vector 1 15 and is directed to the address of the boot memory 130 which has been mapped to the address of the selected boot device which stores the selected boot image.
The device may also retain other boot images in program memory via a secondary boot memory 135. Based on the ordering of the boot images by sequence numbers, the selected boot image is identified and its address is mapped to the boot memory 130. The second ranked boot image is the first alternate boot image and its address mapped to secondary boot memory 135. The user can then trigger switching execution from the boot memory 130 and the secondary boot memory 135 as needed in order to update these boot images in a fail-safe manner.
In some embodiments, the boot images 1 16, 1 18 include predetermined locations for storing boot sequence numbers. As illustrated in Figure 1 , the first boot image is comprised of a boot sequence number 128 which is used to determine the relative ordering of the first boot image versus other available boot images that have been assigned a boot sequence number. In this same manner, the second boot image is also comprised of a boot sequence number 126 that specifies the relative order of the second boot image within the set of available boot images.
In order to facilitate determination of the relative ordering of the available boot images, the boot sequence number of each boot image is determined in a standardized manner. In some embodiments, the boot sequence number will be stored in a predetermined location within the boot image. For example, the boot sequence number of each boot image may be located at a memory address that is located at a fixed offset from the first instruction of the boot image. In some embodiments, the memory address at which the boot sequence number is stored within a boot image may be available as a variable that can be queried at a predetermined location within the boot image. In some embodiments, the boot sequence numbers that have been assigned are stored in a data structure. In this scenario, the relative ordering of the available boot images can be ascertained by querying this data structure to obtain the sequence number for each boot image. In some embodiments, the boot sequence numbers will be stored in non- volatile memory external to the boot image.
Every available boot image can be assigned a boot sequence number. However, embodiments may only assign a subset of the available boot images a sequence number. In such scenarios, boot images with no sequence numbers would be ordered behind all boot images with an assigned sequence number. In some embodiments, some of the available boot devices may be invalid and thus cannot be ordered in this fashion. For these invalid boot devices, querying their sequence number returns an error. These invalid boot images would not be mapped to any boot memory and thus do not exist as booting options with multi-boot device.
Figure 1 also illustrates a boot panel comprised of special-purpose configuration registers that are used to direct the booting process in some embodiments. One such register is a dual boot control register 122 that can be used to configure whether the microcontroller 100 is to execute dual booting processes. As explained in more detail below, if the value of the dual boot register 122 does not enable dual booting, the device will proceed to boot the microcontroller as a single boot device. The configuration registers may also comprise a boot swap register 124 that is used to identify the boot image that is presently loaded and to command the device to conduct a hot swap to a specified boot image, for example the boot image in the secondary boot memory. Additional configuration registers may be present that further direct the boot sequencing process.
Figure 2 schematically illustrates a process for utilizing boot sequence numbers in accordance with embodiments. Upon being booted or reset, the device reads the sequence numbers for the two available boot images 1 16, 1 18. At step 201, the boot sequence number 126 for the first boot image 1 16 is determined. At step 202, the boot sequence number 128 for the second boot image is determined. At step 205, the device then compares the first boot image sequence number 128 and the second boot image sequence number 126. Based on this comparison, the selected boot image 210 and the first alternate boot image 215 are identified. At step 220, the address of the boot device storing the selected boot image 210 is mapped to the boot memory location 130. At step 230, the address of the first alternate boot image 215 is mapped to the secondary boot memory location 135. In some embodiments, the address of the remaining valid boot images are mapped, in order, to the secondary boot memory. At step, 235, the CPU core then boots conventionally, by accessing the default boot vector and being redirected to the address of the boot device storing the selected boot image. The CPU core proceeds to boot from the selected boot image.
The selected boot image can be identified, according to some embodiments, utilizing a finite state machine 120. Using a finite state machine for identifying the selected boot image facilitates embodiments that implement configurable dual booting in hardware. The finite state machine 120 is used to make pair-wise comparisons of boot sequence numbers in order to determine their relative ordering. In Figure 2, a finite state machine 120 is used to determine the relative ordering of the boot sequence numbers of a first boot image 1 16 and a second boot image 1 18. At steps 201 and 202, the boot sequence numbers for each of the boot images is determined. As described above, according to some embodiments, the boot sequence number of each boot image may be stored at a predetennined address location of the boot image. Other embodiments may allow for the boot sequence numbers to be stored in other fixed locations or data structures in memory. At step 205, the finite state machine then compares the boot sequence number of the first boot image 128 and the boot sequence number of the second boot image 126.
In the example of Figure 2, the relative ordering of only two boot images is illustrated. It is noted, however, that the finite state machine 120 can be used to determine the relative ordering of any number of boot images. The finite state machine 120 compares the boot sequence numbers of two boot images at one time. However, according to algorithms known in the art, a series of pair-wise comparisons can be made in order to determine the relative ordering of the boot sequence numbers for any number of boot images.
In the embodiment of Figure 3, the device makes a preliminary determination whether to proceed with dual-booting based on whether dual booting has been requested or whether multiple boot images are available for booting. At step 302, the device undergoes a boot or a reset. At step 304, reads the configuration data necessary to determine whether to proceed with dual booting. In one embodiment, the boot configuration panel is accessed in order to read configuration bits that encode dual booting instructions. In some embodiments, these configuration bits will be located in dual boot register 122. Other embodiments may instead store these configuration bits in fixed locations in program memory. In some embodiments, dual booting is determined based on whether multiple valid boot images can be identified. Thus, in step 304, the CPU core accesses the boot sequence numbers for every available boot image. At step 306, the device determines whether dual booting has been enabled. If configuration bits are used, embodiments will determine whether these bits enable dual booting. If dual booting is based on valid boot sequence numbers, embodiments will evaluate the boot sequence numbers that have been identified to determine if two or more valid boot images are available. If only one valid boot image is identified or the configuration bits specify that dual booting is not enabled, the device boots in a single boot configuration at step 315 by booting from the default boot vector. If no valid boot image is identified, the CPU core boots from the boot image specified by the default boot vector, which will be the boot image that was last known to be valid. If step 306 determines that dual boot is enabled, then the selected boot image is determined as described with respect to the embodiment of Figure 2. At step 310, the boot sequence numbers of the first boot image 116 and the second boot image 1 18 are determined. Based on the boot sequence number comparison made at step 312, either the first boot image 1 16 or the second boot image 1 18 is determined to be the selected boot image. If the boot sequence number of the first boot image 1 16 is the lowest boot sequence number or equal to the lowest sequence number, at step 320, the address of the first boot image is mapped to the boot memory and, at step, 325, the address of the second boot image is mapped to secondary boot memory. Conversely, if the boot sequence number of the second boot image 1 18 is the lowest boot sequence number, at step 330, the address of the second boot image is mapped to the boot memory and, at step, 335, the address of the first boot image is mapped to secondary boot memory.
The process by which a boot image hot swap is conducted is shown in Figure 4. At a process step 402, the device is executing according to a first boot image 116. At this point, the boot swap register 124 signals that a hot swap is not presently in effect. At step 410, the boot swap register 124 is used to determine whether a boot swap is to be undertaken. In some embodiments, the boot swap register 124 may encode a value directing that a boot swap be undertaken. For example, a zero entry in the boot swap register may indicate that the current boot image should be maintained and a one entry may indicate that the current boot image should be swapped. Another possibility is for the boot swap register 124 to encode the device number of the boot device that is presently loaded. As long as the boot swap register 124 contains the device number corresponding to the currently executing boot image, no swap is made. If the boot swap register 124 is changed to point to a different device number, this signals that a boot swap should be undertaken. Yet another possibility, is for boot swaps to be specified in software via a bootswap instruction. This embodiment is the focus of the remaining elements of Figure 4. If boot swap register 124 indicates that no boot swap is presently requested, the device continues to monitor the boot swap register until any such indication is identified.
In process step 404, it is determined that the user has directed the device to enact a hot swap of boot images. In the embodiment of Figure 4, the user will trigger a hot swap of boot images by issuing a BOOTSWP instruction that is followed by a GOTO <target> instruction where the <target> specifies the boot image to be hot swapped. For instance, the <target> would specific the second boot image 1 18 as the boot image to be swapped in place of the active boot image. At step 404, the CPU core 102 executes the BOOTSWP instruction and interrupts the execution of the current active first boot image 116.
At process step 406, the CPU core 102 executes the GOTO instruction and jumps directly to the <target> boot image, for example the second boot image 1 18. Upon executing this jump, the CPU core 102 begins executing the second boot image 1 18. This results in a hot swap from the first boot image 1 16 to the second boot image 1 18 with no reset of the device and no changes to the exiting device configuration. At process step 408, the configuration data is updated to reflect that active boot image has been hot swapped. For instance, boot swap register 124 would be updated to indicate that no hot swap is presently requested or specify the address of the boot image that is presently executing.
A hot swap of boot images, by itself, does not alter the boot image that is mapped to boot memory and thus does not change the boot image that will be loaded upon a reset of the device. Thus, even though the second boot image 118 may have been hot swapped in place of the first boot image 116, if the first boot image 1 16 is still mapped to boot memory and the device will load the first boot image 116 upon a subsequent boot or rest. Unless modifications are made to the boot sequence numbers of the boot images, a hot swap will constitute a temporary swap that lasts only until the device is reset. A hot swap of boot images can be made into permanent swap via the previously described process of updating boot sequence numbers. For example, if the user has hot swapped to the second boot image 1 18, the swap can be made permanent by re-assigning boot sequence numbers of the available boot images such that the second boot image 1 18 has the lowest boot sequence number which results in the second boot image 1 18 being mapped to the default boot vector 1 15.
One advantage provided by embodiments is fail-safe mechanism for updating boot images. If the presently active boot image that is executing receives an update, embodiments provide a fail-safe method for making this update. For instance, the updated boot image can be stored to the secondary boot memory. One the updated boot image has been verified, the sequence numbers can be updated for the executing boot image and the updated boot image, as described above, such that the updated boot image now has the lowest/highest sequence number such that it will be determined to be the selected boot image on the next boot or reset. If a power failure were to occur at any time during the update such that the updated boot image is corrupted, the device can continue operating from the currently executing boot image. If the power failure occurs after the updated boot image is verified but during the sequence number update, either the updated sequence number is valid such that the new boot image is correctly identified as the selected boot image or the sequence number is invalid such that the currently executing boot code is loaded based on it still being located in boot memory and identified by the default boot vector.
Although the foregoing specification describes specific embodiments, numerous changes in the details of the embodiments disclosed herein and additional embodiments will be apparent to, and may be made by, persons of ordinary skill in the art having reference to this description. In this context, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of this disclosure. Accordingly, the scope of the present disclosure should be determined by the following claims and their legal equivalents.

Claims

CLAIMS WHAT IS CLAIMED IS:
1. A method for booting a multi-boot device having a first boot image and a second boot image, comprising: determining a first boot sequence number associated with the first boot image; determining a second boot sequence number associated with the second boot image; identifying a selected boot image by comparing the first sequence number and the second boot sequence number wherein the comparison determines whether the first boot image or the second boot image is the selected boot image, wherein the selected boot image is identified by device hardware operations; mapping the address of the selected boot image to a primary boot memory location specified by a default boot vector; and booting the device from the default boot vector.
2. A method in accordance with claim 1 , wherein determining the first boot sequence number and determining the second boot sequence number comprises, respectively, reading the first boot sequence number from a predetermined location associated with the first boot image and reading the second boot sequence number from a predetermined location associated with the second boot image.
3. A method in accordance with claim 1 , the method further comprising: verifying that multi -booting of the device has been enabled.
4. A method in accordance with claim 1, wherein the boot image not determined to be the selected boot image is a secondary boot image and the method further comprising: mapping the address of the secondary boot image to a secondary boot memory location wherein the contents of the secondary boot memory location can be updated without affecting device operations executing from the primary boot memory location.
5. A method in accordance with claim 4, the method further comprising: processing a command directing the device to swap from the selected boot image to the boot image stored in the secondary boot memory location; and switching execution of the device from the selected boot image to the boot image stored in the secondary boot memory location wherein the switch is made without resetting the device.
6. A method in accordance with claim 5, the method further comprising: setting a configuration parameter indicating whether the device is executing from the primary boot memory location or the secondary boot memory location.
7. A method in accordance with claim 3, wherein verification that multi-booting is enabled comprises determining whether the first boot image and the second boot image are both valid boot images.
8. A multi-boot device having a first boot image and a second boot image, the device comprising: memory storage for a first boot sequence number associated with the first boot image; memory storage for a second boot sequence number associated with the second boot image; a comparator for identifying a selected boot image by comparing the first sequence number and the second boot sequence number wherein the comparison determines whether the first boot image or the second boot image is the selected boot image wherein the comparator is implemented by device hardware operations; a primary boot image memory storage location, wherein the address of the selected boot image is mapped to the primary boot image memory storage; and memory storage for a default boot vector, wherein the default boot vector is accessed by the device upon being booted or reset and wherein the boot vector specifies the location in memory of the primary boot image.
9. A multi-boot device in accordance with claim 8, wherein the first boot sequence number is stored at a predetermined location associate with the first boot image and the second boot sequence number is stored at a predetermined location associated with the second boot image.
10. A multi-boot device in accordance with claim 8, wherein the boot image not determined to be the selected boot image is a secondary boot image the device further comprising: a secondary boot memory storage location for storing the secondary boot image, wherein the contents of the secondary boot memory location can be updated without affecting device operations executing from the primary boot memory location.
1 1. A multi-boot device in accordance with claim 10, wherein the device is configured to process a command directing a swap from the selected boot image to the boot image stored in the secondary boot memory location and wherein execution of the device is switched from the selected boot image to the boot image stored in the secondary boot memory location without resetting the device.
12. A multi-boot device in accordance with claim 1 1, the device further comprising: memory storage for a configuration parameter wherein the parameter indicates whether the device is executing from the primary boot memory location or the secondary boot memory location.
13. A multi-boot device in accordance with claim 8, wherein the comparator is a finite state machine implemented by the device hardware.
14. A multi-boot device in accordance with claim 8 wherein the device determines if multi-booting is enabled by detemiining whether the first boot image and the second boot image are both valid boot images.
15. A multi-boot system for booting a device from one of a plurality boot images, the system comprising: memory storage for a first boot sequence number associated with the first boot image; memory storage for a second boot sequence number associated with the second boot image; a comparator for identifying a selected boot image by comparing the first sequence number and the second boot sequence number wherein the comparison determines whether the first boot image or the second boot image is the selected boot image wherein the comparator is implemented by system hardware operations; a primary boot image memory storage location, wherein the address of the selected boot image is mapped to the primary boot image memory storage; and memory storage for a default boot vector, wherein the default boot vector is accessed by the system upon being booted or reset and wherein the boot vector specifies the location in memory of the primary boot image.
16. A multi-boot system in accordance with claim 15, wherein the first boot sequence number is stored at a predetermined location associate with the first boot image and the second boot sequence number is stored at a predetermined location associated with the second boot image.
17. A multi-boot system in accordance with claim 15, wherein the boot image not determined to be the selected boot image is a secondary boot image the system further comprising: a secondary boot memory storage location for storing the secondary boot image, wherein the contents of the secondary boot memory location can be updated without affecting operations executing from the primary boot memory location.
18. A multi-boot system in accordance with claim 17, wherein the system processes a command directing a swap from the selected boot image to the boot image stored in the secondary boot memory location and wherein execution is switched from the selected boot image to the boot image stored in the secondary boot memory location without resetting the system.
19. A multi-boot system in accordance with claim 18, the device further comprising: memory storage for a configuration parameter wherein the parameter indicates whether execution is from the primary boot memory location or the secondary boot memory location.
20. A multi-boot system in accordance with claim 15, wherein the comparator is a finite state machine implemented in the system hardware.
PCT/US2014/026424 2013-03-14 2014-03-13 Boot sequencing for multi boot devices WO2014160375A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP14720356.6A EP2972809B1 (en) 2013-03-14 2014-03-13 Boot sequencing for multi boot devices
KR1020157023560A KR20150129692A (en) 2013-03-14 2014-03-13 Boot sequencing for multi boot devices
CN201480011451.3A CN105027080B (en) 2013-03-14 2014-03-13 Start-up sequence for multiple start-up devices

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201361784833P 2013-03-14 2013-03-14
US61/784,833 2013-03-14

Publications (1)

Publication Number Publication Date
WO2014160375A1 true WO2014160375A1 (en) 2014-10-02

Family

ID=50625128

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2014/026424 WO2014160375A1 (en) 2013-03-14 2014-03-13 Boot sequencing for multi boot devices

Country Status (6)

Country Link
US (1) US9733950B2 (en)
EP (1) EP2972809B1 (en)
KR (1) KR20150129692A (en)
CN (1) CN105027080B (en)
TW (1) TWI661357B (en)
WO (1) WO2014160375A1 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9733950B2 (en) * 2013-03-14 2017-08-15 Microchip Technology Incorporated Boot sequencing for multi boot devices
JP5875558B2 (en) * 2013-08-28 2016-03-02 京セラドキュメントソリューションズ株式会社 Information processing device
US9652252B1 (en) * 2014-10-29 2017-05-16 Xilinx, Inc. System and method for power based selection of boot images
EP3319540B1 (en) * 2015-07-07 2024-01-24 Intuitive Surgical Operations, Inc. Control of multiple devices
US10191811B2 (en) * 2015-08-13 2019-01-29 Quanta Computer Inc. Dual boot computer system
US10545768B2 (en) * 2016-10-27 2020-01-28 Ricoh Company, Ltd. Information processing apparatus, information processing method, and recording medium
CN106648947B (en) * 2016-12-22 2019-09-13 北海市云盛科技有限公司 A kind of method and apparatus of test multi-controller storage equipment
KR102617354B1 (en) 2017-01-05 2023-12-26 삼성전자주식회사 Secure boot sequencer and secure boot device
KR102445674B1 (en) * 2017-12-18 2022-09-22 삼성전자주식회사 Ram controller configured to selectively boot memory and method of operating the same
US10990372B2 (en) 2018-09-20 2021-04-27 Microsoft Technology Licensing, Llc Updating an edge computing device
US11456891B2 (en) 2018-12-20 2022-09-27 Rolls-Royce North American Technologies Inc. Apparatus and methods for authenticating cyber secure control system configurations using distributed ledgers
US11113074B2 (en) * 2019-06-28 2021-09-07 Qualcomm Incorporated System and method for modem-directed application processor boot flow
US11048521B2 (en) * 2019-09-25 2021-06-29 Adva Optical Networking Se Resilient upgradable boot loader with power reset
US11221858B1 (en) * 2020-10-07 2022-01-11 Dell Products L.P. System control processor (SCP) boot system
CN112764814B (en) * 2021-01-13 2023-11-10 西藏子墨网络科技有限公司 Method, device, terminal and medium for setting starting memory of mobile terminal
US11507385B1 (en) 2021-04-30 2022-11-22 Cortina Access, Inc. Embedded electronic device, boot method, and embedded electronic device readable recording medium with stored program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822582A (en) * 1996-07-19 1998-10-13 Compaq Computer Corporation Boot drive selection and hibernation file detection
US6158002A (en) * 1998-08-14 2000-12-05 Adaptec, Inc. Method and apparatus of boot device switching by a floppy disk
US6493822B1 (en) * 1999-09-16 2002-12-10 International Business Machines Corporation Foreign drive determination and drive letter conflict resolution
US20040049668A1 (en) * 2002-09-10 2004-03-11 Jareva Technologies, Inc. System for automated boot from disk image
US20050182922A1 (en) * 2004-02-18 2005-08-18 International Business Machines Corporation Computer systems with several operating systems coexisting thereon and swapping between these operating systems
US20060085629A1 (en) * 2003-12-24 2006-04-20 Intel Corporation Mapping a reset vector

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761653B2 (en) * 1999-08-04 2010-07-20 Super Talent Electronics, Inc. Flash micro-controller with shadow boot-loader SRAM for dual-device booting of micro-controller and host
US6754818B1 (en) * 2000-08-31 2004-06-22 Sun Microsystems, Inc. Method and system for bootstrapping from a different boot image when computer system is turned on or reset
JP3906825B2 (en) * 2003-06-17 2007-04-18 日本電気株式会社 Computer system, computer system activation method and program
US20050273588A1 (en) * 2004-06-08 2005-12-08 Ong Soo K Bootstrap method and apparatus with plural interchangeable boot code images
US7900036B2 (en) * 2006-12-18 2011-03-01 International Business Machines Corporation System and method for implementing boot/recovery on a data processing sysem
US7925877B2 (en) * 2007-09-27 2011-04-12 Texas Instruments Incorporated Method, system and apparatus for providing a boot loader of an embedded system
US8751783B2 (en) * 2011-01-20 2014-06-10 Hewlett-Packard Development Company, L.P. Booting computing devices with EFI aware operating systems
KR20120092222A (en) * 2011-02-11 2012-08-21 삼성전자주식회사 Secure boot method and method of generating a secure boot image
CN102830990A (en) * 2012-07-20 2012-12-19 大唐移动通信设备有限公司 Computer system starting method and computer terminal
US9558012B2 (en) * 2013-02-21 2017-01-31 Applied Micro Circuits Corporation System boot with external media
US9230112B1 (en) * 2013-02-23 2016-01-05 Xilinx, Inc. Secured booting of a field programmable system-on-chip including authentication of a first stage boot loader to mitigate against differential power analysis
US9733950B2 (en) * 2013-03-14 2017-08-15 Microchip Technology Incorporated Boot sequencing for multi boot devices

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822582A (en) * 1996-07-19 1998-10-13 Compaq Computer Corporation Boot drive selection and hibernation file detection
US6158002A (en) * 1998-08-14 2000-12-05 Adaptec, Inc. Method and apparatus of boot device switching by a floppy disk
US6493822B1 (en) * 1999-09-16 2002-12-10 International Business Machines Corporation Foreign drive determination and drive letter conflict resolution
US20040049668A1 (en) * 2002-09-10 2004-03-11 Jareva Technologies, Inc. System for automated boot from disk image
US20060085629A1 (en) * 2003-12-24 2006-04-20 Intel Corporation Mapping a reset vector
US20050182922A1 (en) * 2004-02-18 2005-08-18 International Business Machines Corporation Computer systems with several operating systems coexisting thereon and swapping between these operating systems

Also Published As

Publication number Publication date
CN105027080A (en) 2015-11-04
US20140281466A1 (en) 2014-09-18
CN105027080B (en) 2020-03-13
KR20150129692A (en) 2015-11-20
US9733950B2 (en) 2017-08-15
TWI661357B (en) 2019-06-01
EP2972809B1 (en) 2020-12-30
EP2972809A1 (en) 2016-01-20
TW201447757A (en) 2014-12-16

Similar Documents

Publication Publication Date Title
US9733950B2 (en) Boot sequencing for multi boot devices
US7925877B2 (en) Method, system and apparatus for providing a boot loader of an embedded system
US6457069B1 (en) Method and apparatus for providing support for dynamic resource assignment and configuration of peripheral devices when enabling or disabling plug-and-play aware operating systems
US7613937B2 (en) Method and apparatus for utilizing a microcontroller to provide an automatic order and timing power and reset sequencer
EP3289442B1 (en) Central processing unit with enhanced instruction set
US7039799B2 (en) Methods and structure for BIOS reconfiguration
US9261932B2 (en) Minimizing switchover time in a hot swappable program memory
WO2012071852A1 (en) Method and apparatus for upgrading bootstrap program
US9858083B2 (en) Dual boot panel SWAP mechanism
US20140289455A1 (en) Memory Patching Circuit
CN114047952B (en) Processor and method for single chip microcomputer, single chip microcomputer and storage medium
CN105204896A (en) BootLoader design method of digital storage oscilloscope
TW201337762A (en) BIOS starting device and mother board
KR20020029921A (en) Method and apparatus for modifying microinstructions in a static memory device
CN117762456A (en) System-on-chip and upgrading method of system-on-chip starting firmware

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480011451.3

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14720356

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20157023560

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2014720356

Country of ref document: EP