CN115951942B - Method and system for improving operation efficiency of Loongson platform system disk - Google Patents

Method and system for improving operation efficiency of Loongson platform system disk Download PDF

Info

Publication number
CN115951942B
CN115951942B CN202310221412.7A CN202310221412A CN115951942B CN 115951942 B CN115951942 B CN 115951942B CN 202310221412 A CN202310221412 A CN 202310221412A CN 115951942 B CN115951942 B CN 115951942B
Authority
CN
China
Prior art keywords
solid state
state disk
loongson
pmon
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.)
Active
Application number
CN202310221412.7A
Other languages
Chinese (zh)
Other versions
CN115951942A (en
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.)
Hunan Bojiang Information Technology Co Ltd
Original Assignee
Hunan Bojiang Information 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 Hunan Bojiang Information Technology Co Ltd filed Critical Hunan Bojiang Information Technology Co Ltd
Priority to CN202310221412.7A priority Critical patent/CN115951942B/en
Publication of CN115951942A publication Critical patent/CN115951942A/en
Application granted granted Critical
Publication of CN115951942B publication Critical patent/CN115951942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a system for improving the operation efficiency of a Loongson platform system disk, wherein the method for improving the operation efficiency of the Loongson platform system disk is characterized in that an NVME driver is loaded on a PMON module, an operating system file in a first solid state disk is identified through the NVME driver based on the PMON module, then the PMON module checks whether the operating system file in the first solid state disk has completed correct configuration corresponding to the NVME driver, if so, the PMON module guides the operating system in the first solid state disk to start, so that the PMON module supports the solid state disk adopting an NVME communication protocol as a system disk, and compared with the traditional mechanical hard disk, the solid state disk adopting the NVME communication protocol has higher read-write speed, and further the technical defect that the operation speed of the Loongson platform in the prior art is low is overcome.

Description

Method and system for improving operation efficiency of Loongson platform system disk
Technical Field
The invention relates to the technical field of Loongson platforms, in particular to a method and a system for improving the operation efficiency of a Loongson platform system disk.
Background
With the development of hardware localization in the computer field, the requirement of users on the starting time of an operating system is shorter and shorter, and the requirement on the transmission speed of a computer is faster and faster; at present, a Loongson platform still uses a mechanical hard disk as a system disk through an SATA (Serial Advanced Technology Attachment, serial advanced technology attachment, which is a serial hardware driver interface based on industry standards) interface, namely, files of an operating system are stored in the system disk, and the starting and daily running of the operating system are completed through reading and writing the system disk; however, mechanical hard disks have the following drawbacks as system disks: firstly, the read-write speed of a mechanical hard disk cannot meet the increasingly-improved practical application demands, so that the starting time of a Loongson platform is longer, and the demands of users are difficult to meet; secondly, the volume of the mechanical hard disk is generally larger, and vibration can be generated during operation, so that the daily stable operation of the Loongson platform is not facilitated; therefore, the Loongson platform in the prior art has the technical defect of low operation speed of a system disc.
Disclosure of Invention
The invention mainly aims to provide a method and a system for improving the operation efficiency of a Loongson platform system disk, and aims to solve the technical defect that the Loongson platform in the prior art has low operation speed of the system disk.
The technical scheme provided by the invention is as follows:
a method for improving the operation efficiency of a Loongson platform system disk is applied to a Loongson platform; the Loongson platform comprises a Loongson processor, a PMON module and a first solid state disk; the PMON module is in communication connection with the Loongson processor through an SPI interface; the first solid state disk is in communication connection with the Loongson processor through an NVME protocol; the method comprises the following steps:
after the Loongson platform is electrified, the PMON module loads an NVME driver;
the PMON module identifies whether an operating system file exists in the first solid state disk through an NVME driver;
if the operating system file exists in the first solid state disk, the PMON module checks whether the operating system file in the first solid state disk has completed correct configuration corresponding to the NVME driver;
if yes, the PMON module guides an operating system in the first solid state disk to start;
and if the operating system file does not exist in the first solid state disk, the Loongson processor generates a file fault log and stores the file fault log in the first solid state disk.
Preferably, the PMON module identifies, through an NVME driver, whether an operating system file exists in the first solid state disk, and before the identifying, further includes:
The PMON module sends a command devls to a processing chip of the first solid state disk;
if NVME0 is detected through the command devls, the PMON module determines that the first solid state disk is identified, and the PMON module is executed to identify whether an operating system file exists in the first solid state disk through an NVME driver or not, and the steps are carried out later;
if the nvme0 is not detected by the command devls, the PMON module determines that the first solid state disk is not identified, removes the comments from the Bonito.3a4000_7a-d file, and then annotates all PCIE interfaces according to a preset description code;
the PMON module sends a command devls to a processing chip of the first solid state disk again, and judges whether the first solid state disk is identified or not by judging whether the command devls detects nvme0 or not;
if not, the PMON module determines that the first solid state disk fails.
Preferably, the PMON module guides an operating system in the first solid state disk to start, including:
the PMON module changes an operation configuration file so as to enable an operating system in the first solid state disk to be started automatically;
the PMON module creates a boot.cfg file in the first solid state disk, copies the initrd.gz file under a boot folder to create a boot starting option, and loads boot configuration;
When the first solid state disk is used for reinstalling the operating system, the first solid state disk is used as a storage hard disk, and the PMON module creates a boot.cfg file under the nvme0n1p1 catalog and copies and writes preset contents.
Preferably, the Loongson platform further comprises a second solid state disk in communication connection with the Loongson processor; the second solid state disk is in communication connection with the Loongson processor through an NVME protocol; the method further comprises the steps of:
the PMON module judges whether an operating system in the first solid state disk is successfully started;
if the starting is unsuccessful, the PMON module identifies whether an operating system file exists in the second solid state disk through an NVME driver;
if the operating system file exists in the second solid state disk, the PMON module checks whether the operating system file in the second solid state disk has completed correct configuration corresponding to the NVME driver;
if yes, the PMON module guides the operating system in the second solid state disk to start.
Preferably, the PMON module guides the operating system in the second solid state disk to start, and then further includes:
the Loongson processor marks a file which is newly written in the first solid state disk from a first preset time as a file to be transferred, wherein the first preset time is the time of writing the system file into the first solid state disk;
The Loongson processor copies and writes the file to be transferred into the second solid state disk;
and the Loongson processor formats the first solid state disk and then writes the operation system file.
Preferably, the method further comprises:
when the Loongson platform is electrified, the PMON module judges whether the Loongson platform is connected with other memories except the first solid state disk or not;
the Loongson processor marks other memories as a newly-added memory, and judges whether a starting sequence adjustment instruction which is input by a user and is used for taking an operating system in the newly-added memory as an operating system which is started preferentially is acquired or not;
if yes, the Loongson processor acquires a verification character code input by a user and judges whether the verification character code is consistent with a preset character code stored in the first solid state disk;
if the two types of the operating systems are consistent, the PMON module guides the operating systems in the newly-added memory to start;
if not, the PMON module does not guide the starting of the operating system in the newly-added memory.
Preferably, the Loongson platform further comprises a wireless communication module in communication connection with the Loongson processor; the Loongson platform is correspondingly provided with a mobile management terminal; the Loongson platform is in communication connection with the corresponding mobile management terminal through the wireless communication module; the Loongson processor acquires a verification character code input by a user, judges whether the verification character code is consistent with a preset character code stored in the first solid state disk, and comprises the following steps:
After the operating system in the first solid state disk is normally started, the Loongson processor judges whether a shutdown instruction input by a user is acquired or not;
if yes, the Loongson processor randomly generates a preset character code, stores the preset character code in the first solid state disk, then sends the preset character code to a preset mobile management terminal through the wireless communication module, and then executes a shutdown instruction.
Preferably, if the two types of operating systems are consistent, the PMON module guides the operating system in the newly added memory to start, and then the PMON module further includes:
the Loongson processor prohibits access to the data in the first solid state disk through the operating system in the newly-added memory;
the Loongson processor sends a secondary verification instruction to the mobile management terminal through the wireless communication module;
the mobile management terminal randomly generates a standard secondary verification character code based on the received secondary verification instruction and sends the standard secondary verification character code to the Loongson processor;
the Loongson processor acquires an actual secondary verification character code input by a user and judges whether the actual secondary verification character code is consistent with the standard secondary verification character code;
and if the data in the first solid state disk are consistent, allowing the Loongson processor to access the data in the first solid state disk through the operating system in the newly-added memory.
Preferably, the Loongson processor acquires an actual secondary verification character code input by a user, judges whether the actual secondary verification character code is consistent with the standard secondary verification character code, and then further comprises:
if the two types of the Loongson platform are inconsistent, the Loongson processor marks the newly-added memory as a risk memory based on the disk ID of the newly-added memory, and controls the Loongson platform to be powered off;
after the Loongson platform is powered on, the PMON module judges whether the Loongson platform is connected with other memories except the first solid state disk, the Loongson processor marks the other memories as a new memory, judges whether a starting sequence adjustment instruction which is input through the input module and is used for taking an operating system in the new memory as an operating system which is started preferentially is acquired, and the PMON module further comprises:
when the Loongson platform is connected with other memories except the first solid state disk, the Loongson processor judges whether the other memories are risk memories or not based on the disk IDs of the other memories;
if the PMON module is a risk memory, the Loongson processor prohibits the PMON module from guiding the starting of an operating system in the newly-added memory;
If the operating system is not a risk memory, the Loongson processor is executed to mark other memories as a new memory, judge whether a starting sequence adjusting instruction which is input through the input module and is used for taking the operating system in the new memory as an operating system which is started preferentially is acquired, and then the steps are carried out.
The invention also provides a system for improving the operation efficiency of the Loongson platform system disk, which comprises a Loongson platform; the Loongson platform comprises a Loongson processor, a PMON module and a first solid state disk; the PMON module is in communication connection with the Loongson processor through an SPI interface; the first solid state disk is in communication connection with the Loongson processor through an NVME protocol; the system is used for executing a method for improving the operation efficiency of the Loongson platform system disk.
Through the technical scheme, the following beneficial effects can be realized:
according to the method for improving the operation efficiency of the Loongson platform system disk, the NVME driver is loaded on the PMON module, the operating system files in the first solid state disk are identified through the NVME driver based on the PMON module, then the PMON module checks whether the operating system files in the first solid state disk are correctly configured corresponding to the NVME driver, if so, the PMON module guides the operating system in the first solid state disk to start, so that the PMON module supports the solid state disk adopting the NVME communication protocol as a system disk, and compared with the traditional mechanical hard disk, the solid state disk adopting the NVME communication protocol has higher reading and writing speeds, and the technical defect that the operation speed of the system disk is low in the Loongson platform in the prior art is overcome.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a first embodiment of a method for improving the disk operation efficiency of a Loongson platform system according to the present invention;
fig. 2 is a schematic structural diagram of a system for improving operation efficiency of a Loongson platform system disk according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a method and a system for improving the operation efficiency of a Loongson platform system disk.
As shown in fig. 1, in a first embodiment of a method for improving the operation efficiency of a Loongson platform system disk provided by the present invention, the method for improving the operation efficiency of the Loongson platform system disk is applied to a Loongson platform; as shown in fig. 2, the Loongson platform comprises a Loongson processor, a PMON module, a memory, a bridge piece and a first solid state disk; the memory is in communication connection with the Loongson processor; the PMON module is in communication connection with the Loongson processor through an SPI interface; the first solid state disk is in communication connection with the Loongson processor through NVME protocol, and specifically: the bridge piece is in communication connection with the Loongson processor through an HT bus; the first solid state disk adopts NVME protocol and is in communication connection with the bridge chip through a PCIE (fully called PCI-Express, peripheral component interconnect Express, serial high-speed interface device) interface; the embodiment comprises the following steps:
Step S110: and after the Loongson platform is powered on, the PMON module loads an NVME driver.
Specifically, the current PMON module defaults to support a hard disk (i.e., a mechanical hard disk) adopting a SATA interface, namely, corresponding drivers are automatically loaded; according to the method, the first solid state disk is used as a system disk, and the first solid state disk is a hard disk adopting an NVME protocol, so that an NVME driver needs to be loaded, and preparation is made for starting from the NVME later; namely, by loading the NVME driver, the PMON module can identify and guide the operating system in the first solid state disk.
Step S120: the PMON module identifies whether an operating system file (e.g., an operating system file for a kylin operating system) exists in the first solid state disk through an NVME driver.
Step S130: if the operating system file exists in the first solid state disk (i.e. the first solid state disk is used as a system disk at this time), the PMON module checks whether the operating system file in the first solid state disk has completed correct configuration corresponding to the NVME driver.
Specifically, besides loading the NVME driver on the PMON module, the invention also needs to add the function of the PMON module for identifying the file driver in the first solid state disk; so that the operating system files have completed the correct configuration corresponding to the NVME driver, specific examples are:
1. Ensuring that the PMON module can identify the first solid state disk:
the PMON module operates to send a command devls to the processing chip of the first solid state disk, and if the nvme0 is detected by the command devls, the PMON module determines that the first solid state disk is identified, the step S120 and the following steps can be continued.
If the command devls does not detect nvme0, the PMON module determines that the first solid state disk is not recognized, namely the first solid state disk is not recognized; the following code needs to be executed:
1. the Bonito.3a4000_7a-d file in the PMON module is annotated, if the Bonito.3a4000_7a-d file is not in the PMON module, the value is directly changed into Bonito.3a4000_7a, and the specific codes are as follows:
/run/media/eric/28e04387-2553-43d3-a3e3-f2b6981df873/3A4000/2149/pmon-loongson3-2149/Targets/Bonito3a4000_7a/conf/Bonito.3a4000_7a
pcinvme
Figure SMS_1
at pci? dev ? function ?
nvme
Figure SMS_2
at pcinvme?
/run/media/eric/28e04387-2553-43d3-a3e3-f2b6981df873/3A4000/2149/pmon-loongson3-2149/Targets/Bonito3a4000_7a/conf/Bonito.3a4000_7a-d
pcinvme
Figure SMS_3
at pci? dev ? function ?
nvme
Figure SMS_4
at pcinvme?
2. and then annotating all PCIE interfaces according to preset description codes, wherein the preset description codes are as follows:
/run/media/eric/28e04387-2553-43d3-a3e3-f2b6981df873/3A4000/2149/pmon-loongson3-2118/pmon/arch/mips/ls7a/ls7a_init.S
# if 0// needs to change 1 to 0 in this place, this file needs to modify 5 places in total, meaning that this function of turning off all PCIE's, if not turned off, no NVME disk can be identified under the system,
if it is desired to identify the disc under PMON, the following 2 notes should be removed under/run/media/eric/28 e04387-2553-43d3-a3e3-f2b6981df873/3A4000/2149/PMON-loongson 3-2149/Targets/bonito3a4000_7a/conf/bonito.3a4000_7a:
//pcinvme
Figure SMS_5
at pci? dev ? function ?
//nvme
Figure SMS_6
at pcinvme?
3. After the steps are executed, the PMON module sends a command devls to the processing chip of the first solid state disk again, whether the first solid state disk is identified is judged by judging whether nvme0 is detected by the command devls, if not, the first solid state disk cannot be identified, and if the first solid state disk is identified, the problem of the first solid state disk is solved, the PMON module determines that the first solid state disk fails, and an engineer designing the first solid state disk is required to configure the disk.
After the first solid state disk is normally identified and an operating system (e.g., a kylin system) is already installed in the first solid state disk, the kylin system can be manually started:
the following 3 commands for manual system start-up under pmon
load /dev/fs/ext2@nvme0/boot/vmlinuz-3.10.0
initrd /dev/fs/ext2@nvme0/boot/initramfs-3.10.0.img
g console=ttyS0,115200 loglevel=7 root=/dev/nvme0n1p1
2. If the system is wanted to be automatically started, the PMON module changes the running configuration file so as to enable the operating system in the first solid state disk to be automatically started, and particularly, the codes of the following 2 positions need to be changed:
1. in the PMON module:
the/run/media/eric/28 e04387-2553-43d3-a3e3-f2b6981df873/3A4000/2149/pmon-loongson3-2149/pmon/common/main.c file;
the meaning of the code is that the code automatically runs under PMON, and the manual operation is changed into automatic operation
//try to read boot.cfg from nvme disk third
rootdev = "/dev/fs/ext2@nvme0";
The addition of this line is only necessary, and other contents are used for the convenience of positioning, and for the system under the automatic execution/dev/fs/ext2@nvme0, if this sentence is not added, the PMON cannot automatically load the system.
sprintf(path, "%s/boot/boot.cfg", rootdev);
if (check_config(path) == 1)
{
sprintf(path, "bl -d ide %s/boot/boot.cfg", rootdev);
if (do_cmd(path) == 0)
{
show_menu = 0;
free(path);
path = NULL;
return 1;
}
}else{
sprintf(path, "%s/boot.cfg", rootdev);
if (check_config(path) == 1)
{
sprintf(path, "bl -d ide %s/boot.cfg", rootdev);
if (do_cmd(path) == 0)
{
show_menu = 0;
free(path);
path = NULL;
return 1;
}
}
}
int check_user_password()
2. The PMON module creates a boot.cfg file in the first solid state disk, copies the initrd.gz file under a boot folder to create a boot starting option, and loads boot configuration.
When the operating system is reinstalled on the first solid state disk, the first solid state disk is used as a storage hard disk (namely, the first solid state disk is not only a system hard disk but also a storage hard disk at the moment), and the PMON module creates a boot file under the nvme0n1p1 catalog and copies and writes preset contents, wherein the specific preset contents are as follows:
[root@localhost boot]# cat boot.cfg
timeout 3
default 0
showmenu 1
title NeoKylin Military Server 5.0 (nvme0)
kernel /dev/fs/ext2@nvme0/boot/vmlinuz-3.10.0
initrd /dev/fs/ext2@nvme0/boot/initramfs-3.10.0.img
args root=/dev/nvme0n1p1 loglevel=7 resume=/dev/nvme0n1p1 console=ttyS0,115200
title System Backup and Restore
kernel /dev/fs/ext2@nvme0/boot/vmlinuz-3.10.0
initrd /dev/fs/ext2@nvme0/boot/initrd.gz
Args root=UUID="3f96b12b-4015-4d5f-8612-2f06ac0e4bec" console=tty rhgb quiet rescue。
if yes, step S140 is executed: and the PMON module guides an operating system in the first solid state disk to start.
Specifically, after the preparation, the start-up file of the operating system is also started from the SATA disk by default, so that the start-up sequence needs to be changed to preferentially start up the operating system in the first solid state disk.
Step S150: and if the operating system file does not exist in the first solid state disk, the Loongson processor generates a file fault log and stores the file fault log in the first solid state disk.
Specifically, if the first solid state disk does not have an operating system file, the operating system file in the first solid state disk cannot be identified by the PMON module, or the first solid state disk fails and cannot be read and written normally, and maintenance and investigation are required, so that the Loongson processor generates a file fault log and stores the file fault log in the first solid state disk, so that subsequent maintenance and investigation are facilitated.
The read-write speed of the solid state disk adopting NVME (Non-Volatile Memory express, nonvolatile high-speed storage) communication protocol is faster than that of the traditional mechanical hard disk, the highest read speed of the NVME protocol solid state disk in the current mainstream can reach more than 3500MB/s, and the phase difference is about 6 times compared with the speed of about 560MB/s of the solid state disk adopting the SATA interface; and the solid state disk is smaller in size, and vibration cannot be generated in the running process of the solid state disk.
The Loongson platform adopts a PMON (Programmable read only memory Monitor, programmable read-only memory programming) module as a basic input-output system (equivalent to BIOS, namely Basic Input Output System); the PMON module is used for detecting hardware, driving basic peripheral equipment and guiding an operating system.
According to the method for improving the operation efficiency of the Loongson platform system disk, the NVME driver is loaded on the PMON module, the operating system files in the first solid state disk are identified through the NVME driver based on the PMON module, then the PMON module checks whether the operating system files in the first solid state disk are correctly configured corresponding to the NVME driver, if so, the PMON module guides the operating system in the first solid state disk to start, so that the PMON module supports the solid state disk adopting the NVME communication protocol as a system disk, and compared with the traditional mechanical hard disk, the solid state disk adopting the NVME communication protocol has higher reading and writing speeds, and the technical defect that the operation speed of the system disk is low in the Loongson platform in the prior art is overcome.
In addition, compared with the traditional mechanical hard disk used as a system disk, the system disk is prepared from the solid state hard disk adopting the NVME protocol, and the read-write speed of the system disk is greatly improved; the hardware design of the Loongson platform is simplified, and the solid state disk is smaller than the mechanical hard disk in size, so that the space is saved, and the miniaturization design of the Loongson platform is facilitated; in addition, the solid state disk adopting the NVME protocol is used as the configurable speed, so that the solid state disk is more convenient to use, has idle speed control, and can reduce the running power consumption of the Loongson platform. Meanwhile, the solid state disk can be used as a data disk of the Loongson platform, so that the read-write data of the data disk are further improved, and the size and the operation power consumption of the Loongson platform are further reduced.
Compared with the traditional mechanical hard disk connected with the SATA interface, the solid state disk adopting the NVME protocol has the following advantages:
the relationship between NVME protocol and PCIE interface is: NVME is a communication protocol applied over PCIE interfaces.
The relationship between SATA interface and AHCI protocol (collectively Serial ATA Advanced Host Controller Interface, serial ATA advanced master interface/advanced host controller interface) is: the AHCI is a communication protocol applied over the SATA interface.
Compared with the AHCI protocol, the NVME protocol has several times of improvement and reasons of communication performance:
1.1: IO queue number:
the SSD queue depth under the AHCI specification is 32 IOPS capability, while the NVME protocol can promote the queue depth from 32 to 64000, thereby greatly improving the IOPS capability;
1.2: the NVME protocol is full duplex mode
The SATA interface is half duplex, parallel transmission, and the NVME protocol (PCIE interface) is full duplex, serial transmission, thereby greatly improving the speed.
1.3: PCIE channels are more numerous
The SATA interface has only one channel.
The PCIE protocol can extend the bandwidth by increasing the number of channels, and can have 32 channels at most, where the more the number of channels is, the faster the speed is; in practice, how many channels are used can be determined according to the requirements, and like the PCIE slots with different lengths can be seen on the main board, the PCIE slots have x1, x4, x16 and the like, and the requirements of different devices can be met.
1.4: the PCIE protocol is continually updated iteratively.
SATA 3.0 protocol was published 2009, and since then no more updates were made, with a speed of 500MB/s at the highest; PCIE specification version updating is always in updating, and each updating brings great improvement in speed; PCIE1.0 is born in 2002, PCIE2.0 is standardized to be discharged in 2007, PCIE3.0 is issued after three years, and the PCIE1.0 is also a main PCIE design standard at present, and the speed of x16 can reach 16GB/S. Currently, PCIE6.0 standard has been issued: the read-write speed is 8 times of PCIE3.0, and the PCIE can be commercially used in 2023.
1.5: the delay can be greatly reduced.
The NVME protocol standard is oriented to the PCIE interface and the solid state disk, and the direct connection of the native PCIE channel and the CPU can avoid the delay caused by the communication between an external controller (PCH) of the SATA and SAS interface and the CPU. The delay of NVME protocol standard is less than half of that of AHCI protocol, and the NVME protocol simplifies the calling mode, so that a register is not required to be read when a command is executed; while each command under the AHCI protocol requires reading the registers 4 times, 8000 CPU cycles are consumed, resulting in a delay of approximately 2.5 mus.
2. The automatic power consumption state switching and dynamic power consumption management functions greatly reduce power consumption.
The NVME protocol is added with automatic power consumption state switching and dynamic energy consumption management functions, and can be controlled at an extremely low level very quickly when in idle, and the NVME standard solid state disk has a larger advantage than the current mainstream AHCI protocol solid state disk in power consumption management.
4. The occurrence of NVME standards solves the problem of drive applicability between solid state disks adopting different PCIE interfaces.
In a second embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the first embodiment, step S120 further includes the following steps:
Step S210: and if the operating system files exist in the first solid state disk, the PMON module judges whether at least two different operating system files exist in the first solid state disk.
Step S220: if the operation system file exists, the Loongson processor acquires a selection instruction input by a user, and marks the operation system file corresponding to the selection instruction as a first target file.
Specifically, here, a selection instruction is input by a user through an input module.
Step S230: the PMON module checks whether the first object file has completed the correct configuration corresponding to the NVME driver.
If yes, go to step S240: and the PMON module guides the starting of an operating system corresponding to the first target file in the first solid state disk.
Specifically, when a plurality of different operating system files (for example, a kylin operating system and a Windows operating system) exist in the first solid state disk, through the scheme of the embodiment, a user can autonomously select which operating system to start.
In a third embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the second embodiment, step S210 further includes the following steps:
Step S310: if so, the Loongson processor judges whether an operating system file corresponding to a preset operating system exists in the first solid state disk.
Specifically, the preset operating system is the operating system (e.g. kylin operating system) that is preferentially started by the user.
Step S320: if the first solid state disk has the operating system file corresponding to the preset operating system, the PMON module marks the operating system file corresponding to the preset operating system as a second target file.
Step S330: the PMON module checks whether the second object file has completed the correct configuration corresponding to the NVME driver.
If yes, step S330 is executed: and the PMON module guides the starting of an operating system corresponding to the second target file in the first solid state disk.
In particular, the present embodiment is directed to how to preferentially boot an operating system preselected by a user.
In a fourth embodiment of the method for improving the operation efficiency of the Loongson platform system disk, based on the first embodiment, the Loongson platform further comprises a second solid state disk in communication connection with the Loongson processor; the second solid state disk is in communication connection with the Loongson processor through NVME protocol, and specifically comprises: the second solid state disk adopts NVME protocol and is in communication connection with the bridge piece through a PCIE interface; the embodiment further comprises the following steps:
Step S410: and the PMON module judges whether an operating system in the first solid state disk is successfully started.
Step S420: if the starting is unsuccessful, the PMON module identifies whether an operating system file exists in the second solid state disk through an NVME driver.
Step S430: and if the operating system file exists in the second solid state disk, the PMON module checks whether the operating system file in the second solid state disk has completed correct configuration corresponding to the NVME driver.
If yes, go to step S440: and the PMON module guides the starting of an operating system in the second solid state disk.
Specifically, the second solid state disk is generally used as a data disk of the Loongson platform, and only the second solid state disk stores an operating system file; when the first solid state disk is not successfully started, the Loongson platform can be started in an emergency mode by guiding the starting mode of the operating system in the second solid state disk, so that the situation that the Loongson platform cannot be started normally is avoided.
In a fifth embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the fourth embodiment, the Loongson platform further includes a mechanical hard disk communicatively connected to the Loongson processor, for example, a mechanical hard disk connected to the Loongson processor through a SATA interface; step S420, further comprising the following steps:
Step S510: and if the second solid state disk does not have the operating system file, loading the AHCI driver by the PMON module.
Step S520: and the PMON module identifies whether an operating system file exists in the mechanical hard disk through an AHCI driver.
Step S530: if the operating system file exists in the mechanical hard disk, the PMON module checks whether the operating system file in the mechanical hard disk has completed the correct configuration corresponding to the AHCI driver.
If yes, go to step S540: and the PMON module guides an operating system in the mechanical hard disk to start.
Further, the mechanical hard disk is usually used as a data disk of the Loongson platform, and only the mechanical hard disk stores operating system files; when the first solid state disk is not successfully started and the operating system file for emergency starting is not stored in the second solid state disk, the Loongson platform can be started in an emergency mode by guiding the operating system in the mechanical hard disk to start, so that the situation that the Loongson platform cannot be started normally is avoided.
In a sixth embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the fourth embodiment, step S440 further includes the following steps:
Step S610: and the Loongson processor marks a file which is newly written in the first solid state disk from a first preset time as a file to be transferred, wherein the first preset time is the time of writing the system file into the first solid state disk.
Step S620: and the Loongson processor copies and writes the file to be transferred into the second solid state disk.
Step S630: and the Loongson processor formats the first solid state disk and then writes the operation system file.
Specifically, when the operating system of the first solid state disk cannot be started normally, data in the first solid state disk needs to be transferred in time so as to ensure data safety; and marking the file which is newly written in the first solid state disk from the first preset time as a file to be transferred, and storing and writing the file to be transferred into the second solid state disk.
In a seventh embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the first embodiment, the method further includes the following steps:
step S710: and when the Loongson platform is electrified, the PMON module judges whether the Loongson platform is connected with other memories except the first solid state disk.
Specifically, the other newly accessed memories are memories (including but not limited to a usb disk, a mobile hard disk and an SD memory card) which are subsequently manually accessed to the Loongson platform from the outside, and if the newly accessed memories store operating system files, security verification needs to be performed on the operating system of the newly accessed memories so as to prevent the data in the first solid state hard disk of the Loongson platform from being stolen after the Loongson platform is started through the other memories.
Step S720: the Loongson processor marks other memories as a new memory, and judges whether a starting sequence adjustment instruction which is input by a user and is used for taking the operating system in the new memory as an operating system which is started preferentially is acquired or not.
Specifically, if the Loongson processor acquires a starting sequence adjustment instruction of the operating system which is input through the input module and is used for taking the operating system in the newly-added memory as a starting system to be started preferentially, the user really wants to start the Loongson platform by taking the newly-added memory as a starting disk, so that safety verification is needed.
If yes, step S730 is executed: and the Loongson processor acquires the verification character code input by the user and judges whether the verification character code is consistent with a preset character code stored in the first solid state disk.
Specifically, the Loongson processor acquires the verification character code input by the user through the input module, and judges whether the verification character code is consistent with a preset character code stored in the first solid state disk.
Step S740: and if the two types of the operating systems are consistent, the PMON module guides the operating systems in the newly-added memory to start.
Specifically, if the two types of memory are consistent, the PMON module guides the starting of the operating system in the new memory because the new memory is trustworthy.
Step S750: if not, the PMON module does not guide the starting of the operating system in the newly-added memory.
Specifically, if the two memories are inconsistent, the new memory is not trustworthy, so the PMON module does not guide the starting of the operating system in the new memory.
In an eighth embodiment of the method for improving the disk operation efficiency of the Loongson platform system according to the present invention, based on the seventh embodiment, the Loongson platform further includes a wireless communication module (e.g. a GSM module) communicatively connected to the Loongson processor; the Loongson platform is correspondingly provided with a mobile management terminal (such as a smart phone terminal); the Loongson platform is in communication connection with the corresponding mobile management terminal through the wireless communication module; step S730, further includes the following steps:
Step S810: after the operating system in the first solid state disk is normally started, the Loongson processor judges whether a shutdown instruction input by a user is acquired.
If yes, go to step S820: and the Loongson processor randomly generates a preset character code, stores the preset character code in the first solid state disk, then sends the preset character code to a preset mobile management terminal through the wireless communication module, and then executes a shutdown instruction.
Specifically, the embodiment provides a specific step of how to generate the preset character code, and the preset character code is generated before each shutdown, so that the preset character code can be updated for multiple times, the generated time length of a single preset character code is reduced, and the safety is further improved.
In a ninth embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the eighth embodiment, step S740 further includes the following steps:
step S910: and the Loongson processor prohibits the access of the data in the first solid state disk through the operating system in the newly-added memory.
Specifically, if the two types of data are consistent, the PMON module guides the operating system in the newly-added memory to start, but in order to further ensure the data security, the newly-added memory needs to be subjected to secondary verification, and before the secondary verification is not passed, the data in the first solid state disk are still not allowed to be accessed.
Step S920: and the Loongson processor sends a secondary verification instruction to the mobile management terminal through the wireless communication module.
Step S930: and the mobile management terminal randomly generates a standard secondary verification character code based on the received secondary verification instruction and sends the standard secondary verification character code to the Loongson processor.
Step S940: and the Loongson processor acquires an actual secondary verification character code input by a user and judges whether the actual secondary verification character code is consistent with the standard secondary verification character code.
Step S950: and if the data in the first solid state disk are consistent, allowing the Loongson processor to access the data in the first solid state disk through the operating system in the newly-added memory.
Specifically, if the data is consistent, the fact that the newly added memory passes the secondary verification is indicated, and the subsequent operation of accessing the data in the first solid state disk can be performed.
In a tenth embodiment of the method for improving the operation efficiency of the Loongson platform system disk according to the present invention, based on the ninth embodiment, step S940 further includes the following steps:
step S1010: and if the two types of the Loongson platform are inconsistent, the Loongson processor marks the newly-added memory as a risk memory based on the disk ID of the newly-added memory, and controls the Loongson platform to be powered off.
If the data is inconsistent, the added memory is not verified for the second time, so that potential safety hazards exist in the added memory, the added memory needs to be marked as a risk memory based on the disk ID of the added memory (so as to facilitate the subsequent identification of the risk memory), and the Loongson platform is controlled to be powered off, so that the risk of data leakage is reduced.
Step S610 and step S620 further include the following steps therebetween:
step S1020: when the Loongson platform is connected with other memories except the first solid state disk, the Loongson processor judges whether the other memories are risk memories or not based on the disk IDs of the other memories.
Step S1030: and if the PMON module is a risk memory, the Loongson processor prohibits the PMON module from guiding the starting of the operating system in the newly-added memory.
Specifically, when the newly accessed other memories are identified, whether the other memories are risk memories is judged first, if so, the PMON module is directly prohibited from guiding the starting of the operating system in the newly added memory, even if a user cannot start the Loongson platform through the newly accessed other memories.
Step S1040: if not, step S620 and the following steps are performed.
Specifically, if it is not a risk storage, the method may proceed to the subsequent step S620 (i.e. start the operating system in the other storage).
The invention also provides a system for improving the operation efficiency of the Loongson platform system disc, which comprises the Loongson platform.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (10)

1. The method for improving the operation efficiency of the Loongson platform system disk is characterized by being applied to the Loongson platform; the Loongson platform comprises a Loongson processor, a PMON module and a first solid state disk; the PMON module is in communication connection with the Loongson processor through an SPI interface; the first solid state disk is in communication connection with the Loongson processor through an NVME protocol; the method comprises the following steps:
after the Loongson platform is electrified, the PMON module loads an NVME driver;
the PMON module identifies whether an operating system file exists in the first solid state disk through an NVME driver;
if the operating system file exists in the first solid state disk, the PMON module checks whether the operating system file in the first solid state disk has completed correct configuration corresponding to the NVME driver;
if yes, the PMON module guides an operating system in the first solid state disk to start;
and if the operating system file does not exist in the first solid state disk, the Loongson processor generates a file fault log and stores the file fault log in the first solid state disk.
2. The method for improving the operation efficiency of the Loongson platform system disk according to claim 1, wherein the PMON module identifies whether an operating system file exists in the first solid state disk through an NVME driver, further comprising:
The PMON module sends a command devls to a processing chip of the first solid state disk;
if NVME0 is detected through the command devls, the PMON module determines that the first solid state disk is identified, and the PMON module is executed to identify whether an operating system file exists in the first solid state disk through an NVME driver or not, and the steps are carried out later;
if the nvme0 is not detected by the command devls, the PMON module determines that the first solid state disk is not identified, removes the comments from the Bonito.3a4000_7a-d file, and then annotates all PCIE interfaces according to a preset description code;
the PMON module sends a command devls to a processing chip of the first solid state disk again, and judges whether the first solid state disk is identified or not by judging whether the command devls detects nvme0 or not;
if not, the PMON module determines that the first solid state disk fails.
3. The method for improving the operation efficiency of the Loongson platform system disk according to claim 1, wherein the PMON module guides the starting of the operating system in the first solid state disk, comprises:
the PMON module changes an operation configuration file so as to enable an operating system in the first solid state disk to be started automatically;
the PMON module creates a boot.cfg file in the first solid state disk, copies the initrd.gz file under a boot folder to create a boot starting option, and loads boot configuration;
When the first solid state disk is used for reinstalling the operating system, the first solid state disk is used as a storage hard disk, and the PMON module creates a boot.cfg file under the nvme0n1p1 catalog and copies and writes preset contents.
4. The method for improving the operation efficiency of a Loongson platform system disk according to claim 1, wherein the Loongson platform further comprises a second solid state disk communicatively connected to the Loongson processor; the second solid state disk is in communication connection with the Loongson processor through an NVME protocol; the method further comprises the steps of:
the PMON module judges whether an operating system in the first solid state disk is successfully started;
if the starting is unsuccessful, the PMON module identifies whether an operating system file exists in the second solid state disk through an NVME driver;
if the operating system file exists in the second solid state disk, the PMON module checks whether the operating system file in the second solid state disk has completed correct configuration corresponding to the NVME driver;
if yes, the PMON module guides the operating system in the second solid state disk to start.
5. The method for improving the operation efficiency of the Loongson platform system disk according to claim 4, wherein the PMON module guides the operating system in the second solid state disk to start, and further comprising:
The Loongson processor marks a file which is newly written in the first solid state disk from a first preset time as a file to be transferred, wherein the first preset time is the time of writing the system file into the first solid state disk;
the Loongson processor copies and writes the file to be transferred into the second solid state disk;
and the Loongson processor formats the first solid state disk and then writes the operation system file.
6. The method of claim 1, further comprising:
when the Loongson platform is electrified, the PMON module judges whether the Loongson platform is connected with other memories except the first solid state disk or not;
the Loongson processor marks other memories as a newly-added memory, and judges whether a starting sequence adjustment instruction which is input by a user and is used for taking an operating system in the newly-added memory as an operating system which is started preferentially is acquired or not;
if yes, the Loongson processor acquires a verification character code input by a user and judges whether the verification character code is consistent with a preset character code stored in the first solid state disk;
If the two types of the operating systems are consistent, the PMON module guides the operating systems in the newly-added memory to start;
if not, the PMON module does not guide the starting of the operating system in the newly-added memory.
7. The method of claim 6, wherein the Loongson platform further comprises a wireless communication module communicatively coupled to the Loongson processor; the Loongson platform is correspondingly provided with a mobile management terminal; the Loongson platform is in communication connection with the corresponding mobile management terminal through the wireless communication module; the Loongson processor acquires a verification character code input by a user, judges whether the verification character code is consistent with a preset character code stored in the first solid state disk, and comprises the following steps:
after the operating system in the first solid state disk is normally started, the Loongson processor judges whether a shutdown instruction input by a user is acquired or not;
if yes, the Loongson processor randomly generates a preset character code, stores the preset character code in the first solid state disk, then sends the preset character code to a preset mobile management terminal through the wireless communication module, and then executes a shutdown instruction.
8. The method for improving the operation efficiency of the Loongson platform system disk according to claim 7, wherein if the operation efficiency is consistent, the PMON module guides the operating system in the newly added memory to start, and further comprising:
the Loongson processor prohibits access to the data in the first solid state disk through the operating system in the newly-added memory;
the Loongson processor sends a secondary verification instruction to the mobile management terminal through the wireless communication module;
the mobile management terminal randomly generates a standard secondary verification character code based on the received secondary verification instruction and sends the standard secondary verification character code to the Loongson processor;
the Loongson processor acquires an actual secondary verification character code input by a user and judges whether the actual secondary verification character code is consistent with the standard secondary verification character code;
and if the data in the first solid state disk are consistent, allowing the Loongson processor to access the data in the first solid state disk through the operating system in the newly-added memory.
9. The method for improving the operation efficiency of a Loongson platform system disk according to claim 8, wherein the Loongson processor obtains an actual secondary verification character code input by a user, and judges whether the actual secondary verification character code is consistent with the standard secondary verification character code, and further comprises:
If the two types of the Loongson platform are inconsistent, the Loongson processor marks the newly-added memory as a risk memory based on the disk ID of the newly-added memory, and controls the Loongson platform to be powered off;
after the Loongson platform is powered on, the PMON module judges whether the Loongson platform is connected with other memories except the first solid state disk, the Loongson processor marks the other memories as new memories, judges whether the input starting sequence adjusting instruction for taking the operating system in the new memories as the operating system which is started preferentially is acquired, and comprises the following steps:
when the Loongson platform is connected with other memories except the first solid state disk, the Loongson processor judges whether the other memories are risk memories or not based on the disk IDs of the other memories;
if the PMON module is a risk memory, the Loongson processor prohibits the PMON module from guiding the starting of an operating system in the newly-added memory;
if the operating system is not a risk memory, the Loongson processor is executed to mark other memories as a new memory, judge whether an input starting sequence adjusting instruction for taking the operating system in the new memory as an operating system which is started preferentially is acquired or not, and then step.
10. The system for improving the operation efficiency of the Loongson platform system disc is characterized by comprising a Loongson platform; the Loongson platform comprises a Loongson processor, a PMON module and a first solid state disk; the PMON module is in communication connection with the Loongson processor through an SPI interface; the first solid state disk is in communication connection with the Loongson processor through an NVME protocol; the system is configured to perform a method of improving the operational efficiency of a Loongson platform system disk as set forth in any one of claims 1-9.
CN202310221412.7A 2023-03-09 2023-03-09 Method and system for improving operation efficiency of Loongson platform system disk Active CN115951942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310221412.7A CN115951942B (en) 2023-03-09 2023-03-09 Method and system for improving operation efficiency of Loongson platform system disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310221412.7A CN115951942B (en) 2023-03-09 2023-03-09 Method and system for improving operation efficiency of Loongson platform system disk

Publications (2)

Publication Number Publication Date
CN115951942A CN115951942A (en) 2023-04-11
CN115951942B true CN115951942B (en) 2023-05-12

Family

ID=85891336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310221412.7A Active CN115951942B (en) 2023-03-09 2023-03-09 Method and system for improving operation efficiency of Loongson platform system disk

Country Status (1)

Country Link
CN (1) CN115951942B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625645A (en) * 2009-08-11 2010-01-13 成都市华为赛门铁克科技有限公司 Solid state disk, BIOS device, and method and equipment for booting operating system
CN110399168A (en) * 2019-07-12 2019-11-01 苏州浪潮智能科技有限公司 Majority according to disk storage server system start method, device and equipment
CN111813599A (en) * 2020-06-28 2020-10-23 中国长城科技集团股份有限公司 Solid-state storage device, server mainboard and control method
CN115454902A (en) * 2022-08-02 2022-12-09 天津光电聚能专用通信设备有限公司 NVME communication system and method based on PCIE interface

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429677B2 (en) * 2007-04-19 2013-04-23 Microsoft Corporation Composite solid state drive identification and optimization technologies
US10866737B2 (en) * 2015-09-17 2020-12-15 Intel Corporation Apparatus, method and system to store information for a solid state drive

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625645A (en) * 2009-08-11 2010-01-13 成都市华为赛门铁克科技有限公司 Solid state disk, BIOS device, and method and equipment for booting operating system
CN110399168A (en) * 2019-07-12 2019-11-01 苏州浪潮智能科技有限公司 Majority according to disk storage server system start method, device and equipment
CN111813599A (en) * 2020-06-28 2020-10-23 中国长城科技集团股份有限公司 Solid-state storage device, server mainboard and control method
CN115454902A (en) * 2022-08-02 2022-12-09 天津光电聚能专用通信设备有限公司 NVME communication system and method based on PCIE interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
VxWorks6.8操作系统下NVMe驱动设计;盘勇军 等;航空电子技术(04);全文 *

Also Published As

Publication number Publication date
CN115951942A (en) 2023-04-11

Similar Documents

Publication Publication Date Title
EP2926239B1 (en) Bootability with multiple logical unit numbers
US9778844B2 (en) Installation of operating system on host computer using virtual storage of BMC
US8171502B2 (en) Methods, devices and computer program products for automatically installing device drivers from a peripheral device onto a host computer
US8799521B2 (en) System and method for receiving control commands at a peripheral device
CN106293832B (en) SOC chip boot starting method and system
US8296521B2 (en) Method of configuring non-volatile memory for a hybrid disk drive
US9239725B2 (en) System and method for installing an OS via a network card supporting PXE
US20070168652A1 (en) Method for booting a host device from an MMC/SD device, a host device bootable from an MMC/SD device and an MMC/SD device method a host device may booted from
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
US8677084B2 (en) Method of configuring non-volatile memory for a hybrid disk drive
US7793004B2 (en) Computer peripheral device implemented as optic storage device or/and removable disk by software emulation and implementing method thereof
CN111176739A (en) System starting method, device, equipment and storage medium
US10691569B2 (en) System and method for testing a data storage device
CN113254380B (en) Communication method, device and equipment between host and baseboard management controller
EP2372565A1 (en) Method for managing USB devices
CN115951942B (en) Method and system for improving operation efficiency of Loongson platform system disk
CN110825421A (en) Firmware upgrading method and system and readable storage medium
CN115437668A (en) Development and design method and system for tool for batch production of SSD
US20210232405A1 (en) Circuit and register to prevent executable code access
CN114510751A (en) Hardware replacement prevention device and method based on processor security kernel
US10761834B2 (en) SSD firmware download dual boot
CN114527994A (en) Firmware programming method and system and vehicle control system
CN104679545A (en) Device and device starting method
WO2022064994A1 (en) Storage activation method
TW201137750A (en) Fast booting device and method

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
GR01 Patent grant
GR01 Patent grant