CN218547984U - Linux kernel log recording device based on MRAM - Google Patents
Linux kernel log recording device based on MRAM Download PDFInfo
- Publication number
- CN218547984U CN218547984U CN202222937645.0U CN202222937645U CN218547984U CN 218547984 U CN218547984 U CN 218547984U CN 202222937645 U CN202222937645 U CN 202222937645U CN 218547984 U CN218547984 U CN 218547984U
- Authority
- CN
- China
- Prior art keywords
- pin
- mram
- module
- sio
- filter circuit
- 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
Links
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Storage Device Security (AREA)
Abstract
The utility model discloses a Linux kernel log recorder based on MRAM, including CPU module, MRAM module and peripheral circuit, the CPU module passes through peripheral circuit and is connected with the MRAM module, wherein: the CPU module is provided with an SPI controller, and the SPI controller is provided with a first CS # chip selection pin, a first SIO pin and a first SCK pin. The MRAM module is provided with a second CS # chip selection pin, a second SIO pin and a second SCK pin. And the peripheral circuit comprises a write protection circuit, a first filter circuit, a second filter circuit and a third filter circuit, and the first CS # chip selection pin is electrically connected with the second CS # chip selection pin through the first filter circuit. The log recording module uses an external storage medium mode through communication transmission between the Mram module and the CPU module, and the Mram module has the characteristics of non-volatility of power failure information and support of almost unlimited repeated writing, so that the reliability of log information is improved.
Description
Technical Field
The utility model belongs to the server field, concretely relates to Linux kernel log record device based on MRAM.
Background
MRAM (magnetic Random Access Memory) is a type of nonvolatile magnetic Random Access Memory. The high-speed read-write circuit has the high-speed read-write capability of a Static Random Access Memory (SRAM) and the high integration level of a Dynamic Random Access Memory (DRAM), and can be repeatedly written in an infinite number of times.
The Linux kernel provides a set of Kjump mechanism, that is, all the memory information and register information dump of the system are put into a file of the system hard disk when the kernel crashes, so that tools such as gdb/coast and the like are used for subsequent analysis and debugging. However, kdump mainly dumps the log during the kernel pancic, and does not dump the log in the scenario where a module of the system fails but the whole system pancic is not caused, and the ring buffer space of the kernel dmesg defaults to 1KB, so that the content of the log information stored in the kernel dmesg is also limited.
SUMMERY OF THE UTILITY MODEL
An object of the utility model is to solve the problem of proposing in the background art, provide a Linux kernel log recorder based on MRAM.
In order to achieve the above purpose, the utility model adopts the technical proposal that:
the utility model provides a Linux kernel log recorder based on MRAM, including CPU module, MRAM module and peripheral circuit, the CPU module passes through the peripheral circuit and is connected with the MRAM module, wherein:
the CPU module is provided with an SPI controller, and the SPI controller is provided with a first CS # chip selection pin, a first SIO pin and a first SCK pin.
The MRAM module is provided with a second CS # chip selection pin, a second SIO pin and a second SCK pin.
The peripheral circuit comprises a write protection circuit, a first filter circuit, a second filter circuit and a third filter circuit, wherein a first CS # chip selection pin is electrically connected with a second CS # chip selection pin through the first filter circuit, a first SIO pin is electrically connected with the write protection circuit, the write protection circuit is electrically connected with the second filter circuit, the second filter circuit is electrically connected with a second SIO pin, and a first SCK pin is electrically connected with a second SCK pin through the second filter circuit.
Preferably, the MRAM module is further provided with a VCC pin and a VSS pin for supplying power, and a RESET # pin for resetting.
Preferably, the peripheral circuit further comprises a power supply circuit and a fourth filter circuit, the power supply circuit is electrically connected with the fourth filter circuit, and the fourth filter circuit is electrically connected with the VCC pin, the VSS pin and the RESET # pin respectively.
Preferably, the MRAM module is also provided with a reserved RFU pin and a reserved DQS pin.
Preferably, the first SIO pin and the second SIO pin each include an SI pin and an SO pin, and the SI pin of the first SIO pin corresponds to the SI pin of the second SIO pin, and the SO pin of the first SIO pin corresponds to the SO pin of the second SIO pin.
Compared with the prior art, the beneficial effects of the utility model are that:
the log recording module uses an external storage medium mode through communication transmission between the Mram module and the CPU module, and the Mram module has the characteristics of non-volatility of power failure information and support of almost unlimited repeated writing, so that the reliability of log information is improved.
Drawings
FIG. 1 is a block diagram of the Linux kernel log recording device based on MRAM according to the present invention;
fig. 2 is a software architecture diagram of the Linux kernel log recording apparatus based on MRAM of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
As shown in fig. 1, a Linux kernel log recording device based on MRAM includes a CPU module, an MRAM module, and a peripheral circuit, the CPU module is connected to the MRAM module through the peripheral circuit, wherein:
the CPU module is provided with an SPI controller, and the SPI controller is provided with a first CS # chip selection pin, a first SIO pin and a first SCK pin.
The MRAM module is provided with a second CS # chip selection pin, a second SIO pin and a second SCK pin.
The peripheral circuit comprises a write protection circuit, a first filter circuit, a second filter circuit and a third filter circuit, wherein a first CS # chip selection pin is electrically connected with a second CS # chip selection pin through the first filter circuit, a first SIO pin is electrically connected with the write protection circuit, the write protection circuit is electrically connected with the second filter circuit, the second filter circuit is electrically connected with a second SIO pin, and a first SCK pin is electrically connected with a second SCK pin through the second filter circuit.
Specifically, in this embodiment, the MRAM (magnetic Random Access Memory) module uses a HIK35ML064C (high rotor 64Mb OSPI STT-MRAM) chip with an SPI interface, and the CPU module uses a feiteng 2000plus/64 core CPU server motherboard. And the first SCK pin on the SPI controller of the CPU module is connected to the second SCK pin through a third filter circuit, and the level of the first SCK pin of the CPU module is controlled to be in a rising edge state according to an SPI mode 0 mode supported by the HIK35ML064C chip, so that the second SCK pin of the MRAM module is also in the rising edge state. The enable chip select signal CS # is high. And configuring a first SIO pin and a second SIO pin to be both in a standard SPI mode (Single SPI), namely, simultaneously transmitting and receiving, and in a full-duplex mode, and transmitting command codes WREN and WRITE to the second SIO pin in the MRAM module through the first SIO pin of the SPI controller of the CPU module to WRITE data into the MRAM module. In the mode 0, a first SCK pin of an SPI controller of the CPU module is controlled to be in a falling edge state, and an SPI command code READ is sent to a second SIO pin of the MRAM module through a first SIO pin of the CPU module, so that data can be READ from the MRAM module. And the SPI controller in the CPU module is used for driving and inquiring an internal state register of the MRAM module to judge whether the read and write operations are finished.
A first CS # chip selection pin on an SPI controller of the CPU module is connected to a second CS # chip selection pin through a first filter circuit, and the first CS # chip selection pin sends low level to enable the MRAM module to enter a selected state through the first filter circuit.
In one embodiment, the MRAM module is further provided with a VCC pin and a VSS pin for supplying power, and a RESET # pin for resetting.
Specifically, the VCC pin is a power supply pin, and the VSS pin is a ground pin.
In one embodiment, the peripheral circuit further comprises a power supply circuit and a fourth filter circuit, the power supply circuit is electrically connected with the fourth filter circuit, and the fourth filter circuit is electrically connected with the VCC pin, the VSS pin and the RESET # pin respectively.
Specifically, in this embodiment, the power supply circuit is 3.3V.
In one embodiment, the MRAM module is further provided with a reserved RFU pin and a reserved DQS pin.
In one embodiment, the first SIO pin and the second SIO pin each include an SI pin and an SO pin, and the SI pin of the first SIO pin corresponds to the SI pin of the second SIO pin, and the SO pin of the first SIO pin corresponds to the SO pin of the second SIO pin.
Specifically, an SI pin (data output pin) of the first SIO pin is connected to an SI pin (data input pin) of the second SIO pin via a write protection circuit and a filter circuit; and the SO pin (data input pin) of the first SIO pin is connected to the SO pin (data output pin) of the second SIO pin through the write protection circuit and the filter circuit, SO that data transmission is realized.
In one embodiment, the software architecture of the Linux-based software development environment of the MRAM-based Linux kernel logging device is as shown in fig. 2, and comprises a hardware MRAM module, a software environment kernel state and a user state of a CPU module; in the figure, the SPI is an SPI controller of the CPU module;
the log writing principle comprises the following steps: and the SPI controller drives and registers an MRAM _ dev device, and encapsulates IO operations such as reading and writing of the MRAM module according to an HIK35ML064C manual. Registering a virtual serial port device of mramcon0, mapping physical serial port log information to the virtual serial port device mramcon0 in a redirection mode, and synchronizing the kernel log to the MRAM module in real time through an SPI (serial peripheral interface) controller of the CPU module and a data transmission line of an SI (service information) pin between the CPU module and the MRAM module for the mapped log data;
the log export principle: and circularly reading the content in the MRAM medium by the read operation of the SPI controller on the MRAM module until the whole MRAM module space is read. And calling the kernel vfs _ write, and writing each read log data into the Klog _ file for subsequent analysis.
As a result: the mode of recording Linux kernel logs by the Mram module can effectively store the system kernel logs, and the 64Mb capacity greatly improves the storable kernel log content. The magnetic medium of the device effectively improves the anti-interference capability of log data and can be written repeatedly for an unlimited number of times.
By means of the virtual serial port, the physical serial port log is oriented to the virtual serial port device, and normal use of the physical serial port is not affected while the system log is obtained.
The log recording module adopts the mode of an external storage medium through communication transmission between the Mram module and the CPU module, and the Mram module has the characteristics of non-volatility of power failure information and support of almost unlimited repeated writing, so that the reliability of log information is improved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express the more specific and detailed embodiments described in the present application, but not be construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (5)
1. An MRAM-based Linux kernel log recording device is characterized in that: the Linux kernel log recording device based on the MRAM comprises a CPU module, an MRAM module and a peripheral circuit, wherein the CPU module is connected with the MRAM module through the peripheral circuit, and the MRAM module comprises:
the CPU module is provided with an SPI controller, and a first CS # chip selection pin, a first SIO pin and a first SCK pin are arranged on the SPI controller;
the MRAM module is provided with a second CS # chip selection pin, a second SIO pin and a second SCK pin;
the peripheral circuit comprises a write protection circuit, a first filter circuit, a second filter circuit and a third filter circuit, wherein a first CS # chip selection pin is electrically connected with a second CS # chip selection pin through the first filter circuit, a first SIO pin is electrically connected with the write protection circuit, the write protection circuit is electrically connected with a second filter circuit, the second filter circuit is electrically connected with a second SIO pin, and the first SCK pin is electrically connected with a second SCK pin through the second filter circuit.
2. The MRAM-based Linux kernel logging device of claim 1, wherein: the MRAM module is also provided with a VCC pin and a VSS pin for power supply and a RESET # pin for resetting.
3. The MRAM-based Linux kernel logging device of claim 2, wherein: the peripheral circuit further comprises a power supply circuit and a fourth filter circuit, wherein the power supply circuit is electrically connected with the fourth filter circuit, and the fourth filter circuit is respectively and electrically connected with the VCC pin, the VSS pin and the RESET # pin.
4. The MRAM-based Linux kernel logging device of claim 1, wherein: and the MRAM module is also provided with a reserved RFU pin and a reserved DQS pin.
5. The MRAM-based Linux kernel logging device of claim 1, wherein: the first SIO pin and the second SIO pin respectively comprise an SI pin and an SO pin, the SI pin of the first SIO pin corresponds to the SI pin of the second SIO pin, and the SO pin of the first SIO pin corresponds to the SO pin of the second SIO pin.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202222937645.0U CN218547984U (en) | 2022-11-04 | 2022-11-04 | Linux kernel log recording device based on MRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202222937645.0U CN218547984U (en) | 2022-11-04 | 2022-11-04 | Linux kernel log recording device based on MRAM |
Publications (1)
Publication Number | Publication Date |
---|---|
CN218547984U true CN218547984U (en) | 2023-02-28 |
Family
ID=85260226
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202222937645.0U Active CN218547984U (en) | 2022-11-04 | 2022-11-04 | Linux kernel log recording device based on MRAM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN218547984U (en) |
-
2022
- 2022-11-04 CN CN202222937645.0U patent/CN218547984U/en active Active
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20060036897A1 (en) | Data storage device | |
Hidaka et al. | The cache DRAM architecture: A DRAM with an on-chip cache memory | |
JP2854680B2 (en) | IC memory card | |
CN101114271B (en) | Semiconductor memory with MPIO of host Interface among processors | |
US20180239557A1 (en) | Nonvolatile memory device, data storage device including the same, and operating method of data storage device | |
US20020145920A1 (en) | Semiconductor memory device | |
KR20210006556A (en) | Controller, memory system and operating method thereof | |
EP4524968A1 (en) | Memory | |
GB2276744A (en) | Memory module with parity bit emulation. | |
US6748482B1 (en) | Multiple non-contiguous block erase in flash memory | |
CN218547984U (en) | Linux kernel log recording device based on MRAM | |
US5526316A (en) | Serial access memory device | |
US20190356331A1 (en) | Error correction code unit and error correction method | |
US20220229775A1 (en) | Data storage device and operating method thereof | |
CN108139993B (en) | Memory device, memory controller, data cache device and computer system | |
US12032824B2 (en) | Event log management method, controller and storage device | |
US7308622B2 (en) | Integrated memory and method for testing the memory | |
US20230297277A1 (en) | Combining Operations During Reset | |
KR102393144B1 (en) | Advanced ce encoding for bus multiplexer grid for ssd | |
US20190212946A1 (en) | Data storage device and operating method thereof | |
US20190179749A1 (en) | Memory system, operating method thereof and nonvolatile memory device | |
US10203891B2 (en) | Data storage device and data processing system | |
KR20210002190A (en) | Controller, memory system and operating method thereof | |
CN114706807B (en) | High-speed volatile expandable storage device and storage method thereof | |
CN109032966A (en) | A kind of caching device and data high-speed read-write terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |