WO2020062931A1 - 一种配置数据的方法以及计算设备 - Google Patents

一种配置数据的方法以及计算设备 Download PDF

Info

Publication number
WO2020062931A1
WO2020062931A1 PCT/CN2019/090897 CN2019090897W WO2020062931A1 WO 2020062931 A1 WO2020062931 A1 WO 2020062931A1 CN 2019090897 W CN2019090897 W CN 2019090897W WO 2020062931 A1 WO2020062931 A1 WO 2020062931A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration data
field
identifier
target
storage area
Prior art date
Application number
PCT/CN2019/090897
Other languages
English (en)
French (fr)
Inventor
聂海
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020062931A1 publication Critical patent/WO2020062931A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Definitions

  • the present application relates to the field of computers, and in particular, to a method for configuring data and a computing device.
  • PCIe Peripheral component interconnect standard
  • the PCIe retimer can effectively reduce signal jitter, compensate and equalize the signal, thereby ensuring that the signal reaches the endpoint intact.
  • the PCIe retimer is referred to as an extended bus retimer below.
  • Step 1 The management controller writes the new configuration data into the memory from the address 0 through the extended bus retimer.
  • Step 2 The management controller writes a new check field to the end of the new configuration data through the extended bus retimer;
  • Step 3 The management controller resets the extended bus retimer.
  • Step 4 The extended bus retimer loads the new configuration data, and then starts to work according to the new configuration data.
  • step 1 and step 2 if a system exception (such as restart or power off) causes the process to be interrupted, the new configuration data is not written, and the integrity of the original configuration data is destroyed. In this way, the retimer cannot be started normally.
  • a system exception such as restart or power off
  • the present application provides a method for configuring data, which can effectively ensure that the extended bus retimer works normally, and improves the robustness of the extended bus retimer.
  • a first aspect provides a method for configuring data, including: obtaining first configuration data; writing the first configuration data in a storage area after a storage area of a first check field, and the storage area of the first check field is located in an original After configuring the storage area of the data, the first check field is used to check the original configuration data; the identifier of the first check field in the first check field is modified to the target ID to obtain the target field; the re-timing of the expansion bus is received After the reset instruction of the controller, the original configuration data, the target field, and the first configuration data are sequentially read; and the extended bus retimer is configured according to the first configuration data.
  • the extension bus retimer when the configuration data is updated, the original configuration data is not destroyed.
  • the extension bus retimer After the extension bus retimer is reset, when the identifier of the first check field is detected, the extension bus retimer is configured according to the original configuration data; after the target identifier is read, the extension bus retimer is configured according to the first configuration data This can ensure that the extended bus retimer works normally, and improves the robustness of the extended bus retimer.
  • the above method before writing the first configuration data in a storage area after the storage area of the first check field, the above method further includes: writing a filling field in the filling area, where the filling area is in the first A storage area between the end address of the check field and the start address of the first configuration data.
  • the original configuration data, the target field, and the padding field are decomposed to obtain a checksum of all data items as 0. Since the original configuration data, target field, and padding field are decomposed to obtain a checksum of all data items, the original configuration data, target field, padding field, and first configuration data are decomposed after the first configuration data is written.
  • the checksum of all data items is equal to the checksum of all data items obtained by decomposing the first configuration data. This can determine whether the first configuration data is correct.
  • the original configuration data includes multiple sequences of the same length, and the sum of the length of the first check field and the length of the padding field is equal to the length of one sequence.
  • the above method further includes: reading a filled field.
  • the target identifier is a configuration data identifier or an identifier that fills a field.
  • the method further includes: writing a second verification field after the storage area of the first configuration data, and the second verification field is used to verify the first configuration data.
  • the value of the check data in the second check field is equal to the checksum of all data items obtained by decomposing the first data to be checked.
  • the first data to be verified includes original configuration data, a target field, and first configuration data.
  • the first to-be-verified data includes original configuration data, a target field, a padding field, and first configuration data.
  • the above method further includes: obtaining the second configuration data; modifying the target identifier to the identifier of the first check field to obtain the first A check field; write the second configuration data in the storage area after the storage area of the first check field; modify the ID of the first check field to the target ID to obtain the target field; receive the extended bus retimer
  • the original configuration data, the target field, and the second configuration data are sequentially read; and the extended bus retimer is configured according to the second configuration data.
  • the configuration data is updated, the original configuration data is not destroyed. Therefore, a method for updating the configuration data without destroying the original configuration data is provided, which can ensure that the extended bus retimer works normally, and improves the robustness of the extended bus retimer.
  • the target identifier is found according to the identifier of the filled field.
  • the target identifier is a configuration data identifier. Because the target identifier is a configuration data identifier and the sequences in the original configuration data all include the configuration data identifier, it is difficult for the extended bus retimer to quickly determine the target field. First find the ID of the filled field, and then determine that the field of the specified length before the filled field is recorded as the target field, and the ID it includes is the target ID. This provides a method for quickly finding the target identifier.
  • the foregoing method further includes: writing a third verification field after the storage area of the second configuration data, and the third verification field is used to verify the second configuration data.
  • the value of the check data in the third check field is equal to the checksum of all data items obtained by decomposing the second data to be checked.
  • the second to-be-verified data includes original configuration data, a target field, and second configuration data.
  • the second to-be-verified data includes original configuration data, a target field, a padding field, and second configuration data.
  • a second aspect provides a computing device including a management controller, an extended bus retimer, and a memory.
  • the memory is used to store programs and data.
  • the management controller executes the program to implement the method of configuring data in the first aspect.
  • the data stored in the memory includes, but is not limited to, original configuration data, a first check field, a target field, and a first configuration. data.
  • a computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the methods of the foregoing aspects.
  • a fourth aspect provides a computer program product containing instructions that, when run on a computer, causes the computer to perform the methods of the above aspects.
  • FIG. 1 is a schematic diagram of a computing device in the prior art
  • FIG. 2 is a schematic diagram of a storage area of configuration data and a storage area of a check field in the present application
  • FIG. 3 is a flowchart of a method for configuring data in this application
  • 4A is a schematic diagram of storing original configuration data in a storage area in this application.
  • 4B is a schematic diagram of storing original configuration data and first configuration data in a storage area in the present application
  • 4C is another schematic diagram of storing original configuration data and first configuration data in a storage area in the present application.
  • 6A is another schematic diagram of storing original configuration data and second configuration data in a storage area in the present application.
  • 6B is another schematic diagram of storing original configuration data and second configuration data in a storage area in the present application.
  • FIG. 7 is a schematic diagram of a computing device in this application.
  • the computing device shown in FIG. 1 includes a processor, a root complex, an extended bus retimer, and an endpoint.
  • the high-speed signal sent by the processor reaches the endpoint through the root complex and the extended bus retimer.
  • An endpoint is a device used to receive signals. Because configuration data is closely related to link length, total topology, etc., the extended bus retimer also provides a management interface for configuration data upgrades and updates.
  • the configuration process of the extended bus retimer is roughly as follows: before the extended bus retimer needs to initialize various parameters, such as mode, clock, and rate.
  • the configuration data is stored in the memory.
  • the expansion bus retimer starts, it can automatically read the configuration data from the memory and complete the initialization.
  • the storage area of the memory is divided into a configuration data area (configuration data area) and a verification field area (validation data area), and the addresses of the two areas are adjacent.
  • the starting address of the storage area can be 0x0000.
  • the configuration data area consists of multiple initialization sequences of a specified length. These sequences begin with a configuration data identifier to indicate that subsequent data is used for initialization.
  • the check field starts with a check mark and indicates the end of the configuration data. The check data is used to check the integrity of the configuration data.
  • the configuration data identifier is also recorded as Type1 or T1, and the check identifier is also recorded as Type2 or T2.
  • the configuration data is read from the memory device 0 address. If the read sequence is an initialization sequence, the internal register is initialized using the initialization sequence; if it is a check field, the initialization is stopped and an integrity check is performed for the previous initialization sequence. If the verification is successful, the extended bus re-timer enters the normal working mode; if the verification fails, the extended bus re-timer stops working.
  • the check of the extended bus retimer adopts the checksum detection method, that is, all data in the configuration data area and the check field area are added by 8-bit addition one by one. If the extension bus retimer uses a one's complement checksum, the data is complete when the final result is 0xFF; if the device uses a two's complement checksum, the final result is 0x00 to indicate the data is complete.
  • this application provides a method that can normally enable the extended bus retimer in the event of an abnormality.
  • an embodiment of a method for providing configuration data in this application includes:
  • Step 301 Obtain first configuration data.
  • the first configuration data is configuration data used for updating.
  • Step 302 Write the first configuration data in a storage area after the storage area of the first check field.
  • the storage area of the first check field is located behind the storage area of the original configuration data, and the first check field is used to check the original configuration data.
  • the storage area of the first check field is located behind and adjacent to the storage area of the original configuration data.
  • Step 303 Modify the identifier of the first check field in the first check field to the target ID to obtain the target field.
  • the operation of reading configuration data is ended according to the identifier of the check field.
  • the target identifier is used for the extended bus retimer to continue reading the first configuration data after reading the original configuration data and the target field.
  • the operation of modifying the identifier of the first check field to the target identifier may be considered as an atomic operation. Since the time required to perform an atomic operation is extremely short, the probability of anomalies occurring during this period is extremely small.
  • Step 304 After receiving the reset instruction for the extended bus retimer, read the original configuration data, the target field, and the first configuration data in order.
  • the memory After performing steps 301 to 303, the memory stores the original configuration data, the target field, and the first configuration data.
  • the extended bus retimer When the extended bus retimer is reset, the extended bus retimer sequentially reads the original configuration data, the target field, and the first configuration data from the memory.
  • Step 305 Configure the extended bus retimer according to the first configuration data.
  • the extended bus retimer After the extended bus retimer reads the original configuration data, the target field, and the first configuration data in order from the memory, the extended bus retimer is configured according to the first configuration data. Because the first check field is modified to the target field, when the extended bus retimer reads the target field, the read operation will not stop and the first configuration data will continue to be read.
  • the extended bus retimer sequentially reads the original configuration data from the memory, and configures the extended bus retimer according to the original configuration data; then reads the target field and ignores the target field; and then reads the first configuration data according to the first A configuration data configures the extended bus retimer so that the first configuration data replaces the original configuration data.
  • the expansion bus retimer directly reads configuration data from the memory and initializes the configuration data according to the configuration data, without going through the management controller.
  • the extension bus retimer when the configuration data is updated, the original configuration data is not destroyed.
  • the extension bus retimer After the extension bus retimer is reset, when the identifier of the first check field is detected, the extension bus retimer is configured according to the original configuration data; after the target identifier is read, the extension bus retimer is configured according to the first configuration data This can ensure that the extended bus retimer works normally, and improves the robustness of the extended bus retimer.
  • an end condition needs to be set so that the extended bus retimer can end the reading process after reading the first configuration data. The following describes how to set the end condition:
  • the method further includes: writing a second verification field after the storage area of the first configuration data, and the second verification field is used to verify the first configuration data.
  • the second check field also includes a check ID.
  • the extended bus retimer reads the check ID of the second check field, the configuration data after the second check field is no longer read.
  • the two check fields are not only used to check the first configuration data, but also used as an end condition for reading the first configuration data. It should be noted that when no data is read in the storage area after the first configuration data, the extended bus re-timer may also stop reading data. For example, when the data stored in the storage area is 0xFFFF, it means that no data is stored.
  • the extended bus re-timer reads the check identifier of the second check field
  • the data before the second check field is checked, and when the check sum meets the conditions, it is determined that the configuration data is correct.
  • the original configuration data, the target field, and the first configuration data are respectively divided into multiple data items according to N bytes, and then a checksum of the multiple data items is calculated, where N is a positive integer.
  • the checksum of all data items obtained by decomposing the original configuration data and the target field is 0. It should be noted that, in addition to dividing the data of the storage area according to N bytes, the above-mentioned data may also be divided by using smaller granularity bits, such as 2 bits or 4 bits, which is not limited here. .
  • this application also provides a way to enable the extended bus retimer to verify the first configuration data according to the second check field, which is described in detail below:
  • the above method before writing the first configuration data in a storage area after the storage area of the first check field, the above method further includes: writing a fill field in the fill area, where the fill area is in the first A storage area between the end address of the check field and the start address of the first configuration data.
  • the original configuration data, the target field, and the padding field are decomposed to obtain a checksum of all data items as 0.
  • the value of the fill field can be set according to the value of the original configuration data and the target field, so that the checksum of all data items obtained by decomposing the original configuration data, the target field, and the fill field is 0.
  • the padding field may include an identification of the padding field.
  • the target identifier in the target field is a configuration data identifier or an identifier of a filling field.
  • the original configuration data includes multiple sequences of the same length, and the sum of the length of the first check field and the length of the padding field is equal to the length of one sequence.
  • the above method further includes: reading a filled field. After the expansion bus retimer reads the identifier of the filled field, it will continue to read the first configuration data after the filled field.
  • the storage area of the extended bus retimer includes, but is not limited to, a storage area 401 for storing the original configuration data, and A storage area 402 of the first check field and a storage area 403 in which no data is written.
  • the identifier of the first check field is marked as T2.
  • the storage area 403 is divided into storage areas.
  • the ID of the filled field is marked as T3.
  • the identifier of the first check field (ie, T2) is modified to the configuration data identifier (ie, T1).
  • the data stored in the storage area 402 is modified from the first check field to the target field.
  • the original configuration data, the target field, and the fill field satisfy the following conditions: the checksum of all data items obtained by decomposing the original configuration data, the target field, and the fill field is 0.
  • the extension bus retimer After the expansion bus retimer is reset, the original configuration data, the target field, the padding field, the first configuration data, and the second check field are sequentially read from the starting position. After reading the second check field, the original configuration data, the target field, the padding field, and the first configuration data are decomposed into multiple data items, and then the integrity of the first configuration data is judged based on the checksums of the multiple data items And correctness.
  • the extension bus retimer is initialized and configured using the first configuration data; when the verification fails, the extension bus retimer stops working or re-executes the configuration data method shown in FIG. 3.
  • the checksums of all data items obtained by decomposing the original configuration data, target field, and padding field are 0, the checksums of all data items obtained by decomposing the original configuration data, target field, padding field, and first configuration data are The checksums of the plurality of data items obtained by decomposing the first configuration data are the same.
  • the storage area 401 and the storage area 4031 store the original configuration data and the first configuration data, respectively.
  • the configuration data may be updated multiple times in the subsequent process. The method of updating the configuration data and the method of the configuration data are described in detail below:
  • FIG. 5 another embodiment of a method for configuring data provided in this application includes:
  • Step 501 Obtain second configuration data.
  • the second configuration data is configuration data used for updating after the first configuration data and the original configuration data are written into the memory. After the original configuration data and the first configuration data are stored in the memory, the management controller may obtain the second configuration data to replace the first configuration data.
  • Step 502 Modify the target identifier to the identifier of the first check field to obtain the first check field.
  • the management controller modifies the target identifier in the memory and changes it to the identifier of the first check field.
  • the target field is modified into the first check field.
  • Step 503 Write the second configuration data in a storage area following the storage area of the first check field.
  • the second configuration data is written directly after the storage area of the first check field and adjacent storage areas.
  • the second configuration data is written after the padding area.
  • Step 504 Modify the identifier of the first check field to the target identifier to obtain the target field.
  • the management controller modifies the identifier of the first check field in the memory, and changes it to the target identifier.
  • the first check field is modified into the target field.
  • steps 502 and 504 can be considered as an atomic operation. Since the time required to perform an atomic operation is extremely short, the probability of anomalies occurring during this period is extremely small.
  • Step 505 After receiving the reset instruction for the extended bus retimer, read the original configuration data, the target field, and the second configuration data in order.
  • Step 506 Configure the extended bus retimer according to the second configuration data.
  • the extended bus retimer sequentially reads the original configuration data from the memory and configures the extended bus retimer according to the original configuration data; then reads the target field and ignores the target field; and then reads the second configuration data according to the first
  • the second configuration data configures the extended bus retimer so that the second configuration data replaces the original configuration data.
  • the extension bus retimer when the configuration data is updated, the original configuration data is not destroyed.
  • the extension bus retimer After the extension bus retimer is reset, when the identifier of the first check field is detected, the extension bus retimer is configured according to the original configuration data; after the target identifier is read, the extension bus retimer is configured according to the second configuration data This can ensure that the extended bus retimer works normally, and improves the robustness of the extended bus retimer.
  • the storage area after the storage area of the first check field includes a fill area, and the fill area is after and adjacent to the storage area of the first check field;
  • Step 503 includes: writing the second configuration data in a storage area after filling the area.
  • Step 505 includes: after receiving the reset instruction for the extended bus retimer, reading the original configuration data, the target field, the padding field, and the second configuration data in order.
  • the padding area is used to store a padding field.
  • the padding area and the padding field refer to related descriptions in the foregoing embodiments.
  • the target identifier is a configuration data identifier
  • the above method further includes: when the identifier of the filled field is detected, searching for the target identifier according to the identifier of the filled field.
  • the target identifier is a configuration data identifier and the sequences in the original configuration data all include the configuration data identifier, it is difficult for the extended bus retimer to quickly determine the target field. First find the ID of the filled field, and then determine that the field of the specified length before the filled field is recorded as the target field, and the ID it includes is the target ID. This provides a method for quickly finding the target identifier.
  • a third verification field is written after the storage area of the second configuration data, and the third verification field is used to verify the second configuration data.
  • the extended bus retimer reads the third check field, the configuration data after the third check field is no longer read.
  • the extended bus retimer reads the check mark of the third check field, the data before the third check field is checked, and when the check sum meets the conditions, it is determined that the configuration data is correct.
  • the specific verification process is similar to the method for performing verification according to the second verification field in the foregoing embodiment.
  • the storage area 401 stores the original configuration data
  • the storage area 402 stores the target field
  • the identifier of the target field is the configuration data identifier (ie, T1).
  • the storage area 4032 stores a padding field, and the identifier of the padding field is T3.
  • the storage area 4031 stores first configuration data.
  • the storage area 4033 stores a second check field, and the identifier of the second check field is T2.
  • the target identifier (that is, T1) is modified to the identifier of the first check field (T2), and then the second configuration data is written in the storage area 601, and then the third school is written in the storage area 602 Field.
  • the storage area 601 is the storage area 4031.
  • the storage area of the second check field is the same as the storage area of the third check field, the storage area 602 is the storage area 4032.
  • the extended bus re-timer may perform initial configuration according to the identifier of the first check field (ie, T2) and the original configuration data.
  • the identifier of the first check field (ie, T2) in the storage area 402 is modified to the configuration data identifier (ie, T1).
  • the extended bus retimer can continue to read the padding field, the second configuration data, and the third check field, and then perform initial configuration according to the second configuration data.
  • the present application provides a computing device 700 capable of the foregoing configuration data method.
  • An embodiment of the computing device 700 includes a management controller 701, an extended bus retimer 702, and a memory 703; the extended bus retimer 702 is connected to the management controller 701 and the memory 703, respectively;
  • the management controller 701 is further configured to write the first configuration data in a storage area after the storage area of the first check field, where the storage area of the first check field is located after the storage area of the original configuration data, and the first check Fields are used to verify the original configuration data;
  • the management controller 701 is further configured to modify the identifier of the first check field in the first check field to a target ID to obtain a target field;
  • the extended bus retimer 702 is configured to sequentially read the original configuration data, the target field, and the first configuration data after receiving the reset instruction;
  • the extended bus retimer 702 is further configured to configure the extended bus retimer according to the first configuration data
  • the memory 703 is configured to store the original configuration data, the first check field, the target field, and the first configuration data.
  • the management controller 701 may be a general-purpose processor, including a central processing unit (CPU) or a single-chip microcomputer; it may also be a digital signal processor (DSP), an application-specific integrated circuit (application specific integrated circuit, ASIC), field-programmable gate array (FPGA), or other programmable logic devices.
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • the memory 703 includes a non-volatile memory (NVM).
  • NVM non-volatile memory
  • Non-volatile memory can include flash memory, electrically erasable programmable read-only memory (EEPROM), hard disk drive (HDD), solid state hard drives (solid state drives) (SSD), silicon disk drive (SDD), read-only memory (ROM), compact disc (read-only memory, CD-ROM), magnetic tape, floppy disk, optical data storage At least one of the devices.
  • the non-volatile memory is used to store configuration data, check fields, padding fields, and the like.
  • the configuration data includes, but is not limited to, original configuration data, first configuration data, and second configuration data.
  • the check field includes, but is not limited to, a first check field, a second check field, and a third check field.
  • the memory 703 further includes a random access memory (RAM).
  • the memory 703 is further configured to store a program.
  • the management controller 701 executes the program stored in the memory 703 to implement steps 301 to 303 in the method of configuring data shown in FIG. 3 or steps 501 to 501 in the method of configuring data shown in FIG. 5. Step 504.
  • the management controller 701 is further configured to write a padding field in the padding area.
  • the padding area is a storage area between an end address of the first check field and a start address of the first configuration data, and the original configuration data, the target The checksum of all data items obtained by decomposing the fields and padding fields is 0.
  • the original configuration data includes multiple sequences of the same length, and the sum of the length of the first check field and the length of the padding field is equal to the length of one sequence.
  • the extended bus re-timer 702 is further configured to read the padding field after sequentially reading the original configuration data and the target field and before reading the first configuration data.
  • the target identifier is a configuration data identifier or an identifier of a filling field.
  • the management controller 701 is further configured to write a second verification field after the storage area of the first configuration data, and the second verification field is used to verify the first configuration data.
  • management controller 701 is further configured to perform the following operations after configuring the extended bus retimer according to the first configuration data:
  • the original configuration data, the target field, and the second configuration data are sequentially read;
  • the extended bus retimer 702 is configured according to the second configuration data.
  • the management controller 701 is further configured to: before modifying the target identifier to the identifier of the first check field, when the target identifier is the configuration data identifier and the identifier of the filling field is detected, The ID of the field to find the target ID.
  • the management controller 701 is further configured to write a third verification field after the storage area of the second configuration data, and the third verification field is used to verify the second configuration data.
  • the present application provides a computer-readable storage medium including instructions that, when run on a computer, cause the computer to execute the method described in any one of the above embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server, or data center Transmission by wire (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center.
  • wire for example, coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless for example, infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, a data center, and the like that includes one or more available medium integration.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

一种配置数据的方法,包括:获取第一配置数据;在第一校验字段的存储区域之后的存储区域中写入第一配置数据,第一校验字段的存储区域位于原始配置数据的存储区域之后,第一校验字段用于校验原始配置数据;将第一校验字段中第一校验字段的标识修改为目标标识,得到目标字段;收到对扩展总线重定时器的复位指令之后,依次读取原始配置数据、目标字段和第一配置数据;根据第一配置数据配置扩展总线重定时器。这样能够保证扩展总线重定时器正常工作,提高了扩展总线重定时器的鲁棒性。本申请还提供一种能够实现上述方法的计算设备。

Description

一种配置数据的方法以及计算设备 技术领域
本申请涉及计算机领域,尤其涉及一种配置数据的方法以及计算设备。
背景技术
快捷外设互联标准(peripheral component interconnect express,PCIe)是一种高速串行计算机扩展总线标准。处理器发送的高速信号在PCIe总线上传输时,可能由于传输距离、布线等因素衰减、恶化而无法使用。PCIe重定时器可以有效减少信号抖动,对信号进行补偿和均衡,从而保证信号完整到达端点。为了便于描述,下面将PCIe重定时器称为扩展总线重定时器。
现有技术中,将扩展总线重定时器的配置数据更新的过程大致如下:
步骤1、管理控制器通过扩展总线重定时器将新配置数据从0地址开始写入存储器中;
步骤2、管理控制器通过扩展总线重定时器将新的校验字段写到新配置数据的结尾;
步骤3、管理控制器复位扩展总线重定时器;
步骤4、扩展总线重定时器载入新配置数据,然后按照新配置数据开始工作。
但是,在更新配置数据过程中,在执行步骤1和步骤2的过程中,如果出现系统异常(如重启或下电)导致流程中断,新配置数据没有写完,原配置数据完整性被破坏。这样重定时器无法正常开启。
发明内容
有鉴于此,本申请提供一种配置数据的方法,能够有效保证扩展总线重定时器正常工作,提高了扩展总线重定时器的鲁棒性。
第一方面提供一种配置数据的方法,包括:获取第一配置数据;在第一校验字段的存储区域之后的存储区域中写入第一配置数据,第一校验字段的存储区域位于原始配置数据的存储区域之后,第一校验字段用于校验原始配置数据;将第一校验字段中第一校验字段的标识修改为目标标识,得到目标字段;收到对扩展总线重定时器的复位指令之后,依次读取原始配置数据、目标字段和第一配置数据;根据第一配置数据配置扩展总线重定时器。
依此实施,在更新配置数据时,不破坏原始配置数据。在扩展总线重定时器复位之后,当检测到第一校验字段的标识时,根据原始配置数据配置扩展总线重定时器;当读取目标标识之后,根据第一配置数据配置扩展总线重定时器,由此能够保证扩展总线重定时器正常工作,提高了扩展总线重定时器的鲁棒性。
在一种可能的实现方式中,在第一校验字段的存储区域之后的存储区域中写入第一配置数据之前,上述方法还包括:在填充区域中写入填充字段,填充区域为在第一校验字段的结束地址和第一配置数据的起始地址之间的存储区域,将原始配置数据、目标字段以及填充字段分解得到所有数据项的校验和为0。由于将原始配置数据、目标字段以及填充字段分解得到所有数据项的校验和为0,因此在写入第一配置数据之后,将原始配置 数据、目标字段、填充字段和第一配置数据分解得到所有数据项的校验和等于将第一配置数据分解得到的所有数据项的校验和。由此可以判断第一配置数据是否正确。
在另一种可能的实现方式中,原始配置数据包括多个相同长度的序列,第一校验字段的长度与填充字段的长度之和等于一个序列的长度。
在另一种可能的实现方式中,在依次读取原始配置数据、目标字段之后,且在读取第一配置数据之前,上述方法还包括:读取填充字段。
在另一种可能的实现方式中,目标标识为配置数据标识或填充字段的标识。
在另一种可能的实现方式中,上述方法还包括:在第一配置数据的存储区域之后写入第二校验字段,第二校验字段用于校验第一配置数据。第二校验字段中的校验数据的取值等于将第一待校验数据分解得到所有数据项的校验和。第一待校验数据包括原始配置数据、目标字段和第一配置数据。或者,第一待校验数据包括原始配置数据、目标字段、填充字段和第一配置数据。
在另一种可能的实现方式中,在根据第一配置数据配置扩展总线重定时器之后,上述方法还包括:获取第二配置数据;将目标标识修改为第一校验字段的标识,得到第一校验字段;在第一校验字段的存储区域之后的存储区域写入第二配置数据;将第一校验字段的标识修改为目标标识,得到目标字段;收到对扩展总线重定时器的复位指令之后,依次读取原始配置数据、目标字段和第二配置数据;根据第二配置数据配置扩展总线重定时器。这样,在更新配置数据时,不破坏原始配置数据。由此提供了一种更新配置数据且不破坏原始配置数据的方法,能够保证扩展总线重定时器正常工作,提高了扩展总线重定时器的鲁棒性。
在另一种可能的实现方式中,在将目标标识修改为第一校验字段的标识之前,当检测到填充字段的标识时,根据填充字段的标识查找目标标识。其中,目标标识为配置数据标识。由于目标标识为配置数据标识,并且原始配置数据中的序列均包括配置数据标识,因此扩展总线重定时器难以迅速确定目标字段。首先查找到填充字段的标识,然后确定在填充字段之前的指定长度的字段记为目标字段,其包括的标识即为目标标识。由此提供了一种快速查找目标标识的方法。
在另一种可能的实现方式中,上述方法还包括:在第二配置数据的存储区域之后写入第三校验字段,第三校验字段用于校验第二配置数据。第三校验字段中的校验数据的取值等于将第二待校验数据分解得到所有数据项的校验和。第二待校验数据包括原始配置数据、目标字段和第二配置数据。或者,第二待校验数据包括原始配置数据、目标字段、填充字段和第二配置数据。
第二方面提供一种计算设备,包括管理控制器、扩展总线重定时器和存储器。存储器用于存储程序和数据,管理控制器通过执行程序用于实现第一方面中配置数据的方法,存储器存储的数据包括但不限于原始配置数据、第一校验字段、目标字段和第一配置数据。
第三方面提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面的方法。
第四方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面的方法。
附图说明
图1为现有技术中计算设备的一个示意图;
图2为本申请中配置数据的存储区域和校验字段的存储区域的一个示意图;
图3为本申请中配置数据的方法的一个流程图;
图4A为本申请中在存储区域中存储原始配置数据的一个示意图;
图4B为本申请中在存储区域中存储原始配置数据和第一配置数据的一个示意图;
图4C为本申请中在存储区域中存储原始配置数据和第一配置数据的另一个示意图;
图5为本申请中配置数据的方法的另一个流程图;
图6A为本申请中在存储区域中存储原始配置数据和第二配置数据的另一个示意图;
图6B为本申请中在存储区域中存储原始配置数据和第二配置数据的另一个示意图;
图7为本申请中计算设备的一个示意图。
具体实施方式
在图1所示的计算设备包括:处理器、根复合体、扩展总线重定时器和端点。处理器发送的高速信号经过根复合体、扩展总线重定时器到达端点。端点是指用于接收信号的器件。由于配置数据和链路长度、总数拓扑等密切相关,因此扩展总线重定时器还提供管理接口,用于配置数据升级、更新。
扩展总线重定时器的配置过程大致如下:扩展总线重定时器在正常工作前需要初始化各种参数,如模式、时钟、速率等。配置数据存储在存储器中,扩展总线重定时器在启动时可以自动从存储器中读取配置数据,完成初始化。
参阅图2,存储器的存储区域分为配置数据区域(configuration data area)和校验字段区域(validation data area),两个区域地址相邻。存储区域的起始地址可以为0x0000。配置数据区域由多个指定长度的初始化序列组成,这些序列以配置数据标识开头,以表示后续数据用于初始化。校验字段由校验标识开头,用于表示配置数据结束,校验数据用于配置数据的完整性校验。配置数据标识也记为Type1或T1,校验标识也记为Type2或T2。
扩展总线重定时器在复位完成后,从存储器件0地址开始读取配置数据。如果读到的是初始化序列,则使用初始化序列初始化内部寄存器;如果是校验字段,则停止初始化,并为先前的初始化序列进行完整性校验。如果校验成功,则扩展总线重定时器转入正常工作模式;如果校验失败,则扩展总线重定时器停止工作。
扩展总线重定时器的校验采用校验和检测方式,即将配置数据区域和校验字段区域的所有数据按字节逐个用8bit加法相加。如果扩展总线重定时器采用一的补数校验和,则最终结果为0xFF时表示数据完整;如果器件采用二的补数校验和,则最终结果是0x00表示数据完整。
为了解决更新配置数据异常导致扩展总线重定时器无法正常工作的问题,本申请提供能够一种能够在发生异常的情况下正常开启扩展总线重定时器的方法,详见以下介绍:
参阅图3,本申请提供配置数据的方法的一个实施例包括:
步骤301、获取第一配置数据。
本实施例中,第一配置数据为用于更新的配置数据。
步骤302、在第一校验字段的存储区域之后的存储区域中写入第一配置数据。
其中,第一校验字段的存储区域位于原始配置数据的存储区域之后,第一校验字段用于校验原始配置数据。可选的,第一校验字段的存储区域位于原始配置数据的存储区域之后且相邻。
步骤303、将第一校验字段中第一校验字段的标识修改为目标标识,得到目标字段。
当扩展总线重定时器读取到校验字段的标识之后,会根据校验字段的标识结束读取配置数据的操作。目标标识用于扩展总线重定时器在读取原始配置数据和目标字段之后继续读取第一配置数据。可选的,当用一个字节大小的存储区域存储目标标识或第一校验字段的标识时,将第一校验字段的标识修改为目标标识的操作可以认为是一个原子操作。由于执行原子操作的时间极短,因此在此期间发生异常的概率极小。
步骤304、收到对扩展总线重定时器的复位指令之后,依次读取原始配置数据、目标字段和第一配置数据。
执行步骤301至步骤303之后,存储器存储有原始配置数据、目标字段和第一配置数据。当扩展总线重定时器复位时,扩展总线重定时器依次从存储器读取原始配置数据、目标字段和第一配置数据。
步骤305、根据第一配置数据配置扩展总线重定时器。
具体的,扩展总线重定时器从存储器中依次读取原始配置数据、目标字段和第一配置数据之后;根据第一配置数据配置扩展总线重定时器。由于将第一校验字段修改为目标字段,扩展总线重定时器读取目标字段时,不会停止读取操作,继续读取第一配置数据。可选的,扩展总线重定时器从存储器中依次读取原始配置数据,根据原始配置数据配置扩展总线重定时器;再读取目标字段,忽略目标字段;然后读取第一配置数据,根据第一配置数据配置扩展总线重定时器,以使得第一配置数据替换了原始配置数据。
在写入第一配置数据的过程中发生异常(例如掉电或重启),扩展总线重定时器收到复位指令之后,可以从存储器的配置数据区域中依次读取原始配置数据和第一校验字段,可以根据原始配置数据配置扩展总线重定时器,使其正常工作。
需要说明的是,步骤304和步骤305是由扩展总线重定时器直接从存储器中读取配置数据并根据配置数据进行初始化,不经过管理控制器。
本实施例中,在更新配置数据时,不破坏原始配置数据。在扩展总线重定时器复位之后,当检测到第一校验字段的标识时,根据原始配置数据配置扩展总线重定时器;当读取目标标识后,根据第一配置数据配置扩展总线重定时器,由此能够保证扩展总线重定时器正常工作,提高了扩展总线重定时器的鲁棒性。
需要说明的是,在写入第一配置数据之后,需要设置结束条件以使得扩展总线重定时器能够在读取第一配置数据之后结束读取流程。下面对设置结束条件的方法进行介绍:
在一个可选实施例中,上述方法还包括:在第一配置数据的存储区域之后写入第二校验字段,第二校验字段用于校验第一配置数据。
具体的,第二校验字段也包括校验标识,当扩展总线重定时器读取第二校验字段的校验标识时,不再读取在第二校验字段之后的配置数据,因此第二校验字段不仅用于校验第一配置数据,还用于作为读取第一配置数据的结束条件。需要说明的是,在第一配置数据之后的存储区域没有读取到数据时,扩展总线重定时器也可以停止继续读取数据。 例如,存储区域存储的数据为0xFFFF时,表示没有存储数据。
当扩展总线重定时器读取第二校验字段的校验标识时,对在第二校验字段之前的数据进行校验,当校验和满足条件时,确定配置数据正确无误。具体的,将原始配置数据、目标字段和第一配置数据分别按照N个字节划分为多个数据项,然后计算多个数据项的校验和,N为正整数。其中,将原始配置数据和目标字段分解得到所有数据项的校验和为0。需要说明的是,除了按照N个字节对存储区域的数据进行划分之外,还可以采用更小粒度的比特来划分上述数据,例如2个比特或者4个比特(bit),此处不作限定。
当目标标识大于或等于N个字节时,通过设置目标标识的值,可以使得将原始配置数据和目标字段分解得到所有数据项的校验和为0。但是,当目标标识的长度小于N个字节时,不易将原始配置数据和目标字段分解得到所有数据项的校验和为0。针对该问题,本申请还提供一种方式使得扩展总线重定时器能够根据第二校验字段对第一配置数据进行校验,下面进行详细介绍:
在另一个可选实施例中,在第一校验字段的存储区域之后的存储区域中写入第一配置数据之前,上述方法还包括:在填充区域中写入填充字段,填充区域为在第一校验字段的结束地址和第一配置数据的起始地址之间的存储区域,将原始配置数据、目标字段以及填充字段分解得到所有数据项的校验和为0。
本实施例中,填充字段的取值可以根据原始配置数据和目标字段的取值设置,从而使得将原始配置数据、目标字段以及填充字段分解得到所有数据项的校验和为0。填充字段可以包括填充字段的标识。可选的,在目标字段中目标标识为配置数据标识或填充字段的标识。
在另一个可选实施例中,原始配置数据包括多个相同长度的序列,第一校验字段的长度与填充字段的长度之和等于一个序列的长度。
在另一个可选实施例中,在依次读取原始配置数据和目标字段之后,且在读取第一配置数据之前,上述方法还包括:读取填充字段。扩展总线重定时器读取填充字段的标识后,会继续读取在填充字段之后的第一配置数据。
在一个可选实施例中,
如图4A所示,当扩展总线重定时器的配置数据为出厂设置的配置数据时,扩展总线重定时器的存储区域包括但不限于:用于存储原始配置数据的存储区域401,用于存储第一校验字段的存储区域402和未写入数据的存储区域403。第一校验字段的标识记为T2。
如图4B所示,在存储区域401和存储区域402中存储的数据不变的情况下,在写入填充字段、第一配置数据和第二校验字段之后,存储区域403划分为用于存储第一配置数据的存储区域4031、用于存储填充字段的存储区域4032和用于存储第二校验字段的存储区域4033。填充字段的标识记为T3。
如图4C所示,在写入填充字段、第一配置数据和第二校验字段之后,将第一校验字段的标识(即T2)修改为配置数据标识(即T1)。这样,在存储区域402中存储的数据从第一校验字段修改为目标字段。其中,原始配置数据、目标字段和填充字段满足以下条件:将原始配置数据、目标字段和填充字段分解得到的所有数据项的校验和为0。
当扩展总线重定时器复位之后,从起始位置开始,依次读取原始配置数据、目标字段、填充字段、第一配置数据和第二校验字段。当读取第二校验字段之后,将原始配置 数据、目标字段、填充字段和第一配置数据分解为多个数据项,然后根据多个数据项的校验和判断第一配置数据的完整性和正确性。当校验通过时,利用第一配置数据对扩展总线重定时器进行初始化配置;当校验失败时,扩展总线重定时器停止工作或重新执行图3所示的配置数据的方法。
由于原始配置数据、目标字段和填充字段分解得到的所有数据项的校验和为0,因此将原始配置数据、目标字段、填充字段和第一配置数据分解得到的所有数据项的校验和与分解第一配置数据得到的多个数据项的校验和相同。
在步骤305之后,存储区域401和存储区域4031分别存储原始配置数据和第一配置数据。在后续过程中可能多次更新配置数据,下面对更新配置数据的方法和配置数据的方法进行具体介绍:
参阅图5,本申请提供的配置数据的方法的另一个实施例包括:
步骤501、获取第二配置数据。
本实施例中,第二配置数据是在存储器写入第一配置数据和原始配置数据之后用于更新的配置数据。当存储器中存储原始配置数据和第一配置数据之后,管理控制器可以获取第二配置数据,以取代第一配置数据。
步骤502、将目标标识修改为第一校验字段的标识,得到第一校验字段。
管理控制器对存储器中的目标标识进行修改,将其修改为第一校验字段的标识。由此将目标字段修改为第一校验字段。
步骤503、在第一校验字段的存储区域之后的存储区域写入第二配置数据。
具体的,当第一校验字段的存储区域之后没有填充区域时,直接在第一校验字段的存储区域之后且相邻的存储区域写入第二配置数据。当第一校验字段的存储区域之后的存储区域包括填充区域时,在填充区域之后写入第二配置数据。
步骤504、将第一校验字段的标识修改为目标标识,得到目标字段。
管理控制器对存储器中的第一校验字段的标识进行修改,将其修改为目标标识。由此将第一校验字段修改为目标字段。可选的,当用一个字节大小的存储区域存储目标标识或第一校验字段的标识时,步骤502以及步骤504均可以认为是一个原子操作。由于执行原子操作的时间极短,因此在此期间发生异常的概率极小。
步骤505、收到对扩展总线重定时器的复位指令之后,依次读取原始配置数据、目标字段和第二配置数据。
步骤506、根据第二配置数据配置扩展总线重定时器。
可选的,扩展总线重定时器从存储器中依次读取原始配置数据,根据原始配置数据配置扩展总线重定时器;再读取目标字段,忽略目标字段;然后读取第二配置数据,根据第二配置数据配置扩展总线重定时器,以使得第二配置数据替换了原始配置数据。
本实施例中,在更新配置数据时,不破坏原始配置数据。在扩展总线重定时器复位之后,当检测到第一校验字段的标识时,根据原始配置数据配置扩展总线重定时器;当读取目标标识后,根据第二配置数据配置扩展总线重定时器,由此能够保证扩展总线重定时器正常工作,提高了扩展总线重定时器的鲁棒性。
可以理解的是,根据图5所示的配置数据的方法,除了利用第二配置数据更新配置数据之外,依此类推,可以实现后续配置数据的更新。
在一个可选实施例中,在第一校验字段的存储区域之后的存储区域包括填充区域,填充区域在第一校验字段的存储区域之后且相邻;
步骤503包括:在填充区域之后的存储区域写入第二配置数据。
步骤505包括:收到对扩展总线重定时器的复位指令之后,依次读取原始配置数据、目标字段、填充字段和第二配置数据。
本实施例中,填充区域用于存储填充字段。填充区域和填充字段的具体描述可以参阅前述实施例中的相关描述。当扩展总线重定时器的存储区域存储有原始配置数据、目标字段、填充字段和第二配置数据时,扩展总线重定时器依次读取原始配置数据、目标字段、填充字段和第二配置数据,然后根据第二配置数据配置扩展总线重定时器。
在另一个可选实施例中,目标标识为配置数据标识;
在步骤502之前,上述方法还包括:当检测到填充字段的标识时,根据填充字段的标识查找目标标识。
本实施例中,由于目标标识为配置数据标识,并且原始配置数据中的序列均包括配置数据标识,因此扩展总线重定时器难以迅速确定目标字段。首先查找到填充字段的标识,然后确定在填充字段之前的指定长度的字段记为目标字段,其包括的标识即为目标标识。由此提供了一种快速查找目标标识的方法。
在另一个可选实施例中,在第二配置数据的存储区域之后写入第三校验字段,第三校验字段用于校验第二配置数据。当扩展总线重定时器读取第三校验字段时,不再读取在第三校验字段之后的配置数据。
当扩展总线重定时器读取第三校验字段的校验标识时,对在第三校验字段之前的数据进行校验,当校验和满足条件时,确定配置数据正确无误。具体校验过程与上述实施例中根据第二校验字段进行校验的方法相似。
在一个可选实施例中,
如图4C所示,在步骤305之后,存储区域401存储有原始配置数据,存储区域402存储有目标字段,目标字段的标识为配置数据标识(即T1)。存储区域4032存储有填充字段,填充字段的标识为T3。存储区域4031存储有第一配置数据。存储区域4033存储有第二校验字段,第二校验字段的标识为T2。
如图6A所示,将目标标识(即T1)修改为第一校验字段的标识(T2),然后在存储区域601中写入第二配置数据,然后在存储区域602中写入第三校验字段。可以理解的是,当第一配置数据的存储区域与第二配置数据的存储区域大小相同时,存储区域601即存储区域4031。当第二校验字段的存储区域与第三校验字段的存储区域大小相同时,存储区域602即存储区域4032。这样,当写入第二配置数据异常时,扩展总线重定时器可以根据第一校验字段的标识(即T2)和原始配置数据进行初始化配置。
如图6B所示,在写入第二配置数据和第三校验字段之后,将存储区域402中第一校验字段的标识(即T2)修改为配置数据标识(即T1)。这样,扩展总线重定时器在读取目标字段之后,可以继续读取填充字段、第二配置数据和第三校验字段,然后根据第二配置数据进行初始化配置。
参阅图7,本申请提供一种能够上述配置数据方法的计算设备700。计算设备700的一个实施例包括管理控制器701、扩展总线重定时器702和存储器703;扩展总线重定时 器702分别连接管理控制器701和存储器703;
管理控制器701,用于获取第一配置数据;
管理控制器701,还用于在第一校验字段的存储区域之后的存储区域中写入第一配置数据,第一校验字段的存储区域位于原始配置数据的存储区域之后,第一校验字段用于校验原始配置数据;
管理控制器701,还用于将第一校验字段中第一校验字段的标识修改为目标标识,得到目标字段;
扩展总线重定时器702,用于收到复位指令之后,依次读取原始配置数据、目标字段和第一配置数据;
扩展总线重定时器702,还用于根据第一配置数据配置扩展总线重定时器;
存储器703,用于存储原始配置数据、第一校验字段、目标字段和第一配置数据。
其中,管理控制器701可以是通用处理器,包括中央处理器(central processing Unit,CPU)或单片机;还可以是数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件等。
存储器703包括非易失性存储器(non-volatile memory,NVM)。非易失性存储器可以包括闪存(flash memory),电可擦除可编程只读存储器(electrically erasable programmable read-only memory,EEPROM),硬盘驱动器(hard disk drive,HDD),固态硬盘(solid state drives,SSD),硅磁盘驱动器(silicon disk drive,SDD),只读存储器(read-only memory,ROM),只读光盘(compact disc read-only memory,CD-ROM),磁带,软盘,光数据存储设备中的至少一项。
具体的,非易失性存储器用于存储配置数据、校验字段和填充字段等。配置数据包括但不限于原始配置数据、第一配置数据和第二配置数据。校验字段包括但不限于第一校验字段、第二校验字段和第三校验字段。存储器703还包括随机存取存储器(random access memory,RAM)。
存储器703还用于存储程序,管理控制器701执行存储器703存储的程序,实现图3所示的配置数据的方法中步骤301至步骤303,或者图5所示的配置数据的方法中步骤501至步骤504。
在一个可选实施例中,
管理控制器701,还用于在填充区域中写入填充字段,填充区域为在第一校验字段的结束地址和第一配置数据的起始地址之间的存储区域,将原始配置数据、目标字段以及填充字段分解得到所有数据项的校验和为0。
在另一个可选实施例中,原始配置数据包括多个相同长度的序列,第一校验字段的长度与填充字段的长度之和等于一个序列的长度。
在另一个可选实施例中,扩展总线重定时器702,还用于在依次读取原始配置数据和目标字段之后且在读取第一配置数据之前,读取填充字段。
在一个可选的实施例中,目标标识为配置数据标识或填充字段的标识。
在另一个可选实施例中,管理控制器701,还用于在第一配置数据的存储区域之后写入第二校验字段,第二校验字段用于校验第一配置数据。
在另一个可选实施例中,管理控制器701还用于在根据第一配置数据配置扩展总线重定时器之后,执行以下操作:
获取第二配置数据;
将目标标识修改为第一校验字段的标识,得到第一校验字段;
在第一校验字段的存储区域之后的存储区域写入第二配置数据;
将第一校验字段的标识修改为目标标识,得到目标字段;
收到对扩展总线重定时器702的复位指令之后,依次读取原始配置数据、目标字段和第二配置数据;
根据第二配置数据配置扩展总线重定时器702。
在另一个可选实施例中,管理控制器701,还用于在将目标标识修改为第一校验字段的标识之前,当目标标识为配置数据标识且检测到填充字段的标识时,根据填充字段的标识查找目标标识。
在另一个可选实施例中,管理控制器701,还用于在第二配置数据的存储区域之后写入第三校验字段,第三校验字段用于校验第二配置数据。
本申请提供一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如以上实施例中任意一个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例所述技术方案的范围。

Claims (19)

  1. 一种配置数据的方法,其特征在于,所述方法包括:
    获取第一配置数据;
    在第一校验字段的存储区域之后的存储区域中写入所述第一配置数据,所述第一校验字段的存储区域位于原始配置数据的存储区域之后,所述第一校验字段用于校验所述原始配置数据;
    将所述第一校验字段中所述第一校验字段的标识修改为目标标识,得到目标字段;
    收到对扩展总线重定时器的复位指令之后,依次读取所述原始配置数据、所述目标字段和所述第一配置数据;
    根据所述第一配置数据配置所述扩展总线重定时器。
  2. 根据权利要求1所述的方法,其特征在于,在所述第一校验字段的存储区域之后的存储区域中写入所述第一配置数据之前,所述方法还包括:
    在填充区域中写入填充字段,所述填充区域为在所述第一校验字段的结束地址和所述第一配置数据的起始地址之间的存储区域,将所述原始配置数据、所述目标字段以及所述填充字段分解得到所有数据项的校验和为0。
  3. 根据权利要求2所述的方法,其特征在于,所述原始配置数据包括多个相同长度的序列,所述第一校验字段的长度与所述填充字段的长度之和等于一个序列的长度。
  4. 根据权利要求2至3中任一项所述的方法,其特征在于,在所述依次读取所述原始配置数据、所述目标字段之后,且在读取所述第一配置数据之前,所述方法还包括:
    读取所述填充字段。
  5. 根据权利要求4所述的方法,其特征在于,所述目标标识为配置数据标识或所述填充字段的标识。
  6. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    在所述第一配置数据的存储区域之后写入第二校验字段,所述第二校验字段用于校验所述第一配置数据。
  7. 根据权利要求1所述的方法,其特征在于,在所述根据所述第一配置数据配置所述扩展总线重定时器之后,所述方法还包括:
    获取第二配置数据;
    将所述目标标识修改为所述第一校验字段的标识,得到所述第一校验字段;
    在所述第一校验字段的存储区域之后的存储区域写入所述第二配置数据;
    将所述第一校验字段的标识修改为所述目标标识,得到所述目标字段;
    收到对所述扩展总线重定时器的复位指令之后,依次读取所述原始配置数据、所述目标字段和所述第二配置数据;
    根据所述第二配置数据配置所述扩展总线重定时器。
  8. 根据权利要求7所述的方法,其特征在于,所述目标标识为配置数据标识;
    在所述将所述目标标识修改为所述第一校验字段的标识之前,所述方法还包括:
    当检测到填充字段的标识时,根据所述填充字段的标识查找所述目标标识。
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    在所述第二配置数据的存储区域之后写入第三校验字段,所述第三校验字段用于校验所述第二配置数据。
  10. 一种计算设备,其特征在于,所述计算设备包括管理控制器、扩展总线重定时器和存储器;
    所述管理控制器,用于获取第一配置数据;
    所述管理控制器,还用于在第一校验字段的存储区域之后的存储区域中写入所述第一配置数据,所述第一校验字段的存储区域位于原始配置数据的存储区域之后,所述第一校验字段用于校验所述原始配置数据;
    所述管理控制器,还用于将所述第一校验字段中所述第一校验字段的标识修改为目标标识,得到目标字段;
    所述扩展总线重定时器,用于收到对所述扩展总线重定时器的复位指令之后,依次读取所述原始配置数据、所述目标字段和所述第一配置数据;
    所述扩展总线重定时器,还用于根据所述第一配置数据配置所述扩展总线重定时器;
    所述存储器用于存储所述原始配置数据、所述第一校验字段、所述目标字段和所述第一配置数据。
  11. 根据权利要求10所述的计算设备,其特征在于,
    所述管理控制器,还用于在填充区域中写入填充字段,所述填充区域为在所述第一校验字段的结束地址和所述第一配置数据的起始地址之间的存储区域,将所述原始配置数据、所述目标字段以及所述填充字段分解得到所有数据项的校验和为0。
  12. 根据权利要求11所述的计算设备,其特征在于,所述原始配置数据包括多个相同长度的序列,所述第一校验字段的长度与所述填充字段的长度之和等于一个序列的长度。
  13. 根据权利要求11至12中任一项所述的计算设备,其特征在于,
    所述扩展总线重定时器,还用于在所述依次读取所述原始配置数据和所述目标字段之后,且在读取所述第一配置数据之前读取所述填充字段。
  14. 根据权利要求13所述的计算设备,其特征在于,所述目标标识为配置数据标识或填充字段的标识。
  15. 根据权利要求10至12中任一项所述的计算设备,其特征在于,
    所述管理控制器,还用于在所述第一配置数据的存储区域之后写入第二校验字段,所述第二校验字段用于校验所述第一配置数据。
  16. 根据权利要求10所述的计算设备,其特征在于,所述管理控制器还用于在所述根据所述第一配置数据配置所述扩展总线重定时器之后,执行以下操作:
    获取第二配置数据;
    将所述目标标识修改为所述第一校验字段的标识,得到所述第一校验字段;
    在所述第一校验字段的存储区域之后的存储区域写入所述第二配置数据;
    将所述第一校验字段的标识修改为所述目标标识,得到所述目标字段;
    收到对所述扩展总线重定时器的复位指令之后,依次读取所述原始配置数据、所述目标字段和所述第二配置数据;
    根据所述第二配置数据配置所述扩展总线重定时器。
  17. 根据权利要求16所述的计算设备,其特征在于,
    所述管理控制器,还用于当所述目标标识为配置数据标识且检测到填充字段的标识时,根据所述填充字段的标识查找所述目标标识。
  18. 根据权利要求16所述的计算设备,其特征在于,
    所述管理控制器,还用于在所述第二配置数据的存储区域之后写入第三校验字段,所述第三校验字段用于校验所述第二配置数据。
  19. 一种计算机存储介质,包括指令,当其在计算机上运行时,用于执行如权利要求1至9中任一项所述的方法。
PCT/CN2019/090897 2018-09-28 2019-06-12 一种配置数据的方法以及计算设备 WO2020062931A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811140820.5A CN109491951B (zh) 2018-09-28 2018-09-28 一种配置数据的方法以及计算设备
CN201811140820.5 2018-09-28

Publications (1)

Publication Number Publication Date
WO2020062931A1 true WO2020062931A1 (zh) 2020-04-02

Family

ID=65690694

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/090897 WO2020062931A1 (zh) 2018-09-28 2019-06-12 一种配置数据的方法以及计算设备

Country Status (2)

Country Link
CN (1) CN109491951B (zh)
WO (1) WO2020062931A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491951B (zh) * 2018-09-28 2022-05-10 超聚变数字技术有限公司 一种配置数据的方法以及计算设备
CN114629965A (zh) * 2022-02-18 2022-06-14 青岛海尔空调电子有限公司 一种数据帧配置方法、设备控制方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040030877A1 (en) * 2002-08-06 2004-02-12 Aleksandr Frid Using system BIOS to update embedded controller firmware
CN102622280A (zh) * 2011-01-06 2012-08-01 苏州科达科技有限公司 一种基于双文件系统的软件版本升级的控制方法及装置
CN108255436A (zh) * 2018-01-25 2018-07-06 广东美的制冷设备有限公司 数据存取方法、存取装置、家电设备和可读存储介质
CN109491951A (zh) * 2018-09-28 2019-03-19 华为技术有限公司 一种配置数据的方法以及计算设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5611045A (en) * 1993-10-29 1997-03-11 Compaq Computer Corporation Detecting the presence of a device on a computer system bus by measuring the response time of data signals on the bus, and maximizing system performance based on that response time
US6032271A (en) * 1996-06-05 2000-02-29 Compaq Computer Corporation Method and apparatus for identifying faulty devices in a computer system
MY175303A (en) * 2014-09-11 2020-06-18 Intel Corp Apparatus for sideband signaling, method for sideband signaling and system for sideband signaling
US11281618B2 (en) * 2014-10-31 2022-03-22 Xlnx, Inc. Methods and circuits for deadlock avoidance
EP3251018A4 (en) * 2015-01-28 2018-10-03 Hewlett-Packard Development Company, L.P. Redirection of lane resources

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040030877A1 (en) * 2002-08-06 2004-02-12 Aleksandr Frid Using system BIOS to update embedded controller firmware
CN102622280A (zh) * 2011-01-06 2012-08-01 苏州科达科技有限公司 一种基于双文件系统的软件版本升级的控制方法及装置
CN108255436A (zh) * 2018-01-25 2018-07-06 广东美的制冷设备有限公司 数据存取方法、存取装置、家电设备和可读存储介质
CN109491951A (zh) * 2018-09-28 2019-03-19 华为技术有限公司 一种配置数据的方法以及计算设备

Also Published As

Publication number Publication date
CN109491951A (zh) 2019-03-19
CN109491951B (zh) 2022-05-10

Similar Documents

Publication Publication Date Title
US10324864B2 (en) Storage system and method for performing and authenticating write-protection thereof
US8281229B2 (en) Firmware verification using system memory error check logic
US10783090B2 (en) Storage system and method for performing and authenticating write-protection thereof
US10025600B2 (en) NAND-based verified boot
WO2020063001A1 (zh) 基本输入输出系统固件的管理方法、装置和服务器
TWI768544B (zh) 電腦系統及其安全管理方法以及電腦軟體產品
US11720249B2 (en) Data storage device and method for rewriting parameters thereof
WO2020062931A1 (zh) 一种配置数据的方法以及计算设备
US20060117171A1 (en) System and method for updating a basic input/output system
US20130080751A1 (en) Method and device for updating bios program for computer system
CN112925653B (zh) 虚拟化群集扩容方法、相关设备及计算机可读存储介质
CN112597488B (zh) 页表完整性保护方法、装置和设备
WO2023179745A1 (zh) 可信验证方法及装置
TWI663509B (zh) 系統資訊管理方法
CN115220755A (zh) 一种基于可信度量的路由器在线升级系统
US10242195B2 (en) Integrity values for beginning booting instructions
KR100907550B1 (ko) 시리얼 eeprom의 손상된 데이터를 복구하기 위한장치 및 방법
CN117170694B (zh) 一种bmc数据烧录配置方法、装置、设备及介质
TW202008156A (zh) 伺服器韌體更新方法
TWI797932B (zh) 韌體驗證系統及韌體驗證方法
US20230418591A1 (en) Firmware update method of a flash bootloader in a micro controller unit for a vehicle
TW202318196A (zh) 韌體映像檢查系統、韌體映像檢查方法及電腦系統
US20190286331A1 (en) Data storage device and method for rewriting parameters thereof
JP2016212460A (ja) プログラマブルデバイス、情報処理装置、およびプログラマブルデバイスにおける処理回路の制御方法
CN110795131A (zh) 服务器固件更新方法

Legal Events

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

Ref document number: 19867382

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19867382

Country of ref document: EP

Kind code of ref document: A1