Host starting method and device, equipment and medium
By using a universal serial data bus controller and an enhanced serial peripheral interface controller in the host, the image file data is written to the storage queue and the data is read, and the problem of flashing the physical startup of the host in the existing technology is solved, achieving flexible debugging and startup without complex initial configuration.
Patent Information
- Application Number
- CN202510198919.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-21
AI Technical Summary
The prior art requires flash physical objects to start the host, which lacks flexibility, is difficult to perform convenient debugging, and requires complex flash initial configuration.
The target image file data is written to the target storage queue through the universal serial data bus controller, and the data channel is determined based on the status register of the enhanced serial peripheral interface controller. If it is readable, the enhanced serial peripheral interface controller will be used to read the image file data, and finally the data is sent to the host through the data acquisition command to complete the startup.
The host is enabled through the universal serial data bus on the substrate management controller side, which is convenient and flexible to debug and start, and does not require complex flash initial configuration.
Smart Images

Figure CN119987880A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of baseboard management controller communication, and in particular to a host startup method, device, equipment and medium. Background Art
[0002] As the importance of server management becomes increasingly prominent, major server manufacturers have correspondingly enhanced the manageability of servers on their respective hardware platforms and continuously strengthened their functions. The reliable, easy-to-use management features and additional service functions of servers are becoming the core competitiveness that major server manufacturers urgently need. The birth of the Intelligent Platform Management Interface (IPMI) specification has solved the problem of reliable server management. IPMI defines the communication protocol between hardware devices on the server motherboard (hardware device firmware that supports the IPMI protocol) and the communication protocol interface between the system management software (SMS) and the hardware devices on the server motherboard. The core of IPMI is a dedicated chip / controller called the baseboard management controller (BMC). The system management software manages each managed device by communicating with the motherboard controller BMC. The physical interface between BMC and system management software uses the eSPI (Enhanced Serial Peripheral Interface) communication protocol. The eSPI bus was introduced to replace the LPC (Low Pin Count) bus. Its electrical characteristics are similar to the SPI (Serial Peripheral Interface) bus, but there are some deviations. The eSPI bus supports a one-master-multiple-slave communication mode, and logically designs four data channels: Peripheral, Virtual Wire, OOB (out of band), and Flash. The eSPI Flash channel (Run-time Flash Access Channel) is designed to solve the problem of SPI Flash sharing between Master (such as Chipset) and Slave. This design aims to reduce system costs by allowing Chipset and eSPI Slave to share SPI Flash in real time, reducing the number of SPI Flash chips required in the system. In some technologies, the host accesses the BMC side flash through the flash channel of the espi bus for startup, but this technology requires physical flash, lacks flexibility, cannot be easily debugged, and requires complex flash initial configuration.
[0003] It can be seen that how to start the host simply and conveniently is a problem that technical personnel in this field need to solve. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a host startup method, device, equipment and medium, which can start the host without the need for a physical flash, thereby facilitating debugging and without the need to configure the flash, thereby achieving a simple and convenient host startup.
[0005] In a first aspect, the present invention provides a host startup method, applied to a host, comprising:
[0006] Writing the target image file data into the target storage queue through the universal serial data bus controller; the target image file data is the image file data required when the host starts;
[0007] Determine whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the status register of the enhanced serial peripheral interface controller, and if so, send a read command to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command;
[0008] Sending a data acquisition command to the enhanced serial peripheral interface controller, so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command;
[0009] Receive target image file data so as to complete the startup based on the target image file data.
[0010] Optionally, writing the target image file data into the target storage queue through a universal serial data bus controller includes:
[0011] Detecting the number of free slots in the target storage queue through a universal serial data bus controller;
[0012] If the number of free spaces is non-zero, the target image file data is written into the target storage queue based on the data stream.
[0013] Optionally, after determining whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the state register of the enhanced serial peripheral interface controller, the method further includes:
[0014] If the data channel is not readable, the read command sent to the enhanced serial peripheral interface controller is blocked.
[0015] Optionally, the read command includes a start address and a read length; the target storage queue includes a write pointer and a read pointer; wherein the initial values of the write pointer and the read pointer are both 0; each time the universal serial data bus controller writes the target image file data, the write pointer is increased by the target value; each time the enhanced serial peripheral interface controller reads the target image file data, the read pointer is increased by the corresponding read length;
[0016] Accordingly, after sending a read command to the enhanced serial peripheral interface controller, the method further includes:
[0017] Determining whether the target storage queue is readable based on a target size relationship through an enhanced serial peripheral interface controller; the target size relationship is a size relationship between a read length included in a read command and a data length stored in the target storage queue; wherein the data length stored in the target storage queue is a data length determined based on a difference between a write pointer and a read pointer;
[0018] If the data length is greater than or equal to the read length, it is determined that the target storage queue is readable, so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command;
[0019] If the data length is less than the read length, the target storage queue is determined to be unreadable, and the enhanced serial peripheral interface controller waits for the writing of new target image file data until the data length is greater than or equal to the read length, and then jumps back to the step of determining that the target storage queue is readable.
[0020] Optionally, the process of waiting for the new target image file data to be written through the enhanced serial peripheral interface controller also includes:
[0021] The enhanced serial peripheral interface controller sets the readable status bit of the status register to be unreadable, so as to block the host from sending a data acquisition command to the enhanced serial peripheral interface controller.
[0022] Optionally, a data acquisition command is sent to the enhanced serial peripheral interface controller, including:
[0023] If the target storage queue is readable, determining that the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue;
[0024] After receiving the target signal sent by the enhanced serial peripheral interface bus, a data acquisition command is sent to the enhanced serial peripheral interface controller.
[0025] Optionally, the host startup method further includes:
[0026] If the target storage queue is readable, then setting the data return flag of the status register of the enhanced serial peripheral interface controller to a first value, so that the enhanced serial peripheral interface bus sends a target signal to the host according to the first value;
[0027] If the target storage queue is unreadable, the data return flag of the status register of the enhanced serial peripheral interface controller is set to a second value, so that the enhanced serial peripheral interface controller blocks the host from sending a data acquisition command based on the second value.
[0028] In a second aspect, the present invention provides a host startup device, applied to a host, comprising:
[0029] A data writing module is used to write the target image file data into the target storage queue through a universal serial data bus controller; the target image file data is the image file data required when the host starts;
[0030] A read command sending module, used to determine whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the status register of the enhanced serial peripheral interface controller, and if so, send a read command to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command;
[0031] A data acquisition command sending module is used to send a data acquisition command to the enhanced serial peripheral interface controller, so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command;
[0032] The data receiving module is used to receive the target image file data so as to complete the startup based on the target image file data.
[0033] In a third aspect, the present invention provides an electronic device, comprising:
[0034] Memory for storing computer programs;
[0035] The processor is used to execute a computer program to implement the host startup method.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the aforementioned host startup method when executed by a processor.
[0037] In the present invention, a host writes target image file data into a target storage queue through a universal serial data bus controller; the target image file data is the image file data required when the host is started; whether the data channel of the enhanced serial peripheral interface controller is readable is determined according to the state of the status register of the enhanced serial peripheral interface controller, and if so, a read command is sent to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command; a data acquisition command is sent to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command; and the target image file data is received so as to complete the startup based on the target image file data.
[0038] Beneficial effect: The present invention writes the image file data into the target storage queue through the universal serial data bus controller, and then determines whether the data channel is readable according to the state of the status register of the enhanced serial peripheral interface controller. If it is readable, the enhanced serial peripheral interface controller is used to read the image file data, and then a data acquisition command is sent to the enhanced serial peripheral interface controller, and the host obtains the image file data from the enhanced serial peripheral interface controller to complete the startup. In this way, the host is started through the universal serial data bus on the baseboard management controller side, and debugging startup can be conveniently and flexibly performed without complex flash initial configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flow chart of a host startup method provided by an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a specific host startup method provided by an embodiment of the present invention;
[0042] Figure 3 A schematic diagram of the structure of a host startup device provided by an embodiment of the present invention;
[0043] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] In some technologies, the host accesses the flash on the BMC side through the flash channel of the espi bus to boot, but this technology requires a physical flash, lacks flexibility, cannot be debugged conveniently, and requires complex flash initial configuration. In order to solve the above technical problems, the present invention provides a host startup method, device, equipment and medium, which can boot the host without the physical flash, thereby facilitating debugging and not requiring flash configuration. The host can be started simply and conveniently.
[0046] See also Figure 1 As shown, an embodiment of the present invention provides a host startup method, which is applied to a host and includes:
[0047] Step S11, writing the target image file data into the target storage queue through the universal serial data bus controller; the target image file data is the image file data required when the host is started.
[0048] In the embodiment of the present invention, since the UART (Universal Asynchronous Receiver / Transmitter) has no address, a storage queue must be used as an intermediate cache for operation. Specifically, the present invention uses a circular queue as an intermediate cache. Therefore, before the host is started, the target image file data will be written into the target storage queue through the universal serial data bus controller. In this process, the UART controller will continuously detect the number of vacancies in the circular queue. As long as the remaining number of queues is not 0, the external image file is received into the circular queue in a data stream manner. Specifically, UART is a universal serial data bus. The present invention detects the number of vacancies in the target storage queue through the universal serial data bus controller; if the vacancies are non-zero, the target image file data is written into the target storage queue based on the data stream. It should also be noted that because the reading speed of the eSPI controller is much greater than the speed of the UART, the circular queue will not be full. The present invention adopts a flow control mechanism to ensure that no data is received when the circular queue is full. The target image file data here is the image file data required when the host is started.
[0049] Step S12: determining whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the status register of the enhanced serial peripheral interface controller; if so, sending a read command to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command.
[0050] In an embodiment of the present invention, according to the eSPI protocol, the read operation of the flash channel, the first step, the host obtains the state of the slave to obtain whether the flash channel is readable, that is, determines whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the status register of the enhanced serial peripheral interface controller. The read permission state of the status register of the eSPI controller is allowed by default. If the data channel of the enhanced serial peripheral interface controller is readable, the host will send a read command to the enhanced serial peripheral interface controller. In a specific embodiment, if the flash channel of the enhanced serial peripheral interface controller is readable, the host will issue a put_flash_np command, which includes the starting address to be read and the length to be read. However, if the data channel of the enhanced serial peripheral interface controller is not readable, the read command sent to the enhanced serial peripheral interface controller is blocked. That is, the read behavior of the host is blocked by controlling the status register of the eSPI controller. That is, once the PUT_FLASH_NP read command of the host is received, the readable status bit of the status register is changed to unreadable, and the read command request of the host is blocked. In this way, the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue based on the read command. And the data content carried by the PUT_FLASH_NP command can obtain the starting address and length currently required to be read, and then the target image file data of the target length can be accurately read. It should be noted that under normal circumstances, the length read out by espi each time is 64 bytes. The ring queue cache size is 1K bytes.
[0051] In addition, the target storage queue in the present invention can be a circular storage queue, and the circular storage queue has two pointers with an initial value of 0, one is a write pointer, and the write pointer increases by 1 each time the UART controller writes. The other is a read pointer, and the read pointer increases the read length each time the eSPI controller reads. That is, each time the universal serial data bus controller writes the target image file data, the write pointer increases by the target value; each time the enhanced serial peripheral interface controller reads the target image file data, the read pointer increases by the corresponding read length. Therefore, after sending a read command to the enhanced serial peripheral interface controller, the host determines whether the target storage queue is readable based on the target size relationship through the enhanced serial peripheral interface controller; the target size relationship is the size relationship between the read length contained in the read command and the data length stored in the target storage queue; wherein the data length stored in the target storage queue is the data length determined based on the difference between the write pointer and the read pointer; if the data length is greater than or equal to the read length, the target storage queue is determined to be readable, so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command; if the data length is less than the read length, the target storage queue is determined to be unreadable, and the enhanced serial peripheral interface controller is waited for the writing of new target image file data until the data length is greater than or equal to the read length, and the process jumps to the step of determining that the target storage queue is readable again. And if the target storage queue is readable, the data return flag of the status register of the enhanced serial peripheral interface controller is set to a first value, so that the enhanced serial peripheral interface bus sends a target signal to the host according to the first value; if the target storage queue is unreadable, the data return flag of the status register of the enhanced serial peripheral interface controller is set to a second value, so that the enhanced serial peripheral interface controller blocks the host from sending a data acquisition command based on the second value.
[0052] In other words, when the enhanced serial peripheral interface controller receives a read command, when the number of circular queues is greater than or equal to the read length, it means that the data is sufficient, and the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue. Since the data return flag of the status register of the eSPI controller defaults to 0, that is, no data is returned. At this time, the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue, and the data return flag of the status register of the eSPI controller is set to 1. At this time, the eSPI bus will notify the host through an alarm signal, and the host will come to read the status of the eSPI controller to know the conditions for data return.
[0053] It can be known that the eSPI bus will notify the host through an alarm signal, and the host will therefore come to read the status of the eSPI controller to determine whether the data channel of the enhanced serial peripheral interface controller has read the target image file data of the target length from the target storage queue. It is also possible to use the eSPI bus to send an alarm signal to the host after the data channel of the enhanced serial peripheral interface controller has read the target image file data of the target length from the target storage queue. At this time, the alarm signal includes notification information that there is data in the data channel of the enhanced serial peripheral interface controller. In this way, the host does not need to read the status of the eSPI controller, and directly sends a data acquisition command to the enhanced serial peripheral interface controller, and then obtains the target image file data sent by the enhanced serial peripheral interface controller for startup. In this way, the number of interactions between the host and the eSPI controller is reduced, and the host startup process is further simplified.
[0054] In an embodiment of the present invention, while the enhanced serial peripheral interface controller is waiting for the writing of new target image file data, the enhanced serial peripheral interface controller sets the readable status position of the status register to unreadable to block the host from sending a data acquisition command to the enhanced serial peripheral interface controller.
[0055] Step S13: Send a data acquisition command to the enhanced serial peripheral interface controller, so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command.
[0056] In an embodiment of the present invention, if the target storage queue is readable, it is determined that the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue; after receiving the target signal sent by the enhanced serial peripheral interface bus, the host can send a data acquisition command to the enhanced serial peripheral interface controller. In a specific embodiment, the host will issue a GET_FLASH_PC command to obtain the read data. In addition, the status register of the eSPI controller will release the readable status bit only after receiving the GET_FLASH_PC command sent by the host. In this way, the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command, that is, the host can obtain the target image file data of the target length from the enhanced serial peripheral interface controller. In this way, the host will continue to read data until all image files are read.
[0057] Step S14: receiving target image file data so as to complete the startup based on the target image file data.
[0058] In the embodiment of the present invention, after the host receives all the target image file data sent by the enhanced serial peripheral interface controller, it can complete the startup based on the target image file data, thereby realizing the reading of the UART on the BMC side through the flash channel, thereby starting.
[0059] Beneficial effect: The present invention writes the image file data into the target storage queue through the universal serial data bus controller, and then determines whether the data channel is readable according to the state of the status register of the enhanced serial peripheral interface controller. If it is readable, the enhanced serial peripheral interface controller is used to read the image file data, and then a data acquisition command is sent to the enhanced serial peripheral interface controller, and the host obtains the image file data from the enhanced serial peripheral interface controller to complete the startup. In this way, the host is started through the universal serial data bus on the baseboard management controller side, and debugging startup can be conveniently and flexibly performed without complex flash initial configuration.
[0060] When the embodiment of the present invention implements the host startup, it will perform the read operation of the flash channel according to the eSPI protocol. In the first step, the host obtains the status of the slave to obtain whether the flash channel is readable. If it is not readable, the channel is blocked. If it is readable, a put_flash_np command is issued, which includes the starting address to be read and the length to be read. The second step is to obtain the status of the slave again, and to know whether the flash channel has data from the status. If not, wait. If so, issue a GET_FLASH_PC command to obtain the flash data. Next, the process of obtaining the status of the slave again in the second step, knowing whether the flash channel has data from the status, waiting if not, and issuing a GET_FLASH_PC command to obtain the flash data will be described in detail.
[0061] The host obtains whether the flash channel is readable according to the status of the slave. If it is not readable, the channel is blocked. If it is readable, a put_flash_np command is issued, which includes the starting address to be read and the length to be read. After issuing the put_flash_np command, the put_flash_np command only prompts the eSPI controller to read the target image file data of the target length from the target storage queue based on the read command, but it is necessary to further determine whether the target storage queue is readable, that is, the eSPI controller data channel can read the target image file data of the target length from the target storage queue. In this process, when the enhanced serial peripheral interface controller receives a read command, the host determines whether the target storage queue is readable based on the target size relationship through the enhanced serial peripheral interface controller; the target size relationship is the size relationship between the read length contained in the read command and the data length stored in the target storage queue; wherein the data length stored in the target storage queue is the data length determined based on the difference between the write pointer and the read pointer; if the data length is greater than or equal to the read length, the target storage queue is determined to be readable, so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command; if the data length is less than the read length, the target storage queue is determined to be unreadable, and the enhanced serial peripheral interface controller is waited for the writing of new target image file data until the data length is greater than or equal to the read length, and the process jumps again to the step of determining that the target storage queue is readable. And if the target storage queue is readable, the data return flag of the status register of the enhanced serial peripheral interface controller is set to a first value, so that the enhanced serial peripheral interface bus sends a target signal to the host according to the first value; if the target storage queue is unreadable, the data return flag of the status register of the enhanced serial peripheral interface controller is set to a second value, so that the enhanced serial peripheral interface controller blocks the host from sending a data acquisition command based on the second value.
[0062] That is to say, when the enhanced serial peripheral interface controller receives a read command, when the number of circular queues is greater than or equal to the read length, it means that there is enough data, and the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue. Since the data return flag of the status register of the eSPI controller defaults to 0, that is, no data is returned. At this time, the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue, and the data return flag of the status register of the eSPI controller is set to 1. At this time, if Figure 2As shown, the eSPI bus will notify the host through an alarm signal, and the host will read the status of the eSPI controller to confirm that there is data in the data channel of the enhanced serial peripheral interface controller. Then the host will issue a GET_FLASH_PC command to obtain the read data. However, when the number of circular queues is less than the read length, that is, there is no data in the data channel of the enhanced serial peripheral interface controller, then wait for enough data to be stored in the circular queue to satisfy the reading of the eSPI controller. At the same time, the host is blocked from issuing the GET_FLASH_PC command. Avoid the host issuing commands but failing to obtain data. Finally, the host obtains the flash data in the data channel of the enhanced serial peripheral interface controller and can start.
[0063] Beneficial effects: The present invention enables the host to start up through the universal serial data bus on the baseboard management controller side, can conveniently and flexibly perform debugging and startup, and does not require complex flash initial configuration.
[0064] See also Figure 3 As shown, an embodiment of the present invention provides a host startup device, which is applied to a host and includes:
[0065] The data writing module 11 is used to write the target image file data into the target storage queue through the universal serial data bus controller; the target image file data is the image file data required when the host starts;
[0066] A read command sending module 12 is used to determine whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the status register of the enhanced serial peripheral interface controller, and if so, send a read command to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command;
[0067] A data acquisition command sending module 13 is used to send a data acquisition command to the enhanced serial peripheral interface controller, so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command;
[0068] The data receiving module 14 is used to receive the target image file data so as to complete the startup based on the target image file data.
[0069] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0070] Beneficial effect: The present invention writes the image file data into the target storage queue through the universal serial data bus controller, and then determines whether the data channel is readable according to the state of the status register of the enhanced serial peripheral interface controller. If it is readable, the enhanced serial peripheral interface controller is used to read the image file data, and then a data acquisition command is sent to the enhanced serial peripheral interface controller, and the host obtains the image file data from the enhanced serial peripheral interface controller to complete the startup. In this way, the host is started through the universal serial data bus on the baseboard management controller side, and debugging startup can be conveniently and flexibly performed without complex flash initial configuration.
[0071] Furthermore, the present application also discloses an electronic device. Figure 4 It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the host startup method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0072] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0073] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0074] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the host startup method executed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0075] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the host startup method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0076] Furthermore, the present invention also discloses a computer program product, including a computer program / instruction; wherein, when the computer program / instruction is executed by a processor, the chip power consumption control method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0077] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0078] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0079] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0080] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0081] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A host startup method, characterized in that: Applied to the host, including: Writing the target image file data into the target storage queue through a universal serial data bus controller; the target image file data is the image file data required when the host is started; Determine whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the status register of the enhanced serial peripheral interface controller, and if so, send a read command to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command; Sending a data acquisition command to the enhanced serial peripheral interface controller, so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command; The target image file data is received so as to complete the startup based on the target image file data.
2. The host startup method according to claim 1, characterized in that: The step of writing the target image file data into the target storage queue through the universal serial data bus controller comprises: Detecting the number of free slots in the target storage queue by a universal serial data bus controller; If the number of free files is non-zero, the target image file data is written into the target storage queue based on a data stream.
3. The host startup method according to claim 1, characterized in that: After determining whether the data channel of the enhanced serial peripheral interface controller is readable according to the state of the state register of the enhanced serial peripheral interface controller, the method further includes: If the data channel is not readable, the read command sent to the enhanced serial peripheral interface controller is blocked.
4. The host startup method according to any one of claims 1 to 3, characterized in that: The read command includes a start address and a read length; the target storage queue includes a write pointer and a read pointer; wherein the initial values of the write pointer and the read pointer are both 0; each time the universal serial data bus controller writes the target image file data, the write pointer is increased by a target value; each time the enhanced serial peripheral interface controller reads the target image file data, the read pointer is increased by a corresponding read length; Correspondingly, after sending the read command to the enhanced serial peripheral interface controller, the method further includes: Determining whether the target storage queue is readable based on a target size relationship by the enhanced serial peripheral interface controller; the target size relationship is a size relationship between the read length contained in the read command and the data length stored in the target storage queue; wherein the data length stored in the target storage queue is a data length determined based on a difference between the write pointer and the read pointer; If the data length is greater than or equal to the read length, determining that the target storage queue is readable, so that the enhanced serial peripheral interface controller reads the target image file data of the target length from the target storage queue based on the read command; If the data length is less than the read length, the target storage queue is determined to be unreadable, and the enhanced serial peripheral interface controller waits for the writing of new target image file data until the data length is greater than or equal to the read length, and then jumps back to the step of determining that the target storage queue is readable.
5. The host startup method according to claim 4, characterized in that: The process of waiting for the writing of new target image file data through the enhanced serial peripheral interface controller also includes: The enhanced serial peripheral interface controller sets the readable status position of the status register to unreadable, so as to block the host from sending a data acquisition command to the enhanced serial peripheral interface controller.
6. The host startup method according to claim 4, characterized in that: The step of sending a data acquisition command to the enhanced serial peripheral interface controller comprises: If the target storage queue is readable, determining that the data channel of the enhanced serial peripheral interface controller can read the target image file data of the target length from the target storage queue; After receiving the target signal sent by the enhanced serial peripheral interface bus, a data acquisition command is sent to the enhanced serial peripheral interface controller.
7. The host startup method according to claim 6, characterized in that: Also includes: If the target storage queue is readable, setting the data return flag of the status register of the enhanced serial peripheral interface controller to a first value, so that the enhanced serial peripheral interface bus sends a target signal to the host according to the first value; If the target storage queue is unreadable, the data return flag of the status register of the enhanced serial peripheral interface controller is set to a second value, so that the enhanced serial peripheral interface controller blocks the host from sending a data acquisition command based on the second value.
8. A host startup device, characterized in that: Applied to the host, including: A data writing module, used for writing target image file data into a target storage queue through a universal serial data bus controller; the target image file data is the image file data required when the host starts; a read command sending module, configured to determine whether a data channel of the enhanced serial peripheral interface controller is readable according to a state of a state register of the enhanced serial peripheral interface controller, and if so, to send a read command to the enhanced serial peripheral interface controller so that the enhanced serial peripheral interface controller reads target image file data of a target length from the target storage queue based on the read command; A data acquisition command sending module, used for sending a data acquisition command to the enhanced serial peripheral interface controller, so that the enhanced serial peripheral interface controller sends the target image file data of the target length to the host based on the data acquisition command; The data receiving module is used to receive the target image file data so as to complete the startup based on the target image file data.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the host startup method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the host startup method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Server starting method and device and readable storage medium
CN114461286A
Data interaction method and device, storage medium and computing equipment
CN115686877A
BOOT starting method, system and equipment of embedded processor and medium
CN117369889A
Method and device for starting equipment, equipment and readable medium
CN118276957A
Secure starting method of server mainboard based on eSPI (enhanced serial peripheral interface) and related equipment
CN118427147A