CN115904519A - Operating system starting state obtaining method and device, electronic equipment and storage medium - Google Patents

Operating system starting state obtaining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115904519A
CN115904519A CN202211697781.5A CN202211697781A CN115904519A CN 115904519 A CN115904519 A CN 115904519A CN 202211697781 A CN202211697781 A CN 202211697781A CN 115904519 A CN115904519 A CN 115904519A
Authority
CN
China
Prior art keywords
action
processor
register
operating system
monitoring module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211697781.5A
Other languages
Chinese (zh)
Inventor
杨路宁
任宏斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Yep Telecommunication Technology Co Ltd
Original Assignee
Xian Yep Telecommunication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Yep Telecommunication Technology Co Ltd filed Critical Xian Yep Telecommunication Technology Co Ltd
Priority to CN202211697781.5A priority Critical patent/CN115904519A/en
Publication of CN115904519A publication Critical patent/CN115904519A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a method and a device for acquiring a starting state of an operating system, electronic equipment and a storage medium, wherein a mainboard of the electronic equipment comprises: a processor and a programmable logic device, the programmable logic device comprising: the method comprises the following steps: after the mainboard is powered on, the action monitoring module monitors the writing action of the processor aiming at the first register of the virtual IO expansion module, records the writing action of the processor and caches the value of the first register written by the writing action of the processor; when the recorded number of times of writing actions of the processor reaches a preset number M, the action monitoring module acquires a starting result of an operating system of the electronic equipment according to the cached value written into the first register for M times, and the starting result is used for representing whether the operating system is started successfully; m is an integer greater than or equal to 2. The method realizes the purpose of actively acquiring the starting state of the operating system of the X86 electronic equipment.

Description

Operating system starting state obtaining method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to operating system boot technologies, and in particular, to a method and an apparatus for acquiring a boot status of an operating system, an electronic device, and a storage medium.
Background
During the starting process, the X86 server starts the operating system. The boot state of the operating system plays a crucial role in the analysis of the overall boot state of the X86 server, and in the system-level log collection. In addition, the boot state of the operating system is important for the analysis and resolution of some problems associated with the boot state of the operating system.
However, in the prior art, there is no method for actively detecting the boot state of the operating system in the X86 server.
Disclosure of Invention
The application provides a method and a device for acquiring a starting state of an operating system, an electronic device and a storage medium, which are used for solving the problem that the starting state of the operating system is not actively detected in an X86 server in the prior art.
In a first aspect, the present application provides a method for acquiring a start state of an operating system, where a motherboard of an electronic device includes: a processor and a programmable logic device, the programmable logic device comprising: the method comprises the following steps of:
after the mainboard is powered on, the action monitoring module monitors the writing action of the processor on a first register of the virtual IO expansion module, records the writing action of the processor, and caches the value of the first register written by the writing action of the processor, wherein the value of the first register is used for enabling peripheral elements connected with the virtual IO expansion module and driving light-emitting devices of the peripheral elements;
when the recorded number of times of the writing actions of the processor reaches a preset number M, the action monitoring module acquires a starting result of an operating system of the electronic equipment according to the cached value written into the first register for M times, wherein the starting result is used for representing whether the operating system is started successfully; and M is an integer greater than or equal to 2.
Optionally, when M is equal to 2, the monitoring module monitors a write action of the processor to a first register of the virtual IO extension module, records the write action of the processor, and caches a value written into the first register by the write action of the processor, where the caching method includes:
when the processor executes the writing action of the first register for the first time, the action monitoring module records the writing action of the processor, caches the value written into the first register by the writing action of the processor for the first time, and starts a timer;
after the timer is started for a preset length, the action monitoring module judges whether the processor executes the writing action to the first register again;
if the processor executes the write-in action to the first register again, the action monitoring module records the write-in action of the processor and caches the value written into the first register by the write-in action of the processor.
Optionally, the obtaining a start result of an operating system of the electronic device according to the cached value written into the first register M times includes:
if the values written into the first register for 2 times are equal, the action monitoring module determines that the operating system is successfully started;
and if the values written into the first register for 2 times are not equal, the action monitoring module determines that the starting of the operating system fails.
Optionally, the starting the timer includes:
and the action monitoring module takes the value written into the first register by the initial writing action of the processor as an enabling signal of the timer so as to start the timer.
Optionally, the method further includes:
the action monitoring module writes a starting result of the operating system into a second register of the programmable logic device;
and/or the action monitoring module sends a starting result of the operating system to a substrate management controller of the electronic equipment;
and/or the action monitoring module sends the starting result of the operating system to a logic module of the programmable logic device.
Optionally, after the action monitoring module sends the start result of the operating system to the logic module of the programmable logic device, the method further includes:
and the action monitoring module determines the fault occurrence stage according to the starting result of the operating system when the mainboard starts a fault.
Optionally, the method further includes:
the virtual IO expansion module acquires the state of a peripheral element expansion slot after the mainboard is powered on;
the virtual IO expansion module sends the state of the peripheral element expansion slot to the processor;
the virtual IO expansion module acquires configuration data sent by the processor according to the state of the peripheral element expansion slot, wherein the configuration data is used for enabling the peripheral element and driving a light-emitting device of the peripheral element;
and the virtual IO expansion module issues the configuration data to the peripheral element.
In a second aspect, the present application provides an operating system boot state obtaining apparatus, where a motherboard of an electronic device includes: a processor and a programmable logic device, the programmable logic device comprising: action monitoring module and virtual IO extension module, the device is applied to virtual IO extension module, the device includes:
the monitoring module is used for monitoring the writing action of the processor on a first register of the virtual IO extension module after the mainboard is powered on, recording the writing action of the processor and caching the value of the first register written by the writing action of the processor;
the obtaining module is configured to obtain a starting result of an operating system of the electronic device according to the cached value written into the first register for M times when the recorded number of times of the write-in actions of the processor reaches a preset number M, where the starting result is used to represent whether the operating system is started successfully; and M is an integer greater than or equal to 2.
In a third aspect, the present application provides an electronic device, where a main board of the electronic device includes: a processor and a programmable logic device, the programmable logic device comprising: the system comprises an action monitoring module and a virtual IO expansion module;
the processor executes computer execution instructions to implement a write action for a first register of the virtual IO expansion module;
the action monitoring module executes computer-executable instructions stored therein to implement the method of any one of the first aspect as performed by the action monitoring module;
the virtual IO extension module executes computer execution instructions stored therein to implement the method executed by the virtual IO extension module in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the operating system boot state obtaining method according to any one of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of the first aspect.
According to the method and the device for acquiring the starting state of the operating system, the electronic equipment and the storage medium, the writing action of the processor for the virtual IO extension module in the programmable logic device is actively monitored through the action monitoring module of the programmable logic device, the value of the written first register is recorded, and therefore the starting state of the operating system can be actively detected in the electronic equipment carrying the X86 operating system.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of a basic frame of a motherboard of an electronic device carrying an X86 operating system;
FIG. 2 is a schematic diagram of a basic frame of a motherboard of another electronic device equipped with an X86 operating system;
fig. 3 is a schematic flowchart of a method for acquiring a boot state of an operating system according to the present application;
fig. 4 is a schematic flowchart of another method for acquiring a boot state of an operating system according to the present application;
fig. 5 is a schematic flowchart of another method for acquiring a boot state of an operating system according to the present application;
fig. 6 is a schematic structural diagram of an operating system startup state obtaining apparatus provided in the present application;
fig. 7 is a schematic structural diagram of an electronic device 110 provided in the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
The terms referred to in this application are explained first:
Input/Output (IO) extender: for increasing the number of IO ports. When the IO extender is applied to a certain electronic device (e.g., a server), the number of peripheral components that can be externally connected to the electronic device can be increased. The peripheral device is an IO device, such as a hard disk.
Programmable Logic Device (PLD): the integrated circuit is a general-purpose integrated circuit, and mainly includes a Complex Programmable Logic Device (CPLD), a Field Programmable Gate Array (FPGA), and the like. A user may programmatically implement the building of various modules with different logic functions within a PLD. Taking the CPLD as an example, the CPLD includes a plurality of programmable logic units, a plurality of programmable IO units, and programmable interconnects. A user can establish a plurality of logic modules with different logic functions in the CPLD by programming the programmable logic unit; the programmable IO cells may also be programmed to create a virtual IO extension module with the same functionality as the physical IO extender.
Fig. 1 is a schematic diagram of a basic frame of a motherboard of an electronic device on which an X86 operating system is mounted. The electronic device may be, for example, an X86 operating system server, a computer, or the like.
As shown in fig. 1, the motherboard includes two backplane Programmable Logic Devices (PLDs) (e.g., PLD1 and PLD2 shown in fig. 1), two Central Processing Units (CPUs) (e.g., CPU0 and CPU1 shown in fig. 1), a Baseboard Management Controller (BMC), a Platform Controller Hub (PCH), and a motherboard PLD.
The PLD1 and the CPU0, and the PLD2 and the CPU1 are connected through an Inter-Integrated Circuit (IIC) Bus (e.g., a Virtual Pin Port (VPP) Bus), the CPU0 and the CPU1 are connected through an IIC Bus (e.g., an Ultra Path Interconnect (UPI)), the PCH and the BMC are connected through an IIC Bus (e.g., a Low Pin count Bus (LPC)) Bus, the two backplane PLDs and the motherboard PLD are connected through an IIC, e.g., a Serial General Purpose Input/Output (SGPIO) Interface, and the CPU0 and the PCH are connected through a Direct Media Interface (DMI).
The present application is not limited to the types of PLD1 and PLD2, and may be, for example, a CPLD or an FPGA. The PLD1 and the PLD2 are provided with virtual IO extension modules, and the virtual IO extension modules include input registers and output control registers. The output control register is a register having characteristics of an output register and a control register, and a value of the output control register is used for enabling the peripheral element connected with the virtual IO extension module and driving the light emitting device of the peripheral element. The Light Emitting device of the peripheral component is used for representing the operation state of the peripheral component, and may be a Light Emitting Diode (LED), for example.
Fig. 2 is a schematic diagram of a basic motherboard framework of another electronic device equipped with an X86 operating system, and as shown in fig. 2, compared to fig. 1, the basic motherboard framework shown in fig. 2 is added with expansion chips (hereinafter referred to as SW) 2 (SW 2 shown in fig. 2) and SW3, where the SW2 and SW3 are used to increase the number of channels of a high-speed serial component interconnect express (PCIe) in the motherboard, so as to increase the number of function expansion cards connectable to a server, for example, PCIe Switch chips.
In this implementation, as shown in fig. 2, both backplane PLDs are connected to SW2 and SW3 through IIC buses (e.g., SHP buses), respectively. SW2 is connected to CPU0 via a PCIe bus, and SW3 is connected to CPU1 via a PCIe bus.
Taking an X86 server carrying an X86 os as an example, currently, there is no method for actively detecting the boot state of the os in the X86 server in the prior art.
Taking the X86 server using the motherboard frame shown in fig. 1 as an example, the inventor found through research that, after the motherboard is powered on, a Basic Input Output System (BIOS) starts to start, at this time, the CPU0 and the CPU1 respectively scan the virtual IO extension modules inside the connected PLDs through the IIC bus, and after the scanning is completed, perform a write operation, and write the value of the Output control register in the virtual IO extension module.
Then, when the operating system is started, the CPU0 and the CPU1 scan the virtual IO extension module connected thereto again, and after the scanning is completed, perform the write operation again to write the value of the output control register again. Since the configuration data for the same peripheral device is the same during one motherboard boot process, the values of the output control registers written twice are also the same, that is, if the operating system is successfully booted, CPU0 and CPU1 will perform at least two write operations, and the values written twice into the output control registers are equal.
In view of the above, the present application provides a method for acquiring a boot state of an operating system, which can actively acquire a boot state of an operating system by actively monitoring a value written by a CPU to an output control register in the foregoing link, and is helpful for analyzing the boot state of an X86 server as a whole, collecting logs at a system level, and analyzing and solving some problems related to the boot state of the operating system.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. These several specific embodiments may be combined with each other below, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The execution subject of the embodiments described below may be, for example, an action monitoring module in PLD1, or PLD 2. The action monitoring module, i.e., PLD1, or the logic unit of PLD2, is a logic module constructed by acquiring the user's programming code. When the execution main body is an action monitoring module in the PLD1, the action monitoring module can actively acquire the starting state of the operating system by actively monitoring the value written into the output control register by the CPU0 in the link; when the execution main body is an action monitoring module in the PLD2, the action monitoring module can actively acquire the start state of the operating system by actively monitoring the value written by the CPU1 to the output control register in the aforementioned link.
The following describes how to actively acquire the operating system boot state, taking the execution subject as an action monitoring module in the PLD1 as an example.
Fig. 3 is a schematic flowchart of a method for acquiring a boot state of an operating system according to the present application, as shown in fig. 3, including the following steps:
s101, after the mainboard is powered on, the action monitoring module monitors the writing action of the processor for the first register of the virtual IO extension module, records the writing action of the processor, and caches the value of the first register written by the writing action of the processor.
The motherboard may be a motherboard of any X86 server, and for example, may be a motherboard as shown in fig. 1, or a motherboard as shown in fig. 2. The present application does not limit the specific type and model of the processor, and when the motherboard shown in fig. 1 is used, the processor is CPU0, and when the motherboard shown in fig. 2 is used, the processor is SW2.
The application does not limit the type of the IO extender simulated by the virtual IO extension module. The first register is any output control register in the virtual IO extension module. The number of bits of the first register is not limited in this application, and may be 8 bits or 6 bits, for example. As an example, the number of bits of the value of the first register is consistent with the number of bits of the first register, and the first register is an 8-bit output control register, the value of the first register is composed of 8-bit binary characters, and may be, for example, 0X16 represented by the 8-bit binary characters.
As described above, the value of the first register is used to enable the peripheral elements connected by the virtual IO extension module, and to drive the light emitting devices of the peripheral elements. For example, the first bit of the value of the first register may be used to indicate whether the fault indicator lamp of the peripheral element is turned on, and if the first bit of the value of the first register is 1, the fault indicator lamp is turned on; if the first bit is 0, the fault indicator lamp is not illuminated. The present application does not limit the specific meaning and the specific value indicated by each bit of the value of the first register, and those skilled in the art can set the meaning and the specific value according to the actual situation.
In this step, the action monitoring module monitors the write action of the processor on the first register of the virtual IO extension module, records the write action of the processor, and caches the value written into the first register by the write action of the processor, so that the start-up process can be recorded by recording the flagging action (i.e., the write action) and the flagging value (i.e., the value of the first register). Taking the motherboard shown in fig. 1 as an example, the action monitoring module monitors the writing action of the CPU0 to the first register of the virtual IO extension module.
As a possible implementation manner, after the motherboard is powered on, the action monitoring module monitors all write actions of the processor for the first register of the virtual IO extension module, records all write actions of the processor, and caches a value written into the first register by the write action of the processor.
As another possible implementation manner, after the motherboard is powered on, the action monitoring module monitors a partial write action of the processor on the first register of the virtual IO extension module, records the partial write action, and caches a value written into the first register by the partial write action of the processor.
Illustratively, the action monitoring module includes a timer therein, and the action monitoring module does not monitor a write action of the processor to the first register of the virtual IO extension module within a preset time length after the timer is started. The preset time period may be, for example, 40 seconds. The present application does not limit the type of the timer and the configuration of the specific implementation circuit.
S102, when the recorded number of times of the writing actions of the processor reaches a preset number M, the action monitoring module obtains a starting result of an operating system of the electronic equipment according to the cached value written into the first register for M times.
M is an integer of 2 or more. Specifically, the value of M is related to the number of times of write actions performed by the processor to characterize the startup state of the operating system when the operating system of the electronic device is started in actual application. Illustratively, when the operating system of the electronic device is started in actual application, the CPU executes 2 write actions for characterizing the starting state of the operating system, and then M is 2. In a specific application, the number of times the processor executes the write operation when the operating system of the electronic device is started is not limited in the present application, and a person skilled in the art can set the number according to actual situations.
As described above, in the prior art, after the motherboard is powered on, when the electronic device starts the operating system, the CPU scans the virtual IO extension module in the action monitoring module again, and after the scanning is completed, executes the write action, so as to write the value of the first register, which is the same as the value of the first register written for the first time, into the first register of the virtual IO extension module again. I.e. the number of times the write action of the scanning processor is performed and the value written to the first register each time, is related to the start-up state of the operating system of the electronic device.
In this step, when the recorded number of times of the write-in actions of the processor reaches the preset number M, the action monitoring module may obtain a start result of the operating system of the electronic device according to the cached value written into the first register for M times.
The starting result is used for representing whether the operating system is started successfully or not. As a possible implementation manner, if the values written into the first register for M times are equal, it is determined that the operating system is successfully started; and if the values written into the first register for M times are not equal, determining that the starting of the operating system fails.
As another possible implementation manner, if the value written into the first register for the first time and the value written into the first register for the last time in the values written into the first register for M times are equal, it is determined that the operating system is started successfully; and if the value written into the first register for the first time is not equal to the value written into the first register for the last time, determining that the starting of the operating system fails.
In this embodiment, after the motherboard is powered on, the action monitoring module monitors a write action of the processor with respect to the first register of the virtual IO extension module, records the write action of the processor, and caches a value of the first register written by the write action of the processor. And when the recorded writing action times reach a preset time M, the action monitoring module acquires a starting result of an operating system of the electronic equipment according to the cached value written into the first register for M times. According to the method, the monitoring of M times of writing actions of the processor on the value of the first register of the virtual IO expansion module in the PLD1 can be realized through the action monitoring module in the PLD1 in the mainboard starting process, the value of the M times of writing actions can be compared, the starting state of the operating system can be further obtained, the subsequent analysis on the whole starting state of the X86 server and the log collection of the system level are facilitated, the analysis and the solution on some problems related to the starting state of the operating system are realized, and the accuracy of information processing and decision making of the problems related to the starting state of the operating system is improved.
How to achieve the os boot state acquisition will be described below by taking M equal to 2 as an example. The same or similar contents in this embodiment as those in the above embodiments can refer to the above embodiments, and are not repeated herein. Fig. 4 is a schematic flowchart of another method for acquiring a boot state of an operating system according to the present application, and as shown in fig. 4, the method may include:
s201, when the processor executes the writing action of the first register for the first time, the action monitoring module records the writing action of the processor, the value written into the first register by the initial writing action of the cache processor, and starts a timer.
As described above, the first register is an output control register in the virtual IO extension module. Illustratively, when the virtual IO extension module is an IO extension module of a simulated PCA9555 model, the first register may be, for example, the register 02.
As a possible implementation manner, the value of the first register written by the first writing action of the processor is used as an enabling signal of the timer to start the timer.
As another possible implementation, the write action of the processor is used as an enable signal of the timer to start the timer.
S202, after the timer starts the preset time length, the action monitoring module judges whether the processor executes the writing action to the first register again.
When the mainboard is just powered on and started, the processor can execute normal Warm Reset (Warm Reset) actions and also can accidentally cause abnormal Warm Reset, and the processor recovers a normal starting time sequence after a period of time to continuously start the operating system of the electronic equipment. The accidental abnormal hot reset does not affect the normal start of the main board, but each accidental abnormal hot reset causes the processor to execute a write action to the first register in the IO extension module, so as to refresh the value of the first register. However, the write action due to the occasional abnormal hot reset described above does not accurately characterize the boot state of the operating system.
The preset time period, i.e., the time period over which the abnormal thermal reset may occur, may be obtained through experiments or experience, for example. The value of the preset time period is not limited in the present application, and can be determined by a person skilled in the art according to actual situations.
In this step, the action monitoring module does not record the write-in action executed by the processor to the first register within the preset time length of the timer, and only judges whether the processor executes the write-in action to the first register again after the preset time length of the timer is started. Through the operation, the writing action of the accidental error recording caused by the accidental error writing of the value of the first register caused by the accidental abnormal hot reset and the value of the first register can be avoided.
After the timer is started for the preset duration, at this time, since the value of the first register is already in a stable state, the abnormal value of the first register is not written due to the abnormal hot reset, so if the action monitoring module determines that the processor executes the write action to the first register again, step S203 is executed.
S203, the action monitoring module records the writing action of the processor and caches the value written into the first register by the writing action of the processor.
In this step, since the value written into the first register by the write-in action is obtained after the value of the first register is stable, and the value can represent the starting state of the operating system of the electronic device, the action monitoring module records the write-in action of the processor and caches the value written into the first register by the write-in action of the processor.
S204, the action monitoring module judges whether the values written into the first register for 2 times are equal.
If the values written into the first register for 2 times are equal, go to step S205; if the values written into the first register for 2 times are not equal, step S206 is executed.
S205, the action monitoring module determines that the starting of the operating system is successful.
S206, the action monitoring module determines that the starting of the operating system fails.
In this embodiment, the action monitoring module only monitors the initial writing action of the processor and the writing action after the preset duration after the timer is started, and does not monitor and record the writing action of the processor for the virtual IO extension module, which occurs within the preset duration after the timer is started. By the mode, the problem that the judgment of the starting state of the operating system is inaccurate due to accidental wrong writing of the value of the first register caused by abnormal starting in the starting process of the mainboard can be avoided, and the judgment accuracy of the starting result of the operating system can be improved.
Optionally, after obtaining the start result of the operating system, the action monitoring module may process the start result by at least using 1 or more of the following manners:
in the mode 1, the action monitoring module writes the starting result of the operating system into a second register of the programmable logic device.
The second register is an arbitrary output register in PLD 1. In this implementation, the action monitoring module writes the start result of the operating system into the second register of the PLD 1. Subsequently, the action monitoring module can acquire the recorded starting result of the operating system from the second register as required for self use, or send the starting result to other devices (such as a CPU) for use, so that the effective recording of the starting result of the operating system is realized, the analysis of related research and development problems of the operating system is facilitated, and the fault is accurately positioned when the fault occurs.
And 2, the action monitoring module sends the starting result of the operating system to a substrate management controller of the electronic equipment.
The BMC is used for monitoring the operating system and executing corresponding management actions based on monitoring results. With continued reference to fig. 1 and fig. 2, in this implementation, the action monitoring module sends the start result of the operating system to the BMC, which may provide a data base for the BMC, so that the BMC may execute a corresponding management action according to the start result of the operating system.
And in the mode 3, the action monitoring module sends the starting result of the operating system to other logic modules of the action monitoring module.
The other logic modules are logic modules with specific functions, such as fault analysis logic modules, which are constructed by acquiring programming codes input by a user. Subsequently, the other logic modules may determine the occurrence stage of the failure according to the start result of the operating system when the motherboard starts the failure, for example.
Illustratively, if the mainboard is in a starting failure, the starting result of the operating system represents that the operating system fails to start, and other logic modules determine that the failure occurs in a starting stage before the operating system is started; if the mainboard starts the trouble, the start result of operating system represents operating system starts the success, other logic module confirm the trouble take place at the start stage after operating system starts.
By the method, the occurrence stage of the fault can be further determined when the mainboard starts the fault, so that the fault occurrence reason can be more quickly and accurately positioned, the debugging speed is increased, and the accuracy of fault reason judgment is improved.
The embodiment provides multiple application processing modes of the starting result, has strong flexibility, provides multiple possible implementation modes for subsequent analysis based on the starting result, and simultaneously enlarges the application scene of the starting result of the operating system.
In the prior art, a PLD may configure and drive peripheral elements connected to the module through a virtual IO extension module. The method for acquiring the starting state of the operating system can be used for actively acquiring the starting state of the operating system and simultaneously configuring and driving peripheral elements connected with the virtual IO expansion module. In the following, taking an example that the execution subject is a virtual IO extension module in the PLD1, a specific implementation is described, for example, fig. 5 is a schematic flow diagram of another method for acquiring a start state of an operating system provided in the present application, and as shown in fig. 5, the method may include the following steps:
s301, after the mainboard is powered on, the virtual IO expansion module acquires the state of a peripheral element expansion Slot (Slot).
The present application is not limited to the type of the peripheral element, and may be, for example, a hard disk. The Slot is used to connect the peripheral devices to the virtual IO expansion block in the PLD 1. One virtual IO expansion module may connect a plurality of peripheral elements through a plurality of slots, and the number and types of peripheral elements connected by the virtual IO expansion module are not limited in the present application.
The Slot has two states, for example, when the peripheral element is connected with the virtual IO expansion module through the Slot, the Slot is in an in-place state; when the Slot is not connected to the peripheral element, the Slot is in an out-of-position state.
As a possible implementation manner, after the motherboard is powered on, the virtual IO extension module obtains the state of the Slot, and stores the state into an input register of the virtual IO extension module for the processor to scan and obtain. For example, when the IO extender model simulated by the virtual IO extension module is PCA9555, the register for storing the Slot status may be, for example, register 00 or register 01.
S302, the virtual IO expansion module sends the state of the peripheral component expansion slot to the processor.
In the step, after the mainboard is powered on, the processor scans the virtual IO expansion module, and after the scanning is finished, the virtual IO expansion module sends the Slot state to the processor.
S303, the virtual IO expansion module acquires the value of the first register sent by the processor according to the state of the peripheral element expansion slot.
As a possible implementation manner, the virtual IO extension module obtains a value of the first register sent by the processor, and stores the value in the first register of the virtual IO extension module.
S304, the virtual IO expansion module issues the value of the first register to the peripheral element.
In this step, the virtual IO extension module issues the value of the first register to the peripheral component through the Slot, so as to enable the peripheral component and drive the light emitting device of the peripheral component.
On the basis of the foregoing embodiment, in this embodiment, on one hand, the PLD1 may monitor, by the action monitoring module, a write action of the processor on the value of the first register of the virtual IO extension module, and obtain a start result of the operating system; on the other hand, the PLD1 can also enable the peripheral elements connected to the virtual IO expansion module and drive the light-emitting devices of the peripheral elements through the virtual IO expansion module, thereby making full use of the flexible characteristics of the programmable logic device and expanding the application scenarios thereof.
The application provides an operating system starting state acquisition device, electronic equipment's mainboard includes: a processor and a programmable logic device, the programmable logic device comprising: the device includes an action monitoring module and a virtual IO extension module, where the device is applied to the action monitoring module, and fig. 6 is a schematic structural diagram of an operating system startup state obtaining device provided in the present application, and as shown in fig. 6, the operating system startup state obtaining device includes: a monitoring unit 11 and a first acquisition unit 12. Optionally, the operating system startup state obtaining device may further include, for example, the following: a first sending unit 13 and a determining unit 14.
And the monitoring unit 11 is configured to monitor a write action of the processor to the first register of the virtual IO extension unit after the motherboard is powered on, record the write action of the processor, and cache a value of the first register written by the write action of the processor.
A first obtaining unit 12, configured to, when the recorded number of times of the write-in action of the processor reaches a preset number M, obtain, according to a value that is written into the first register for M times of the cache, a start result of an operating system of the electronic device, where the start result is used to represent whether the operating system is started successfully; and M is an integer greater than or equal to 2.
As a possible implementation manner, where M is equal to 2, the monitoring unit 11 is specifically configured to record a write action of the processor when the processor performs the write action of the first register for the first time, cache a value written into the first register by the write action of the processor for the first time, and start a timer; after the timer is started for a preset length, judging whether the processor executes the writing action to the first register again; if the processor executes the writing action to the first register again, the writing action of the processor is recorded, and the value written into the first register by the writing action of the processor is cached.
As a possible implementation manner, the first obtaining unit 12 is specifically configured to determine that the operating system is successfully started if the values written into the first register for 2 times are equal; and if the values written into the first register for 2 times are not equal, determining that the starting of the operating system fails.
In the above implementation, for example, the monitoring unit 11 is specifically configured to use the value written by the first write operation of the processor into the first register as an enable signal of the timer to start the timer.
As a possible implementation manner, the first sending unit 13 is configured to write a start result of the operating system into a second register of the programmable logic device; and/or sending the starting result of the operating system to a substrate management controller of the electronic equipment; and/or sending the starting result of the operating system to a logic unit of the programmable logic device.
As a possible implementation manner, the determining unit 14 is configured to determine, after the sending unit 13 sends the start result of the operating system to the logic unit of the programmable logic device, when the motherboard starts a fault, an occurrence stage of the fault according to the start result of the operating system.
The operating system startup state acquisition device provided in the embodiment of the application can execute the operating system startup state acquisition method in the above method embodiment, which takes the action monitoring module as the execution main body, and the implementation principle and the technical effect are similar, and are not described herein again. The division of the modules shown in fig. 6 is merely an illustration, and the present application does not limit the division of the modules and the names of the modules.
Fig. 7 is a schematic structural diagram of an electronic device 110 provided in the present application. As shown in fig. 7, the main board 111 of the electronic apparatus includes: a processor A and a programmable logic device B, the programmable logic device B comprising: an action monitoring module B1 and a virtual IO expansion module B2.
The processor executes computer-executable instructions to implement a write action to a first register of the virtual IO extension module B2. Processor a may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
The action monitoring module B1 executes computer execution instructions stored in the action monitoring module B1 so as to realize any method executed by the action monitoring module in the method embodiment;
the virtual IO extension module B2 executes computer execution instructions stored therein to implement the method executed by the virtual IO extension module in the above method embodiment.
The present application also provides a computer-readable storage medium, which may include: a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and in particular, the computer readable storage medium stores program instructions, where the program instructions are used in the method for obtaining the boot state of the operating system in the foregoing embodiment.
The present application also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the computing device may read the execution instruction from the readable storage medium, and the execution of the execution instruction by the at least one processor causes the electronic device to implement the operating system boot state acquisition method provided by the various embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An operating system boot state acquisition method is characterized in that a mainboard of an electronic device comprises: a processor and a programmable logic device, the programmable logic device comprising: the method comprises the following steps of:
after the mainboard is powered on, the action monitoring module monitors the writing action of the processor on a first register of the virtual IO expansion module, records the writing action of the processor, and caches the value of the first register written by the writing action of the processor, wherein the value of the first register is used for enabling peripheral elements connected with the virtual IO expansion module and driving light-emitting devices of the peripheral elements;
when the recorded number of times of the writing actions of the processor reaches a preset number M, the action monitoring module acquires a starting result of an operating system of the electronic equipment according to the cached value of the first register written for M times, wherein the starting result is used for representing whether the operating system is started successfully; and M is an integer greater than or equal to 2.
2. The method according to claim 1, wherein M is equal to 2, the action monitoring module monitors a write action of the processor to a first register of a virtual IO extension module, records the write action of the processor, and caches a value of the first register written by the write action of the processor, including:
when the processor executes the writing action of the first register for the first time, the action monitoring module records the writing action of the processor, caches the value written into the first register by the writing action of the processor for the first time, and starts a timer;
after the timer is started for a preset length, the action monitoring module judges whether the processor executes the writing action to the first register again;
if the processor executes the write-in action to the first register again, the action monitoring module records the write-in action of the processor and caches the value written into the first register by the write-in action of the processor.
3. The method according to claim 2, wherein the obtaining, by the action monitoring module, the start-up result of the operating system of the electronic device according to the cached value written into the first register M times includes:
if the values written into the first register for 2 times are equal, the action monitoring module determines that the operating system is successfully started;
and if the values written into the first register for 2 times are not equal, the action monitoring module determines that the starting of the operating system fails.
4. The method of claim 2, wherein starting the timer comprises:
and the action monitoring module takes the value written into the first register by the initial writing action of the processor as an enabling signal of the timer so as to start the timer.
5. The method according to any one of claims 1-4, further comprising:
the action monitoring module writes a starting result of the operating system into a second register of the programmable logic device;
and/or the action monitoring module sends a starting result of the operating system to a substrate management controller of the electronic equipment;
and/or the action monitoring module sends the starting result of the operating system to other logic modules of the programmable logic device.
6. The method of claims 1-4, further comprising:
when the mainboard starts a fault, the action monitoring module determines the occurrence stage of the fault according to the starting result of the operating system.
7. The method according to any one of claims 1-4, further comprising:
the virtual IO expansion module acquires the state of a peripheral element expansion slot after the mainboard is powered on;
the virtual IO expansion module sends the state of the peripheral element expansion slot to the processor;
the virtual IO expansion module acquires a value of a first register sent by the processor according to the state of the peripheral element expansion slot;
and the virtual IO expansion module issues the value of the first register to the peripheral element.
8. An operating system boot state acquisition apparatus, a main board of an electronic device comprising: a processor and a programmable logic device, the programmable logic device comprising: action monitoring module and virtual IO extension module, the device is applied to action monitoring module, the device includes:
the monitoring unit is used for monitoring the writing action of the processor on a first register of the virtual IO expansion module after the mainboard is powered on, recording the writing action of the processor and caching the value of the first register written by the writing action of the processor;
the obtaining unit is used for obtaining a starting result of an operating system of the electronic equipment according to the cached value written into the first register for M times when the recorded number of times of the writing actions of the processor reaches a preset number M, wherein the starting result is used for representing whether the operating system is started successfully; and M is an integer greater than or equal to 2.
9. An electronic device, wherein a main board of the electronic device comprises: a processor and a programmable logic device, the programmable logic device comprising: the system comprises an action monitoring module and a virtual IO expansion module;
the processor executes computer execution instructions to implement a write action for a first register of the virtual IO expansion module;
the action monitoring module executes computer-executable instructions stored therein to implement the method of any one of claims 1-6;
the virtual IO extension module executes computer-executable instructions stored therein to implement the method as recited in claim 7.
10. A computer-readable storage medium having stored therein computer-executable instructions for implementing the operating system boot state acquisition method of any one of claims 1 to 7 when executed by a processor.
CN202211697781.5A 2022-12-28 2022-12-28 Operating system starting state obtaining method and device, electronic equipment and storage medium Pending CN115904519A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211697781.5A CN115904519A (en) 2022-12-28 2022-12-28 Operating system starting state obtaining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211697781.5A CN115904519A (en) 2022-12-28 2022-12-28 Operating system starting state obtaining method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115904519A true CN115904519A (en) 2023-04-04

Family

ID=86482282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211697781.5A Pending CN115904519A (en) 2022-12-28 2022-12-28 Operating system starting state obtaining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115904519A (en)

Similar Documents

Publication Publication Date Title
CN106681751B (en) Unified firmware management system and management method and computer readable medium
CN105938450B (en) The method and system that automatic debugging information is collected
US20170123927A1 (en) System and method for selective bios restoration
US10296434B2 (en) Bus hang detection and find out
US20070174705A1 (en) Post (power on self test) debug system and method
CN106547653B (en) Computer system fault state detection method, device and system
US11841398B2 (en) Method and apparatus and non-transitory computer-readable storage medium for debugging solid-state disk (SSD) device
US20020095625A1 (en) Identifying field replaceable units responsible for faults detected with processor timeouts utilizing IPL boot progress indicator status
CN113366576A (en) Retention self-test for power loss operations on memory systems
CN106681877B (en) Chip debugging system and method and system chip
TW201616273A (en) System and method for recovering BIOS data of a computer
CN116383012B (en) Method and device for acquiring boot log and method for transmitting boot log
CN115904519A (en) Operating system starting state obtaining method and device, electronic equipment and storage medium
CN116627472A (en) Firmware program upgrading method and server of high-speed peripheral component equipment
US20220413766A1 (en) Method and apparatus and non-transitory computer-readable storage medium for debugging solid-state disk (ssd) device
US11933847B2 (en) Apparatus and system for debugging solid-state disk (SSD) device
JP2004302731A (en) Information processor and method for trouble diagnosis
US10025683B2 (en) Information processing device and computer-readable recording medium
CN115129520A (en) Computer system, computer server and starting method thereof
CN112634977A (en) Chip with debugging memory interface and debugging method thereof
TWI793774B (en) Method and apparatus and computer program product for debugging solid state disk devices
CN111596199A (en) Test chip, integrated circuit test method and system and detection equipment
JP2020086606A (en) Information processing unit and control program
CN116719712B (en) Processor serial port log output method and device, electronic equipment and storage medium
CN113868002A (en) Server bios log storage method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination