Disclosure of Invention
The embodiment of the application provides an operating system acquisition method and a server, which can effectively reduce the cost of the server.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, an operating system acquisition method is provided, and the operating system acquisition method is used for a server, wherein the server comprises a Central Processing Unit (CPU), a universal flash memory (universal flash storage, UFS equipment) and a protocol conversion device, the CPU and the protocol conversion device are communicated through a first protocol, the protocol conversion device and the UFS equipment are communicated through a second protocol, the protocol conversion device is used for converting information based on the first protocol into information based on the second protocol, an Operating System (OS) of the server is stored in the UFS equipment, the method comprises the steps that the CPU sends a first instruction to the UFS equipment through the protocol conversion device, the first instruction is used for indicating loading of the OS, and the CPU receives the OS returned by the UFS equipment through the protocol conversion device.
In the scheme, through setting the communication between the CPU and the protocol conversion device through the first protocol, the communication between the protocol conversion device and the UFS equipment through the second protocol, the protocol conversion device can convert the information based on the first protocol into the information based on the second protocol, so that the UFS equipment can identify the first instruction sent by the server, and the CPU can identify the OS returned by the UFS equipment. After the server is electrified, the CPU sends a first instruction for indicating loading of the OS to the UFS device through the protocol conversion device, and receives the OS returned by the UFS device through the protocol conversion device, so that the OS is operated. According to the operating system acquisition method, the OS is stored in the UFS device, the cost of the UFS device is far lower than that of the NVMe SSD hard disk, and under the condition of the same capacity, the cost of the UFS device is about 1/6 of that of the NVMe SSD hard disk, so that the cost of a server is effectively reduced. Based on the above, when the operating system acquisition method provided by the embodiment of the application is applied to the computing server with a small number of hard disks, the cost of the computing server can be reduced as well. In addition, since the bandwidth and reliability of the UFS device are both relatively high, the running speed of the server and the storage reliability of the OS are further ensured on the basis of reducing the cost of the computer server.
In one possible implementation manner, the CPU sends a first instruction to the UFS device through the protocol conversion device, wherein the first instruction is specifically used for indicating to load a kernel program of the OS to the UFS device through the protocol conversion device, and the CPU receives the OS returned by the UFS device through the protocol conversion device, and the method comprises the step that the processor firmware in the CPU receives the kernel program of the OS returned by the UFS device through the protocol conversion device.
In this implementation, the processor firmware obtains the kernel program from the UFS device through the protocol conversion device, so as to implement running the kernel program. The kernel program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, so that the storage cost of the kernel program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and the method is also beneficial to quickly acquiring the kernel program, shortening the starting time of the kernel program and improving the stability of the kernel program.
In another possible implementation manner, after the kernel program is run by the CPU, the method further comprises the steps that the kernel program in the CPU sends a second instruction to the UFS device through the protocol conversion device, the second instruction is used for indicating to load the starting program of the OS, and the kernel program in the CPU receives the starting program returned by the UFS device through the protocol conversion device.
In this implementation, after the kernel of the OS runs, the kernel obtains the boot program of the OS from the UFS device through the protocol conversion device, so as to implement running the boot program. Because the startup program is stored in the UFS device, and the cost of the UFS device is far lower than that of the NVMe SSD hard disk, the storage cost of the application program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the method is also beneficial to achieving quick acquisition of the startup procedure, shortening the startup time of the startup procedure and improving the stability of the startup procedure.
In another possible implementation manner, after the CPU runs the startup program, the method further comprises the steps that the startup program in the CPU sends a third instruction to the UFS device through the protocol conversion device, the third instruction is specifically used for indicating to load the application program of the OS, and the startup program in the CPU receives the application program returned by the UFS device through the protocol conversion device.
In this implementation, after the start-up program of the OS is run, the start-up program obtains the application program of the OS from the UFS device through the protocol conversion device, thereby implementing the running application program. Because the application program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, the storage cost of the application program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the application program can be obtained quickly, the starting time of the application program is shortened, and the stability of the application program is improved.
In another possible implementation manner, after the CPU runs the application program, the method further comprises the steps that the application program in the CPU sends a read-write instruction to the UFS device through the protocol conversion device, the read-write instruction is used for indicating the UFS device to read and write data, and the application program in the CPU receives a read-write result of the read-write instruction returned by the UFS device through the protocol conversion device.
In the implementation manner, after the application program of the OS runs, the application program sends a read-write instruction to the UFS equipment through the protocol conversion device, so that the UFS equipment is instructed to read and write data, the data are stored in the UFS equipment and the data in the UFS equipment are read, further, a hard disk for storing the data is not required to be additionally configured for the server, and the cost of the server is further reduced.
In another possible implementation manner, before the CPU sends the first instruction to the UFS device through the protocol conversion device, the method further comprises the step that the CPU sends a first request to the protocol conversion device, the first request is used for requesting to acquire the device type stored in the protocol conversion device, the device type stored in the protocol conversion device is the device type of the UFS device, the CPU receives the device type of the UFS device returned by the protocol conversion device, the CPU loads a driving program of the UFS device based on the device type of the UFS device, and the CPU sends the first instruction to the UFS device through the protocol conversion device, wherein the step comprises the step that the CPU calls the driving program of the UFS device to send the first instruction to the UFS device through the protocol conversion device.
In the implementation manner, a specific implementation manner of identifying the UFS device by the CPU is provided, and the device type of the UFS device is stored in the protocol conversion device, so that the CPU can successfully identify the UFS device and load the driver of the UFS device, and then successfully establish the communication link between the CPU and the UFS device, so that the CPU can send information to the UFS device by calling the driver of the UFS device, the communication difficulty between the CPU and the UFS device is reduced, the implementation process is simple and convenient, no improvement on hardware is required, and the cost is low.
In another possible implementation, the first protocol includes a high-speed serial computer expansion bus standard PCIE protocol, and the second protocol includes a universal flash storage UFS protocol.
In another possible implementation manner, the server further comprises an out-of-band control chip, and the protocol conversion device is integrated in the out-of-band control chip.
In the implementation mode, the protocol conversion device is integrated into the out-of-band control chip of the server, so that a chip is not required to be additionally configured for packaging the protocol conversion device, and therefore, the space of a main board is not excessively occupied, additional peripheral circuits are not required, the design is simple, and the cost is reduced.
In another possible implementation manner, the server further includes a south bridge chip, and the protocol conversion device is integrated in the south bridge chip.
In the implementation mode, the protocol conversion device is integrated into the south bridge chip of the server, so that the chip does not need to be additionally configured for packaging the protocol conversion device, and therefore, the space of a main board is not excessively occupied, additional peripheral circuits are not needed, the design is simple, and the cost is reduced.
In another possible implementation manner, the protocol conversion device is specifically a protocol conversion chip, and the protocol conversion chip is integrated on a motherboard of the server.
In this implementation, the protocol conversion device is encapsulated by using a dedicated chip, and thus, it helps to ensure stability and reliability of the protocol conversion device.
In another possible implementation manner, the protocol conversion device comprises a PCIE interface, a UFS interface and a protocol conversion module, wherein the PCIE interface is used for being connected with a CPU, the UFS interface is used for being connected with the UFS, one end of the protocol conversion module is connected with the PCIE interface, the other end of the protocol conversion module is connected with the UFS interface, and the protocol conversion module is used for converting information based on a first protocol into information based on a second protocol.
In this implementation manner, a specific implementation manner of the protocol conversion device is provided, where the protocol conversion device includes a PCIE interface, a UFS interface, and a protocol conversion module, so that the protocol conversion device may be connected to the CPU through the PCIE interface and connected to the UFS device through the UFS interface, thereby becoming a data conversion channel between the CPU and the UFS, and enabling the CPU to communicate with the UFS.
In a second aspect, an operating system acquisition method is provided for a server, the server comprises a Central Processing Unit (CPU), a universal flash memory (USB) storage UFS equipment and a protocol conversion device, the CPU and the protocol conversion device are communicated through a first protocol, the protocol conversion device is communicated with the UFS equipment through a second protocol, the protocol conversion device is used for converting information based on the first protocol into information based on the second protocol, an Operating System (OS) of the server is stored in the UFS equipment, the method comprises the steps that the protocol conversion device receives a first instruction which is sent by the CPU and is used for indicating to load the OS, the protocol conversion device converts the first instruction which is used for conforming to the first protocol into a first instruction which is used for conforming to the second protocol, and sends the first instruction which is used for conforming to the second protocol to the UFS equipment, the protocol conversion device receives an OS which is returned by the UFS equipment and converts the OS which is conforming to the second protocol into the OS which is conforming to the first protocol, and the protocol is returned to the OS which is conforming to the first protocol to the CPU.
In this scheme, by setting communication between the CPU and the protocol conversion device through the first protocol, communication between the protocol conversion device and the UFS device through the second protocol, and the protocol conversion device can convert information based on the first protocol into information based on the second protocol. After the server is powered on, the protocol conversion device converts a first instruction which is sent by the CPU and follows a first protocol into a first instruction which follows a second protocol, and sends the first instruction to the UFS device, so that the UFS device can accurately identify the content indicated by the first instruction, and converts an OS which is sent by the UFS device and follows the second protocol into an OS which follows the first protocol, and sends the OS to the CPU, so that the CPU can accurately identify the content of the OS, and the CPU can acquire the OS from the UFS device, thereby realizing the operation of the OS. According to the method for acquiring the operating system, the OS is stored in the UFS equipment, and the CPU acquires the OS from the UFS equipment by the protocol conversion device, so that the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, and the cost of the server is effectively reduced. Based on the above, when the operating system acquisition method provided by the embodiment of the application is applied to the computing server with a small number of hard disks, the cost of the computing server can be reduced as well. In addition, since the bandwidth and reliability of the UFS device are high, the running speed of the server and the storage reliability of the OS are further ensured on the basis of reducing the cost of the server.
In one possible implementation manner, the protocol conversion device receives a first instruction which is sent by the CPU and follows a first protocol, wherein the first instruction is sent by the processor firmware in the CPU and is specifically used for indicating to load a kernel program of an OS, and the protocol conversion device receives an OS which is returned by the UFS device and follows a second protocol, and the first instruction which is sent by the CPU and follows the first protocol is received by the protocol conversion device, and the first instruction is specifically used for indicating to load the kernel program of the OS which is returned by the UFS device and follows the second protocol is received by the protocol conversion device.
In this implementation, the protocol conversion device converts the first instruction which is sent by the processor firmware and follows the first protocol into the first instruction which follows the second protocol, and sends the first instruction to the UFS device, so that the UFS device can accurately identify the content indicated by the first instruction. In addition, the kernel program which is transmitted by the UFS device and follows the first protocol is converted into the kernel program which is transmitted to the processor firmware, so that the processor firmware can accurately identify the content of the kernel program, and the processor firmware can successfully acquire the identifiable kernel program from the UFS device to realize the running of the kernel program. The kernel program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, so that the storage cost of the kernel program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and the method is also beneficial to quickly acquiring the kernel program, shortening the starting time of the kernel program and improving the stability of the kernel program.
In another possible implementation manner, after the kernel program is run by the CPU, the method further includes the protocol conversion device receiving a second instruction which is sent by the kernel program in the CPU and follows the first protocol, the second instruction being used for indicating to load the starting program of the OS, the protocol conversion device converting the second instruction which follows the first protocol into a second instruction which follows the second protocol and sending the second instruction which follows the second protocol to the UFS device, the protocol conversion device receiving the starting program which follows the second protocol and returning from the UFS device and converting the starting program which follows the second protocol into the starting program which follows the first protocol, and the protocol conversion device returning to the kernel program in the CPU a starting program which follows the first protocol.
In this implementation manner, the protocol conversion device converts the second instruction which is sent by the kernel program and follows the first protocol into the second instruction which follows the second protocol, and sends the second instruction to the UFS device, so that the UFS device can accurately identify the content indicated by the second instruction. In addition, the starting program which is transmitted by the UFS equipment and follows the first protocol is converted into the starting program which is transmitted to the kernel program, so that the kernel program can accurately identify the content of the starting program, and the kernel program can successfully acquire the identifiable starting program from the UFS equipment to realize the operation of the starting program. Because the startup procedure is stored in the UFS device, and the cost of the UFS device is far lower than that of the NVMe SSD hard disk, the storage cost of the startup procedure is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the method is also beneficial to achieving quick acquisition of the startup procedure, shortening the startup time of the startup procedure and improving the stability of the startup procedure.
In another possible implementation manner, after the CPU runs the startup procedure, the method further comprises the steps that the protocol conversion device receives a third instruction which is sent by the startup procedure in the CPU and follows the first protocol, the third instruction is used for indicating to load the application program of the OS, the protocol conversion device converts the third instruction which follows the first protocol into a third instruction which follows the second protocol and sends the third instruction which follows the second protocol to the UFS device, the protocol conversion device receives the application program which follows the second protocol and returns the application program which follows the second protocol to the application program which follows the first protocol, and the protocol conversion device returns the application program which follows the first protocol to the startup procedure in the CPU.
In the implementation manner, the protocol conversion device converts the third instruction which is sent by the starting program and follows the first protocol into the third instruction which follows the second protocol and sends the third instruction to the UFS device, so that the UFS device can accurately identify the content indicated by the third instruction. In addition, the application program which is transmitted by the UFS equipment and follows the second protocol is converted into the application program which is transmitted to the starting program and is followed by the first protocol, so that the starting program can accurately identify the content of the application program, and the starting program can successfully acquire the identifiable application program from the UFS equipment and can run the application program. Because the application program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, the storage cost of the application program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the application program can be obtained quickly, the starting time of the application program is shortened, and the stability of the application program is improved.
In another possible implementation manner, after the CPU runs the application program, the method further comprises the steps that the protocol conversion device receives a read-write instruction which is sent by the application program in the CPU and follows a first protocol, the read-write instruction is used for indicating the UFS device to read and write data, the protocol conversion device converts the read-write instruction which follows the first protocol into a read-write instruction which follows a second protocol, the protocol conversion device sends the read-write instruction which follows the second protocol to the UFS device, the protocol conversion device receives a read-write result which is returned by the UFS device and follows the read-write instruction of the second protocol, the protocol conversion device converts the read-write result which follows the second protocol into a read-write result which follows the first protocol, and the protocol conversion device returns the read-write result which follows the first protocol to the application program in the CPU.
In the implementation manner, the protocol conversion device converts the read-write instruction which is sent by the application program and follows the first protocol into the read-write instruction which follows the second protocol and sends the read-write instruction to the UFS device, so that the UFS device can accurately identify the content indicated by the read-write instruction, and then converts the read-write result which is sent by the UFS device and follows the second protocol into the read-write result which follows the first protocol and sends the read-write result to the application program, so that the application program can accurately identify the content indicated by the read-write result, and therefore the data are stored in the UFS device and the data in the UFS device are read, and further, a hard disk for storing the data is not required to be additionally configured for the server, and the cost of the server is further reduced.
In another possible implementation manner, before the protocol conversion device receives the first instruction which is sent by the CPU and follows the first protocol, the method further comprises the step that the protocol conversion device receives a first request sent by the CPU, the first request is used for requesting to acquire the device type stored in the protocol conversion device, the device type stored in the protocol conversion device is the device type of the UFS device, and the protocol conversion device returns the device type of the UFS device to the CPU in response to the first request.
In the implementation mode, the equipment type of the UFS equipment is stored in the protocol conversion device, so that the CPU can successfully identify the UFS equipment and load the driving program of the UFS equipment, and then a communication link between the CPU and the UFS equipment is successfully established, so that the CPU can send information to the UFS equipment by calling the driving program of the UFS equipment through the protocol conversion device, the communication difficulty between the CPU and the UFS equipment is reduced, the implementation process is simple and convenient, the improvement on hardware is not needed, and the cost is lower.
In a third aspect, an operating system acquisition method is provided, and the operating system acquisition method is used for a server, wherein the server comprises a Central Processing Unit (CPU), universal flash memory (UFS) equipment and a protocol conversion device, the CPU and the protocol conversion device are communicated through a first protocol, the protocol conversion device is communicated with the UFS equipment through a second protocol, the protocol conversion device is used for converting information based on the first protocol into information based on the second protocol, an Operating System (OS) of the server is stored in the UFS equipment, the method comprises the steps that the UFS equipment receives a first instruction sent by the CPU through the protocol conversion device, the first instruction is used for indicating loading of the OS, and the UFS equipment returns the OS to the CPU through the protocol conversion device.
In this scheme, by setting communication between the CPU and the protocol conversion device through the first protocol, communication between the protocol conversion device and the UFS device through the second protocol, and the protocol conversion device can convert information based on the first protocol into information based on the second protocol. After the server is electrified, the UFS device receives a first instruction which is sent by the CPU and indicates to load the OS through the protocol conversion device, and returns the OS to the CPU through the protocol conversion device, so that the CPU can run the OS. According to the operating system acquisition method, the OS is stored in the UFS device, the cost of the UFS device is far lower than that of the NVMe SSD hard disk, and under the condition of the same capacity, the cost of the UFS device is about 1/6 of that of the NVMe SSD hard disk, so that effective reduction is achieved. Cost of the server. In addition, since the bandwidth and reliability of the UFS device are both relatively high, the running speed of the server and the storage reliability of the OS are further ensured on the basis of reducing the cost of the computer server.
In one possible implementation, the UFS device receives a first instruction sent by the CPU through the protocol conversion device, wherein the first instruction is specifically used for indicating to load a kernel program of the OS, and the UFS device returns the OS to the CPU through the protocol conversion device, and the method comprises the step that the UFS device returns the kernel program of the OS to the processor firmware of the CPU through the protocol conversion device.
In the implementation manner, the UFS device receives a first instruction sent by the processor firmware and indicating to load the kernel program through the protocol conversion device, and returns the kernel program to the processor firmware through the protocol conversion device, so that the processor firmware can run the kernel program. The kernel program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, so that the storage cost of the kernel program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and the method is also beneficial to quickly acquiring the kernel program, shortening the starting time of the kernel program and improving the stability of the kernel program.
In another possible implementation manner, after the CPU runs the kernel program, the method further comprises the steps that the UFS device receives a second instruction sent by the kernel program in the CPU through the protocol conversion device, the second instruction is used for indicating to load a starting program of the OS, and the UFS device returns the starting program to the CPU through the protocol conversion device.
In the implementation mode, the UFS device receives a second instruction sent by the kernel program and indicating to load the startup program through the protocol conversion device, and returns the startup program to the kernel program through the protocol conversion device, so that the kernel program can run the startup program. Because the startup procedure is stored in the UFS device, and the cost of the UFS device is far lower than that of the NVMe SSD hard disk, the storage cost of the startup procedure is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the method is also beneficial to achieving quick acquisition of the startup procedure, shortening the startup time of the startup procedure and improving the stability of the startup procedure.
In another possible implementation manner, after the CPU runs the startup procedure, the method further comprises the steps that the UFS device receives a third instruction sent by the startup procedure in the CPU through the protocol conversion device, the third instruction is used for indicating to load the application program of the OS, and the UFS device returns the application program to the startup procedure in the CPU through the protocol conversion device.
In this implementation manner, the UFS device receives, through the protocol conversion device, a third instruction indicating to load the application program, which is sent by the startup program, and returns, through the protocol conversion device, the application program to the CPU, so that the startup program can run the application program. Because the application program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, the storage cost of the internal application program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the application program can be obtained quickly, the starting time of the application program is shortened, and the stability of the application program is improved.
In another possible implementation manner, after the CPU runs the application program, the method further comprises the steps that the UFS device receives a read-write instruction sent by the application program in the CPU through the protocol conversion device, the read-write instruction is used for indicating the UFS device to read and write data, the UFS device executes the read-write instruction, and the UFS device returns a read-write result of the read-write instruction to the application program in the CPU through the protocol conversion device.
In the implementation mode, the UFS device receives the read-write instruction sent by the application program through the protocol conversion device, and after the read-write instruction is completed, the read-write result is returned to the CPU through the protocol conversion device, so that the data are stored in the UFS device and the data in the UFS device are read, further, a hard disk for storing the data is not required to be additionally configured for the server, and the cost of the server is further reduced.
In a fourth aspect, an operating system acquisition device is provided, where the device includes functional units for performing any of the methods provided in the first aspect, and actions performed by the respective functional units are implemented by hardware or implemented by hardware executing corresponding software. For example, the operating system acquiring device may include a transmitting unit and a receiving unit, where the transmitting unit is configured to transmit a first instruction to the UFS device through the protocol conversion device, the first instruction is configured to instruct loading of the OS, and the receiving unit is configured to receive the OS returned by the UFS device through the protocol conversion device.
In a fifth aspect, there is provided an operating system acquisition device comprising functional units for performing any of the methods provided in the second aspect, the actions performed by the respective functional units being implemented by hardware or by hardware executing corresponding software. For example, the operating system acquisition device may include a receiving unit, a converting unit, and a transmitting unit, where the receiving unit is configured to receive a first instruction that is sent by the CPU and conforms to a first protocol, the first instruction is configured to instruct loading of the OS, the converting unit is configured to convert the first instruction that conforms to the first protocol into a first instruction that conforms to a second protocol, the transmitting unit is configured to transmit the first instruction that conforms to the second protocol to the UFS device, the receiving unit is further configured to receive the OS that conforms to the second protocol returned by the UFS device, the converting unit is further configured to convert the OS that conforms to the second protocol into the OS that conforms to the first protocol, and the transmitting unit is further configured to return the OS that conforms to the first protocol to the CPU.
In a sixth aspect, there is provided an operating system acquisition apparatus comprising functional units for performing any one of the methods provided in the third aspect, the actions performed by the respective functional units being implemented by hardware or by hardware executing corresponding software. For example, the operating system acquisition device may include a receiving unit configured to receive a first instruction sent by the CPU through the protocol conversion device, the first instruction configured to instruct loading of the OS, and a transmitting unit configured to return the OS to the CPU through the protocol conversion device.
In a seventh aspect, a server is provided that includes a Central Processing Unit (CPU), a protocol conversion device, and a Universal Flash Storage (UFS) device. The system comprises a central processing unit CPU for executing any one of the methods provided in the first aspect, a protocol conversion device for executing any one of the methods provided in the second aspect, and a universal flash memory storage UFS device for executing any one of the methods provided in the third aspect.
In an eighth aspect, a server is provided that includes a processor and a memory, the processor being coupled to the memory. The memory is configured to store computer-executable instructions and the processor executes the computer-executable instructions stored in the memory to implement any one of the methods provided in the first aspect, to implement any one of the methods provided in the second aspect, or to implement any one of the methods provided in the third aspect.
In a ninth aspect, there is provided a chip comprising a processor and interface circuitry, the interface circuitry for receiving code instructions and transmitting them to the processor, the processor for executing the code instructions to perform any of the methods provided in the first aspect, or to perform any of the methods provided in the second aspect, or to perform any of the methods provided by the third party.
In a tenth aspect, there is provided a computer readable storage medium storing computer executable instructions that, when executed on a server, cause the server to perform any one of the methods provided in the first aspect, or any one of the methods provided in the second aspect, or any one of the aspects provided in the third aspect.
In an eleventh aspect, there is provided a computer program product comprising computer-executable instructions which, when run on a server, cause the server to perform any one of the methods provided in the first aspect, or any one of the methods provided in the second aspect, or any one of the methods provided in the third aspect.
The technical effects caused by any implementation manner of the fourth aspect to the eleventh aspect may refer to the technical effects caused by different implementation manners of the first aspect, and are not repeated here.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
In the description of the present application, unless otherwise indicated, "/" means that the related objects are in a "or" relationship, for example, a/B may mean a or B, and "and/or" in the present application is merely an association relationship describing the related objects, for example, a and/or B may mean that there may be three relationships, for example, a and/or B, three cases where a exists alone, a and B exist together, and B exists alone, where a and B may be singular or plural.
Also, in the description of the present application, unless otherwise indicated, "a plurality" means two or more than two. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a, b, or c) of a, b, c, a-b, a-c, b-c, or a-b-c may be represented, wherein a, b, c may be single or plural.
In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion that may be readily understood.
First, an application scenario of the embodiment of the present application is described in an exemplary manner.
As the proportion of data center clouding deployments increases, most servers begin to use remote distributed storage, so that the servers do not need to configure a large number of hard disks for local storage. Such servers are also referred to as compute servers, as they are typically used to perform the compute tasks of upper-level applications.
As shown in fig. 1, in order to minimize the number of hard disks of the compute server, a related art generally configures a larger capacity nonvolatile memory host controller interface specification (non-volatile memory express, NVMe) solid state drive (solid-state-STATE DISK, SSD) hard disk for installing an operating system OS for the compute server. For other data to be stored, a remote storage approach may be used, such as remote distributed storage.
However, this type of NVMe SSD hard disk generally has a capacity of around 960GB and is relatively costly, and thus cannot meet the low cost requirement of the computing server.
In view of this, an embodiment of the present application provides an operating system obtaining method, by setting communication between a CPU and a protocol conversion device through a first protocol, and communication between the protocol conversion device and a UFS device through a second protocol, the protocol conversion device can convert information based on the first protocol into information based on the second protocol, so that the UFS device can identify a first instruction sent by a server, and the CPU can identify an OS returned by the UFS device. After the server is electrified, the CPU sends a first instruction for indicating loading of the OS to the UFS device through the protocol conversion device, and receives the OS returned by the UFS device through the protocol conversion device, so that the operation of the OS is realized. According to the operating system acquisition method, the OS is stored in the UFS device, the cost of the UFS device is far lower than that of the NVMe SSD hard disk, and under the condition of the same capacity, the cost of the UFS device is about 1/6 of that of the NVMe SSD hard disk, so that the cost of a server is effectively reduced. Based on the above, when the operating system acquisition method provided by the embodiment of the application is applied to the computing server with a small number of hard disks, the cost of the computing server can be reduced as well. In addition, since the bandwidth and reliability of the UFS device are both relatively high, the running speed of the server and the storage reliability of the OS are further ensured on the basis of reducing the cost of the computer server.
Next, a system architecture of an embodiment of the present application will be exemplarily described.
The method for acquiring the operating system is suitable for network equipment such as a server, personal computer equipment and the like.
In the following, a server is taken as an example to describe an operating system acquisition method provided in an embodiment of the present application.
Fig. 2 shows a system architecture diagram of a server according to an embodiment of the present application. The server comprises a Central Processing Unit (CPU), universal flash memory storage (UFS) equipment, a protocol conversion device, a south bridge chip and an out-of-band control chip. The protocol conversion device, the south bridge chip and the out-of-band control chip are respectively connected with the CPU through a first bus, and the UFS equipment is connected with the protocol conversion device through a second bus. Wherein the first bus follows a first protocol and the second bus follows a second protocol, the first protocol and the second protocol being different protocols.
Optionally, the first protocol includes a PCIE protocol and the second protocol includes a UFS protocol. The first bus comprises a PCIE bus and the second bus comprises a UFS bus.
It should be noted that the first protocol and the second protocol may be other types of protocols, and the embodiment of the present application does not limit the specific types of the first protocol and the second protocol. Accordingly, the first bus and the second bus may be other types of buses, and the specific types of the first bus and the second bus are not limited in the embodiment of the present application.
In the following, the method for acquiring the operating system according to the embodiment of the present application is exemplified by taking the first protocol as the PCIE protocol, the second protocol as the UFS protocol, the first bus as the PCIE bus, and the second bus as the UFS bus.
The software of fig. 2 is described as an example.
Processor firmware programs, also called processor firmware, are the most basic software code written on a computer hardware system to set up the hardware in preparation for the OS to run. The main functions of the processor firmware program are power-on, self-checking, CPU initialization, memory initialization, detection of input and output devices and bootable devices and finally booting the operating system OS.
The processor firmware program may be stored in a CPU, or the processor firmware program may be stored in a memory chip (for example, a flash chip) connected to the CPU through a first bus.
For example, the processor Firmware (also referred to as a processor Firmware program) may be Firmware such as Firmware, basic input output system (basic input output system, BIOS), manageability engine (MANAGEMENT ENGINE, ME), microcode, or intelligent management unit (INTELLIGENT MANAGEMENT unit, IMU). It should be noted that the embodiments of the present application are not limited to the specific form of the processor firmware, and the above are merely exemplary illustrations. In the following embodiments, only the BIOS is taken as an example for the processor firmware.
It should be noted that, the processor firmware described below performs a certain step (e.g., step S601 below), and it may be understood that the CPU calls the processor firmware program to perform the step.
The operating system OS includes operating system program codes such as a kernel program of the OS, a boot program of the OS, and an application program of the OS. The operating system may be Linux, window, vxWarks or other types of operating systems.
Wherein the operating system OS is stored in the UFS device.
It should be noted that the OS described below performs a certain step (e.g., step S801 below), and it can be understood that the CPU calls the OS to perform the step.
The hardware of fig. 2 will be exemplarily described below.
The UFS device is a system disk of the server, and stores an operating system OS, such as a kernel program, a startup program, and an application program. The application program is mainly used for process management, memory management, file management, network management, drive management, and the like, such as ssh, vim, firefox.
The UFS device communicates with the protocol conversion device through a second protocol.
It should be noted that, the UFS device and the protocol conversion device communicate with each other through the second protocol, which means that the protocol conversion device and the UFS device are connected using the second bus that conforms to the second protocol, and the protocol that the information interacted between the protocol conversion device and the UFS device conforms to is the second protocol.
And the out-of-band control chip can remotely maintain and manage the server through a special data channel. The out-of-band control chip is completely independent of the central processing unit CPU of the server, and can communicate with the basic input and output system (basic input output system, processor firmware) and the OS (or OS management unit) through the out-of-band management interface of the server.
By way of example, the out-of-band control chip may include a monitoring management unit external to the computer device, a management system in the management chip external to the processor, a computer device baseboard management unit (baseboard management controller, BMC), a system management module (SYSTEM MANAGEMENT mode, SMM), and the like. It should be noted that the embodiment of the present application is not limited to the specific form of the out-of-band control chip, and the above is only exemplary. In the following embodiments, only the out-of-band control chip including the BMC will be described as an example.
The south bridge chip is one chip based on the personal computer main board chip group structure and is used for processing low-speed signals.
And the protocol conversion device is communicated with the CPU through a first protocol and is used for converting the information conforming to the first protocol into the information conforming to the second protocol and converting the information conforming to the second protocol into the information conforming to the first protocol.
The CPU and the protocol conversion device are in communication through the first protocol, which means that the CPU and the protocol conversion device are connected by using a first bus conforming to the first protocol, and the protocol conforming to the information interacted between the CPU and the protocol conversion device is the first protocol.
Optionally, the protocol conversion device comprises a PCIE interface, a UFS device interface and a protocol conversion module.
The PCIE interface is configured to connect to a CPU, for example, a CPU of version X86/ARM (Advanced RISC Machines), so that information converted by the protocol conversion module and conforming to a PCIE protocol is sent to the CPU through a PCIE channel. It should be noted that, in the embodiment of the present application, the protocol version followed by the PCIE interface is not limited, for example, the PCIE interface may be an interface following protocol versions such as PCIE 4.0, PCIE 5.0, and the like.
The UFS interface is configured to connect with a UFS device. It should be noted that, the embodiment of the present application does not limit the protocol version followed by the UFS interface, for example, the USF interface may be an interface that follows the version of the UFS4.0, UFS5.0, or the like. The maximum bandwidth of UFS4.0 can reach 5800MB/s.
One end of the protocol conversion module is connected with the PCIE interface, the other end of the protocol conversion module is connected with the UFS interface, and the protocol conversion module is used for converting information based on a first protocol into information based on a second protocol and converting the information based on the second protocol into the information based on the first protocol, and can achieve the effect that the bandwidth is almost lossless and the protocol conversion is achieved. For example, information based on the PCIE protocol is converted into information based on the UFS protocol, and information based on the UFS protocol is converted into information conforming to the PCIE protocol.
In some embodiments, as shown in fig. 2, the protocol conversion device is integrated in a protocol conversion chip, and the protocol conversion chip is integrated on a motherboard of the server and is connected with the CPU through a first bus.
In other embodiments, the protocol conversion device is integrated in a component connected to the CPU, such as an out-of-band control chip, a south bridge chip, etc.
Illustratively, as shown in fig. 3, the protocol conversion device is integrated in the out-of-band control chip, and then the UFS device is connected to the out-of-band control chip through the second bus. Because the PCIE interface is configured in the out-of-band control chip in the related art, the protocol conversion device can multiplex the PCIE interface in the out-of-band control chip, and does not need to be additionally configured. That is, only the protocol conversion module and the UFS interface module need to be additionally configured in the out-of-band control chip.
For example, as shown in fig. 4, the protocol conversion device is integrated in the south bridge chip, and then the UFS device is connected to the south bridge chip through the second bus.
It should be noted that, the principle of integrating the protocol conversion device in the south bridge chip is the same as the principle of integrating the protocol conversion device in the south bridge chip, so the description of integrating the protocol conversion device in the south bridge chip may refer to the description of integrating the protocol conversion device in the out-of-band control chip, which is not described in detail herein.
It should be noted that, the embodiment of the present application does not limit the existence form of the protocol conversion device.
It may be understood that the system architecture and the application scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and are not limited to the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the network architecture and the appearance of the new service scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
For ease of understanding, the operating system acquisition method provided by the present application is described below by way of example with reference to the accompanying drawings, and is applicable to the servers shown in fig. 2 to 4.
The following embodiments of the present application will exemplarily describe the process of the operating system acquisition method in four parts.
The first section, in conjunction with fig. 5, describes the process of processor firmware in the CPU identifying the UFS device.
The second section, an exemplary description is given of a process in which processor firmware in the CPU acquires a kernel program of the OS from the UFS device, in conjunction with fig. 6.
A third section, describing a process of identifying the UFS device by the kernel program in the CPU in conjunction with fig. 7;
The fourth section exemplarily describes a procedure in which a kernel program in the CPU acquires a boot program of the OS from the UFS device in conjunction with fig. 8. A fifth section describes a procedure of identifying UFS devices by a startup procedure in the CPU in conjunction with fig. 9.
A sixth section exemplarily describes a procedure of acquiring an application program from the UFS device by a startup program in the CPU in conjunction with fig. 10.
FIG. 5 is a flowchart illustrating a method of operating system acquisition, according to an example embodiment. Illustratively, the method includes S501-S505.
S501, the processor firmware in the CPU sends a first request to the protocol conversion device.
Wherein the first request is for requesting to acquire a device type stored in the protocol conversion apparatus.
The protocol conversion device is connected with the CPU through the PCIE bus, and can identify the information which is transmitted by the CPU through the PCIE bus and follows the PCIE protocol and transmit the information which follows the PCIE protocol to the CPU through the PCIE bus, so the protocol conversion device belongs to PCIE equipment.
In addition, because the PCIE devices in the related art all have independent configuration spaces, the protocol conversion devices also have independent configuration spaces. The configuration space of the protocol conversion device stores a bus number, a device number and a function number. The bus number is the number of the PCIE bus connecting the CPU and the protocol switching device, the device number is the number of the UFS device, and the function number is used to indicate the function of the UFS device, that is, the storage function.
After the server is powered on, the CPU first reads the processor firmware and runs the processor firmware. After the processor firmware starts to run, the flow of loading the PCIE device is entered. In this flow, the processor firmware sends an initialization instruction to PCIE devices connected to the CPU through the PCIE bus, so as to notify all PCIE devices to enter a waiting state. And then, the processor firmware starts scanning PCIE devices based on a depth priority algorithm, reads information in the configuration space of each PCIE device, and determines a plurality of storage type devices from all PCIE devices based on the information in the configuration space of each PCIE device. Since the function number stored in the configuration space of the protocol conversion apparatus indicates a storage function, the processor firmware determines the protocol conversion apparatus as a storage type device.
After the processor firmware discovers a plurality of storage devices connected with the CPU, the processor firmware discovers the UFS device from the plurality of storage devices, and then searches for a kernel program of the OS from the UFS device.
In some embodiments, the processor firmware sends a first request to the protocol conversion device through the PCIE bus, where the first request is used to request to obtain a device type stored in the protocol conversion device, so as to determine the UFS device according to the device type.
S501 corresponds to a specific implementation of "the CPU sends the first request to the protocol conversion device".
S502, the protocol conversion device receives a first request sent by processor firmware in the CPU.
In some embodiments, the protocol conversion device receives a first request sent by processor firmware in the CPU through the PCIE interface.
It should be noted that S502 corresponds to a specific implementation manner of "the protocol conversion device receives the first request sent by the CPU".
The protocol conversion means returns the device type of the UFS device to the processor firmware in the CPU in response to the first request S503.
Optionally, the device type stored in the protocol transferring apparatus is a device type of the UFS device.
In some embodiments, after receiving the first request, the protocol switching apparatus returns the device type of the UFS device to the processor firmware directly through the PCIE bus in response to the first request.
It should be noted that S503 corresponds to a specific implementation manner of "the protocol conversion apparatus returns the device type of the UFS device to the CPU in response to the first request".
And S504, the processor firmware in the CPU receives the device type of the UFS device returned by the protocol conversion device.
In some embodiments, the processor firmware determines to discover the UFS device based on a device type of the UFS device.
It should be noted that S504 corresponds to a specific implementation of "the CPU receives the device type of the UFS device returned by the protocol conversion apparatus".
And S505, loading a driver of the UFS device by the processor firmware in the CPU based on the device type of the UFS device.
In some embodiments, after determining that the UFS device is found, the processor firmware invokes a driver of the UFS device from the processor firmware chip and loads the driver of the UFS device.
Because the driver of the UFS device is equivalent to an external interface of the UFS device, after the driver of the UFS device is loaded by the processor firmware, communication connection can be established between the processor firmware and the UFS device through the driver, so as to control the operation of the UFS device.
It should be noted that S505 corresponds to a specific implementation manner of "the CPU loads the driver of the UFS device based on the device type of the UFS device".
In the above embodiment, the device type stored in the protocol conversion device is the device type of the UFS device, so that the CPU can successfully identify the UFS device and load the driver of the UFS device, and further successfully establish the communication link between the CPU and the UFS device, so that the CPU can send information to the UFS device by calling the driver of the UFS device, the communication difficulty between the CPU and the UFS device is reduced, the implementation process is simple and convenient, no improvement on hardware is required, and the cost is low.
The above is a description of the scheme in which the processor firmware identifies the UFS device. The following describes a scheme in which after the processor firmware recognizes the UFS device, the kernel of the OS is acquired from the UFS device.
FIG. 6 is a flowchart illustrating a method of operating system acquisition, according to an example embodiment. Illustratively, the method includes S601-S605.
And S601, the processor firmware in the CPU calls a driver of the UFS device to send a first instruction to the protocol conversion device.
The first instruction is used for indicating a kernel program of the loading OS. The first instruction follows a first protocol.
In some embodiments, the processor firmware in the CPU invokes the driver and sends the first instruction to the UFS device by the driver through the protocol conversion device, thereby implementing that the processor firmware sends the first instruction to the UFS device through the protocol conversion device.
For example, the processor firmware invokes the driver, and the driver sends a first instruction conforming to the PCIE protocol to the protocol conversion device through the PCIE bus.
Optionally, before S601, the method further includes:
and S600a, the processor firmware in the CPU sends a first addressing instruction to the UFS device through the protocol conversion device.
The first addressing instruction is used for indicating to determine the storage address of the kernel program.
In some embodiments, after identifying the UFS device, the processor sends a first addressing instruction that conforms to a PCIE protocol to the protocol conversion device through the PCIE bus, and after receiving the first addressing instruction that conforms to the PCIE protocol, the protocol conversion device converts the first addressing instruction that conforms to the PCIE protocol into a first addressing instruction that conforms to the UFS device protocol, and then sends the first addressing instruction that conforms to the UFS device protocol to the UFS device.
And S600b, the processor firmware in the CPU receives the storage address of the kernel program returned by the UFS equipment through the protocol transfer device.
In some embodiments, after receiving the first addressing instruction conforming to the UFS device protocol, the UFS device parses the first addressing instruction conforming to the UFS device protocol based on the UFS device protocol, and determines that the content indicated by the first addressing instruction is a storage address of the determined kernel. After determining the storage address of the kernel program, the UFS device sends the storage address conforming to the UFS device protocol to the protocol conversion device through the UFS device bus. After receiving the storage address conforming to the UFS device protocol, the protocol conversion device converts the storage address conforming to the UFS device protocol into a storage address conforming to the PCIE protocol, and then sends the storage address conforming to the PCIE protocol to the processor firmware.
Optionally, the first instruction comprises a memory address of the kernel program.
By setting the first instruction to include the memory address of the kernel program, the UFS device can determine the kernel program according to the memory address, which is helpful to improve the accuracy and speed of the kernel program determination.
S602, the protocol conversion device receives a first instruction sent by processor firmware in the CPU.
In some embodiments, the PCIE interface of the protocol conversion device receives a first instruction following a PCIE protocol through a PCIE bus.
It should be noted that, the first instruction conforming to PCIE protocol is different from the first instruction conforming to UFS device only in that the data format is different, and the content indicated by the two is the same.
It should be noted that S602 may be considered as "the protocol conversion device receives the first instruction following the first protocol sent by the CPU, where the first instruction is used to instruct to load a specific implementation manner of the OS".
And S603, the protocol conversion device forwards the first instruction sent by the processor firmware in the CPU to the UFS equipment.
In some embodiments, the protocol conversion module of the protocol conversion device converts the first instruction conforming to the PCIE protocol into a first instruction conforming to the UFS protocol, and sends the first instruction conforming to the UFS protocol to the UFS device through the UFS bus by the UFS interface of the protocol conversion device.
It should be noted that S603 may be regarded as a specific implementation manner of "the protocol conversion device transmits the first instruction compliant with the second protocol to the UFS device".
It should be noted that S601-S603 correspond to a specific implementation manner that the CPU sends a first instruction to the UFS device through the protocol conversion device, where the first instruction is used to instruct loading of the OS.
And S604, the UFS equipment receives a first instruction sent by processor firmware in the CPU forwarded by the protocol conversion device.
In some embodiments, the UFS device receives a first instruction over the UFS bus that complies with the UFS protocol. Since the protocol followed by the UFS device is the UFS protocol, the UFS device may parse the first instruction following the UFS protocol based on the UFS protocol, and determine that the content indicated by the first instruction is a kernel program that loads the OS.
It should be noted that S601-S604 are equivalent to "the UFS device receives the first instruction sent by the CPU through the protocol conversion device, where the first instruction is used to instruct to load the OS" in a specific implementation manner.
And S605, the UFS device returns a kernel program to the protocol conversion device.
In some embodiments, the UFS device sends a kernel that complies with the UFS protocol to the protocol conversion device over the UFS bus.
In one example, the first instruction includes a memory address of the kernel program, and the UFS device returns what is indicated by the memory address to the processor firmware.
In another example, the first instruction does not include a memory address of the kernel program, and the UFS device first determines the memory address of the kernel program, and then returns the content indicated by the memory address to the processor firmware.
And S606, the protocol conversion device receives a kernel program returned by the UFS equipment.
In some embodiments, the UFS interface of the protocol conversion device receives, via the UFS bus, a kernel program that conforms to the UFS protocol sent by the UFS device. Then, the protocol conversion module of the protocol conversion device converts the kernel program conforming to the UFS protocol into the kernel program conforming to the PCIE protocol.
It should be noted that S606 may be considered as a specific implementation manner of "the protocol conversion device receives the OS compliant with the second protocol sent by the UFS device".
S607, the protocol conversion device forwards the kernel program sent by the UFS device to the processor firmware in the CPU.
In some embodiments, the PCIE interface of the protocol conversion device sends a kernel that complies with the PCIE protocol to the processor firmware through the PCIE bus.
Note that S607 may be regarded as a specific implementation of "the protocol conversion apparatus transmits the OS compliant with the first protocol to the CPU".
S605-S607 are equivalent to a specific implementation of "UFS device sends OS to CPU through protocol conversion device".
And S608, the processor firmware in the CPU receives the kernel program of the OS sent by the UFS device and forwarded by the protocol conversion device.
In some embodiments, the processor firmware receives, through the PCIE bus, a kernel following the PCIE protocol returned by the protocol conversion device. Because the protocol followed by the CPU is the PCIE protocol, the CPU may parse the kernel program following the PCIE protocol based on the PCIE protocol, and run the kernel program, thereby implementing starting of the operating system.
It should be noted that the principle of the processor firmware running the kernel program is the same as that of the CPU running the kernel program in the related art, for example, the processor firmware loads the kernel program into the memory of the server and runs the kernel program, which will not be described in detail herein.
It should be noted that S605-S608 are equivalent to a specific implementation manner of "the CPU receives the OS returned by the UFS device through the protocol conversion device".
In the above embodiment, the processor firmware obtains the kernel program from the UFS device through the protocol conversion device, so as to implement running the kernel program. The kernel program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, so that the storage cost of the kernel program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and the method is also beneficial to quickly acquiring the kernel program, shortening the starting time of the kernel program and improving the stability of the kernel program.
The above is an illustration of the kernel program scheme where the processor firmware interacts with the UFS device and obtains the OS from the UFS device. In the following, a scheme in which the kernel identifies the UFS device after the processor firmware runs the kernel will be described.
FIG. 7 is a flowchart illustrating a method of operating system acquisition, according to an example embodiment. Illustratively, the method includes S701-S705.
The kernel program in the CPU sends a first request to the protocol conversion device S701.
Wherein the first request is for requesting to acquire a device type stored in the protocol conversion apparatus.
It should be noted that S701 corresponds to another specific implementation of "the CPU transmits the first request to the protocol conversion device".
S702, the protocol conversion device receives a first request sent by a kernel program in the CPU.
It should be noted that S702 corresponds to another specific implementation manner of "the protocol conversion device receives the first request sent by the CPU".
The protocol conversion means returns the device type of the UFS device to the kernel program in the CPU in response to the first request S703.
S703 corresponds to another specific implementation of "the protocol conversion apparatus returns the device type information of the UFS device to the CPU in response to the first request".
And S704, the kernel program in the CPU receives the device type of the UFS device returned by the protocol conversion device.
It should be noted that S704 corresponds to another specific implementation of "the CPU receives the device type of the UFS device returned by the protocol conversion apparatus".
And S705, loading a driver of the UFS device by a kernel program in the CPU based on the device type of the UFS device.
It should be noted that S705 corresponds to a specific implementation manner of "the CPU loads the driver of the UFS device based on the device type of the UFS device".
It should be noted that the implementation principle of S701-S705 is the same as that of S501-S505, and thus, for the implementation procedure of S701-S705 and the related description, reference may be made to S501-S505 described above, which will not be described in detail here.
Next, a description will be given of a scheme in which after the kernel identifies the UFS device, the kernel acquires the boot program of the OS from the UFS device.
FIG. 8 is a flowchart illustrating a method of operating system acquisition, according to an example embodiment. Illustratively, the method includes S801-S808.
S801, a kernel program in the CPU calls a driver program of the UFS device to send a second instruction to the protocol conversion device.
Wherein the second instruction is used for indicating loading of the starting program.
S802, the protocol conversion device receives a second instruction sent by a kernel program in the CPU.
S803, the protocol conversion device forwards a second instruction sent by the kernel program in the CPU to the UFS device.
And S804, the UFS equipment receives a second instruction sent by a kernel program in the CPU forwarded by the protocol conversion device.
And S805, the UFS device returns a starting program to the protocol conversion device.
And S806, the protocol conversion device receives a starting program returned by the UFS equipment.
S807, the protocol conversion device forwards the startup program returned by the UFS device to the kernel program in the CPU.
S808, the kernel program in the CPU receives the start program returned by the UFS device forwarded by the protocol conversion device.
It should be noted that the implementation principle of S801 to S808 is the same as that of S601 to S608, and thus, for the implementation procedure and related description of S801 to S808, reference may be made to S601 to S608 described above, which will not be described in detail here.
The above is an explanation of the kernel program of the OS interacting with the UFS device and acquiring the startup program scheme of the OS from the UFS device. Next, a description will be given of a scheme in which the boot program recognizes the UFS device after the kernel program runs the boot program of the OS.
FIG. 9 is a flowchart illustrating a method of operating system acquisition, according to an example embodiment. Illustratively, the method includes S901-S905.
S901 the start-up program in the CPU sends a first request to the protocol conversion device.
Wherein the first request is for requesting to acquire a device type stored in the protocol conversion apparatus.
Note that S901 corresponds to another specific implementation of "the CPU transmits the first request to the protocol conversion device".
The protocol conversion device receives a first request sent by a start program in the CPU S902.
S902 corresponds to another specific implementation of "the protocol conversion device receives the first request sent by the CPU".
The protocol conversion means returns the device type of the UFS device to the startup program in the CPU in response to the first request S903.
It should be noted that S903 corresponds to another specific implementation of "the protocol conversion apparatus returns the device type information of the UFS device to the CPU in response to the first request".
S904, the initiator in the CPU receives the device type of the UFS device returned by the protocol conversion means.
It should be noted that S904 corresponds to another specific implementation of "the CPU receives the device type of the UFS device returned by the protocol conversion apparatus".
S905 the startup program in the CPU loads the driver of the UFS device based on the device type of the UFS device.
It should be noted that S905 corresponds to a specific implementation manner of "the CPU loads the driver of the UFS device based on the device type of the UFS device".
It should be noted that the implementation principle of S901-S905 is the same as that of S501-S505, and thus, for the implementation procedure and related description of S901-S905, reference may be made to S501-S505 described above, which will not be described in detail here.
Next, a description will be given of a scheme of acquiring an application program of the OS from the UFS device after the startup program recognizes the UFS device.
FIG. 10 is a flowchart illustrating a method of operating system acquisition, according to an example embodiment. Illustratively, the method includes S1001-S1008.
S1001, a startup program in the CPU invokes a driver of the UFS device to send a third instruction to the protocol conversion apparatus.
Wherein the third instruction is used for indicating loading of the application program.
The protocol conversion device receives a third instruction sent by the start program in the CPU S1002.
And S1003, the protocol conversion device forwards a third instruction sent by the starting program in the CPU to the UFS equipment.
And S1004, the UFS equipment receives a third instruction sent by a starting program in the CPU forwarded by the protocol conversion device.
And S1005, the UFS device returns an application program to the protocol conversion device.
And S1006, the protocol conversion device receives the application program returned by the UFS equipment.
And S1007, the protocol conversion device forwards the application program returned by the UFS device to the starting program in the CPU.
And S1008, the starting program in the CPU receives the application program returned by the UFS equipment and forwarded by the protocol conversion device.
The implementation principle of S1001 to S1008 is the same as that of S601 to S608, and thus, reference may be made to S601 to S608 described above for the implementation procedure of S1001 to S1008 and the related description, which will not be described in detail here.
In the above embodiment, the processor firmware obtains the application program of the OS from the UFS device through the protocol conversion device, so as to implement running the application program. Because the application program is stored in the UFS equipment, and the cost of the UFS equipment is far lower than that of the NVMe SSD hard disk, the storage cost of the application program is effectively reduced. In addition, since the bandwidth and reliability of the UFS device are both high, the cost is reduced, and meanwhile, the application program can be obtained quickly, the starting time of the application program is shortened, and the stability of the application program is improved.
Optionally, after the CPU runs the application program, the method further includes:
and S1009, the application program in the CPU sends a read-write instruction to the UFS equipment through the protocol conversion device.
The read-write instruction is used for indicating the UFS equipment to read and write data.
And S1010, the UFS equipment receives a read-write instruction sent by an application program in the CPU through the protocol conversion device.
And S1011, the UFS device executes the read-write instruction.
In some embodiments, after receiving the read-write command, the UFS device parses the read-write command, and then reads and writes according to the content indicated by the read-write command.
And S1012, the UFS equipment returns the read-write result of the read-write instruction to the application program in the CPU through the protocol conversion device.
In some embodiments, after the UFS device executes the read-write instruction, the read-write result is returned to the application program through the protocol conversion device.
S1013, the application program of the CPU receives the read-write result of the read-write instruction returned by the UFS equipment through the protocol conversion device.
The implementation principle of S1009 to S1013 is the same as that of S601 to S608, and thus, for the implementation procedure of S1009 to S1013, reference may be made to S601 to S608 described above, which will not be described in detail here.
In the implementation mode, after the CPU runs the application program, a read-write instruction is sent to the UFS equipment through the protocol conversion device, so that the UFS equipment is instructed to read and write data, the data are stored in the UFS equipment and the data in the UFS equipment are read, further, a hard disk for storing the data is not needed to be additionally configured for the server, and the cost of the server is further reduced.
The foregoing description of the solution provided by the embodiments of the present application has been mainly presented in terms of a method. In order to implement the above functions, the operating system acquisition device includes a hardware structure and/or a software module that perform respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, according to the above method, the operating system obtaining device may be exemplarily divided into functional modules, for example, the operating system obtaining device may include each functional module corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
By way of example, fig. 11 shows a schematic diagram of one possible configuration of an operating system obtaining apparatus (denoted as operating system obtaining apparatus 110) according to the above embodiment, where the operating system obtaining apparatus is used for a server, and the server includes a central processing unit CPU, a universal flash storage UFS device, and a protocol conversion apparatus, where the CPU and the protocol conversion apparatus communicate with each other through a first protocol, and the protocol conversion apparatus communicates with the UFS device through a second protocol, and the protocol conversion apparatus is used for converting information based on the first protocol into information based on the second protocol, and the UFS device stores an operating system OS of the server. The operating system acquisition device includes a transmitting unit 111 and a receiving unit 112. And the sending unit 111 is configured to send a first instruction to the UFS device through the protocol conversion device, where the first instruction is used to instruct loading of the OS. For example, S601-S603 shown in FIG. 6. And the receiving unit 112 is configured to receive, by using the protocol conversion device, the OS returned by the UFS device. For example, S605-S608 shown in FIG. 6.
Alternatively, the first instruction is specifically configured to instruct loading of a kernel program of the OS, and the receiving unit 112 is specifically configured to receive, by the protocol conversion device, the kernel program of the OS returned by the UFS device.
Optionally, after the kernel is run, the sending unit 111 is further configured to send a second instruction to the UFS device through the protocol conversion device, the second instruction is configured to instruct loading of a startup procedure of the OS, and the receiving unit 112 is further configured to receive a startup procedure returned by the UFS device through the protocol conversion device.
Optionally, after the startup procedure is executed, the sending unit 111 is further configured to send a third instruction to the UFS device through the protocol conversion device, the third instruction is configured to instruct loading of the application program of the OS, and the receiving unit 112 is further configured to receive the application program returned by the UFS device through the protocol conversion device.
Optionally, after the application program is run in the application program, the sending unit 111 is further configured to send a read-write instruction to the UFS device through the protocol conversion device, where the read-write instruction is used to instruct the UFS device to read and write data, and the receiving unit 112 is further configured to receive a read-write result of the read-write instruction returned by the UFS device through the protocol conversion device.
Optionally, the sending unit 111 is further configured to send a first request to the protocol conversion apparatus, where the first request is used to request to obtain a device type stored in the protocol conversion apparatus, where the device type stored in the protocol conversion apparatus is a device type of the UFS device, the receiving unit 112 is further configured to receive a device type of the UFS device returned by the protocol conversion apparatus, the receiving unit 112 is further configured to load a driver of the UFS device based on the device type of the UFS device, and the sending unit 111 is further configured to call the driver of the UFS device to send a first instruction to the UFS device through the protocol conversion apparatus.
Optionally, the first protocol includes a high-speed serial computer expansion bus standard PCIE protocol, and the second protocol includes a universal flash storage UFS protocol.
Optionally, the server further comprises an out-of-band control chip, and the protocol conversion device is integrated in the out-of-band control chip.
Optionally, the server further includes a south bridge chip, and the protocol conversion device is integrated in the south bridge chip.
Optionally, the protocol conversion device is specifically a protocol conversion chip, and the protocol conversion chip is integrated on a motherboard of the server.
Optionally, the protocol conversion device comprises a PCIE interface, a UFS interface, a protocol conversion module and a protocol conversion module, wherein the PCIE interface is used for being connected with a CPU, the UFS interface is used for being connected with the UFS, one end of the protocol conversion module is connected with the PCIE interface, the other end of the protocol conversion module is connected with the UFS interface, and the protocol conversion module is used for converting information based on a first protocol into information based on a second protocol.
For a specific description of the above alternative modes, reference may be made to the foregoing method embodiments, and details are not repeated here. In addition, any explanation and description of the beneficial effects of the operating system acquisition device 110 provided above may refer to the corresponding method embodiments described above, and will not be repeated.
By way of example, fig. 12 shows a schematic diagram of another possible configuration of an operating system obtaining device (denoted as operating system obtaining device 120) according to the above embodiment, where the operating system obtaining device is used for a server, and the server includes a central processing unit CPU, a universal flash storage UFS device, and a protocol conversion device, where the CPU communicates with the protocol conversion device through a first protocol, and where the protocol conversion device communicates with the UFS device through a second protocol, and where the protocol conversion device is used to convert information based on the first protocol into information based on the second protocol, and where an operating system OS of the server is stored in the UFS device. The operating system acquisition device includes a receiving unit 121, a converting unit 122, and a transmitting unit 123. The receiving unit 121 is configured to receive a first instruction, which is sent by the CPU and follows a first protocol, and the first instruction is used to instruct loading of the OS. For example, S602 shown in fig. 6. The conversion unit 122 is configured to convert a first instruction conforming to a first protocol into a first instruction conforming to a second protocol. A sending unit 123, configured to send a first instruction conforming to the second protocol to the UFS device. For example, S603 shown in fig. 6. The receiving unit 121 is further configured to receive an OS that conforms to the second protocol and is returned by the UFS device. For example, S606 shown in fig. 6. The conversion unit 122 is further configured to convert an OS compliant with the second protocol into an OS compliant with the first protocol. The transmission unit 123 is also configured to return the OS conforming to the first protocol to the CPU. For example, S607 shown in fig. 6.
Alternatively, the receiving unit 121 is specifically configured to receive a first instruction that is sent by the processor firmware in the CPU and conforms to the first protocol, the first instruction is specifically configured to instruct loading of a kernel program of the OS, and receive a kernel program of the OS that conforms to the second protocol and returns from the UFS device.
Alternatively, after the CPU runs the kernel program, the receiving unit 121 is further used for receiving a second instruction which is sent by the kernel program in the CPU and is compliant with the first protocol, the second instruction is used for indicating to load the starting program of the OS, the converting unit 122 is further used for converting the second instruction which is compliant with the first protocol into the second instruction which is compliant with the second protocol, the sending unit 123 is further used for sending the second instruction which is compliant with the second protocol by the UFS device, the receiving unit 121 is further used for receiving the starting program which is returned by the UFS device, the converting unit 122 is further used for converting the starting program which is compliant with the second protocol into the starting program which is compliant with the first protocol, and the sending unit 123 is further used for returning the starting program which is compliant with the first protocol to the kernel program in the CPU.
Alternatively, after the CPU runs the startup program, the receiving unit 121 is further used for receiving a third instruction which is sent by the application program in the CPU and follows the first protocol, the third instruction is used for indicating to load the application program of the OS, the converting unit 122 is further used for converting the third instruction which follows the first protocol into a third instruction which follows the second protocol, the sending unit 123 is further used for sending the third instruction which follows the second protocol to the UFS device, the receiving unit 121 is further used for receiving the application program which follows the second protocol and is returned by the UFS device, the converting unit 122 is further used for converting the application program which follows the second protocol into the application program which follows the first protocol, and the sending unit 123 is further used for returning the application program which follows the first protocol to the OS in the CPU.
Optionally, after the CPU runs the application program, the receiving unit 121 is further configured to receive a read-write instruction which is sent by the CPU and follows the first protocol, where the read-write instruction is used to instruct the UFS device to read and write data, the converting unit 122 is further configured to convert the read-write instruction which follows the first protocol into a read-write instruction which follows the second protocol, the sending unit 123 is further configured to send the read-write instruction which follows the second protocol to the UFS device, the receiving unit 121 is further configured to receive a read-write result which is returned by the UFS device and follows the second protocol, the converting unit 122 is further configured to convert the read-write result which follows the second protocol into a read-write result which follows the first protocol, and the sending unit 123 is further configured to return the read-write result which follows the first protocol to the CPU.
Optionally, before the receiving unit 121 receives the first instruction that is sent by the CPU and conforms to the first protocol, the receiving unit 121 is further configured to receive a first request sent by the CPU, where the first request is used to request to obtain a device type stored in the protocol conversion apparatus, the device type stored in the protocol conversion apparatus is a device type of the UFS device, and the sending unit 123 is further configured to return, to the CPU, the device type of the UFS device in response to the first request.
For a specific description of the above alternative modes, reference may be made to the foregoing method embodiments, and details are not repeated here. In addition, any explanation and description of the beneficial effects of the operating system obtaining device 120 provided above may refer to the corresponding method embodiments described above, and will not be repeated.
By way of example, fig. 13 shows a schematic diagram of one possible configuration of an operating system obtaining apparatus (denoted as operating system obtaining apparatus 130) according to the above embodiment, where the operating system obtaining apparatus is used for a server, and the server includes a central processing unit CPU, a universal flash storage UFS device, and a protocol conversion apparatus, where the CPU communicates with the protocol conversion apparatus through a first protocol, and where the protocol conversion apparatus communicates with the UFS device through a second protocol, and where the protocol conversion apparatus is used to convert information based on the first protocol into information based on the second protocol, and where an operating system OS of the server is stored in the UFS device. The operating system acquisition device includes a receiving unit 131 and a transmitting unit 132. The receiving unit 131 is configured to receive a first instruction sent by the CPU through the protocol conversion device, where the first instruction is used to instruct loading of the OS. For example, S601-S604 shown in FIG. 6. A transmitting unit 132 for returning the OS to the CPU through the protocol conversion means. For example, S605-S607 shown in FIG. 6.
Alternatively, the receiving unit 131 is specifically configured to receive a first instruction sent by the processor firmware of the CPU through the protocol conversion device, where the first instruction is specifically configured to instruct loading of the kernel program of the OS, and the sending unit 132 is specifically configured to return the kernel program of the OS to the processor firmware of the CPU through the protocol conversion device.
Alternatively, after the CPU runs the kernel program, the receiving unit 131 is further configured to receive a second instruction sent by the kernel program in the CPU through the protocol conversion device, the second instruction is configured to instruct loading of the start-up program of the OS, and the sending unit 132 is further configured to return the start-up program to the CPU through the protocol conversion device.
Optionally, after the CPU runs the startup procedure, the receiving unit 131 is further configured to receive a third instruction sent by the startup procedure in the CPU through the protocol conversion device, where the third instruction is used to instruct loading of the application program of the OS, and the sending unit 132 is further configured to return the application program to the startup procedure in the CPU through the protocol conversion device.
Optionally, the device further comprises a processing unit 133, after the CPU runs the application program, the receiving unit 131 is further configured to receive a read-write instruction sent by the application program in the CPU through the protocol conversion device, the read-write instruction is configured to instruct the UFS device to read and write data, the processing unit 133 is configured to execute the read-write instruction, and the sending unit 132 is further configured to return a read-write result of the read-write instruction to the application program in the CPU through the protocol conversion device.
For a specific description of the above alternative modes, reference may be made to the foregoing method embodiments, and details are not repeated here. In addition, any explanation and description of the beneficial effects of the operating system obtaining device 130 provided above may refer to the corresponding method embodiments described above, and will not be repeated.
The embodiment of the application also provides a server, which comprises a processor and a memory, wherein the processor is connected with the memory, the memory stores computer execution instructions, and the processor realizes the method for acquiring the operating system in the embodiment when executing the computer execution instructions.
The embodiment of the application does not limit the specific form of the server. For example, the server may be a physical or logical server, or may be two or more physical or logical servers sharing different responsibilities, and cooperate to implement various functions of the server.
Embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program which, when run on a server, causes the server to perform a method performed by any one of the servers provided above.
For the explanation of the relevant content and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, and the description thereof will not be repeated here.
The embodiment of the application also provides a chip. The chip has integrated therein a control circuit and one or more ports for implementing the functions of the server described above. Optionally, the functions supported by the chip may be referred to above, and will not be described herein. Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above-described embodiments may be implemented by a program to instruct associated hardware. The program may be stored in a computer readable storage medium. The above-mentioned storage medium may be a read-only memory, a random access memory, or the like. The processing unit or processor may be a central processing unit, a general purpose processor, an Application SPECIFIC INTEGRATED Circuit (ASIC), a microprocessor (DIGITAL SIGNAL processor, DSP), a field programmable gate array (field programmable GATE ARRAY, FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof.
The embodiments of the present application also provide a computer program product comprising instructions which, when run on a server, cause the server to perform any of the methods of the embodiments described above. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a server, the processes or functions in accordance with embodiments of the present application are produced in whole or in part.
It should be noted that the above-mentioned devices for storing computer instructions or computer programs, such as, but not limited to, the above-mentioned memories, computer-readable storage media, communication chips, and the like, provided by the embodiments of the present application all have non-volatility.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a server, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, a website, computer, server, or data center via a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the media. Usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., solid State Disk (SSD)) or the like.
Although the application is described herein in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Although the application has been described in connection with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made without departing from the spirit and scope of the application. Accordingly, the specification and drawings are merely exemplary illustrations of the present application as defined in the appended claims and are considered to cover any and all modifications, variations, combinations, or equivalents that fall within the scope of the application. It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.