CN103034505A - Read-in data method and electronic device - Google Patents

Read-in data method and electronic device Download PDF

Info

Publication number
CN103034505A
CN103034505A CN2011102961993A CN201110296199A CN103034505A CN 103034505 A CN103034505 A CN 103034505A CN 2011102961993 A CN2011102961993 A CN 2011102961993A CN 201110296199 A CN201110296199 A CN 201110296199A CN 103034505 A CN103034505 A CN 103034505A
Authority
CN
China
Prior art keywords
data
embedded controller
firmware memory
firmware
protection block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011102961993A
Other languages
Chinese (zh)
Inventor
罗圣心
郭嘉雄
连家庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN2011102961993A priority Critical patent/CN103034505A/en
Publication of CN103034505A publication Critical patent/CN103034505A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a read-in data method and an electronic device. According to the read-in data method, when data needed to be read in a firmware memorizer are received, the read-in position of the data is judged to be located in a programmed protection block or a data block of the firmware memorizer by an embedded controller. If the read-in position is located in the programmed protection block, the read-in of the data into the firmware memorizer is canceled. If the read-in position is located in the data block, the data are read into the firmware memorizer.

Description

The method of data writing and electronic installation
Technical field
The present invention relates to a kind of data access method, relate in particular to a kind of method and electronic installation thereof of data writing of firmware memory.
Background technology
In computer system architecture now, at first can be by Basic Input or Output System (BIOS) (Basic Input Output System after opening computer system, BIOS) carry out start selftest (Power On Self Test, POST), so that the hardware units such as the processor in the computer system, storer and peripheral equipment are carried out initialization action, and judge whether said apparatus can normal operation.
Above-mentioned BIOS is stored in the programmable storage (Programmable Memory), and it is mainly used to set hardware setting and some correlation parameters of motherboard.Well known, these class data are all extremely important and do not allow destroyed data, otherwise will cause motherboard can't normal boot-strap or the situation that can't normally use of partial function occur.
Summary of the invention
The invention provides a kind of method and electronic installation of data writing, provide a kind of and prevent writing mechanism, to prevent that firmware is by improper rewriting.
The present invention proposes a kind of method of data writing, is applicable to electronic installation.In the method; reception wants to write to the data of firmware memory; and send first and order to embedded controller; so that embedded controller enters quickflashing pattern (Flash Mode), want to write to the writing position of firmware memory and whether be positioned at the programmed protection block to judge data by embedded controller.If writing position is positioned at the programmed protection block, then cancel data writing to firmware memory; If writing position is positioned at block, then by embedded controller data are write to firmware memory.
In one embodiment of this invention; order to embedded controller in above-mentioned transmission first; so that embedded controller enters after the quickflashing pattern; embedded controller reads director demon code corresponding to embedded controller in firmware memory; and the store controller procedure code is to the temporary storage of embedded controller; so that embedded controller is carried out the director demon code in the temporary storage, judge that to carry out data want to write to the step whether writing position of firmware memory is positioned at the programmed protection block.
In one embodiment of this invention, said procedure protection block comprises the master routine code of director demon code and firmware.And comprise configuration address data in the director demon code.Wherein, configuration address data acknowledgment number according to block and programmed protection block the address scope in firmware memory.
In one embodiment of this invention, after the above-mentioned receive data, data and writing position can be sent to embedded controller.
In one embodiment of this invention, above-mentionedly judge at embedded controller data are wanted to write to before whether the writing position of firmware memory be positioned at the step of programmed protection block, and embedded controller can judge whether first to receive update instruction.If do not receive update instruction, carry out and to judge that data want to write to the step whether writing position of firmware memory is positioned at the programmed protection block.If receive update instruction, embedded controller directly writes data this firmware memory, and does not carry out the step whether writing position of judging data is positioned at the programmed protection block.
In one embodiment of this invention, above-mentioned passing through the embedded controller data writing to the step of firmware memory, also send second and order to embedded controller, so that embedded controller leaves the quickflashing pattern.
From another viewpoint, the present invention proposes a kind of electronic installation, comprises the CPU (central processing unit) in order to receive data, the firmware memory with programmed protection block and block and embedded controller.Wherein, embedded control device is coupled to respectively CPU (central processing unit) and firmware memory.When CPU (central processing unit) receives when wanting to write to the data of firmware memory; CPU (central processing unit) can send first by firmware and order to embedded controller; so that embedded controller enters the quickflashing pattern; and judge that data want to write to the writing position of firmware memory and whether be positioned at the programmed protection block; when being positioned at the programmed protection block at writing position; cancellation writes to firmware memory with data, and is positioned at block at writing position, and data writing is to firmware memory.
In one embodiment of this invention; said procedure protection block comprises the master routine code of director demon code and firmware; and the director demon code comprises configuration address data, wherein configure the address data acknowledgment number according to block and programmed protection block the address scope in firmware memory.
Based on above-mentioned, the present invention utilizes program to judge that data want to write the writing position of firmware memory and whether be positioned at programmed protection block or block, can be by program crash improperly with the protection firmware.
For above-mentioned feature and advantage of the present invention can be become apparent, embodiment cited below particularly, and cooperate accompanying drawing to be described in detail below.
Description of drawings
Fig. 1 is the schematic diagram according to a kind of electronic installation of one embodiment of the invention.
Fig. 2 is the method flow diagram according to a kind of data writing of one embodiment of the invention.
The main element symbol description
100: electronic installation
110: CPU (central processing unit)
120: wafer set
130: embedded controller
140: firmware memory
141: the programmed protection block
143: block
145: the embedded controller block
147: firmware master routine block
S205~S240: each step of the method for data writing of the present invention
Embodiment
The invention provides a kind of method and electronic installation of data writing, provide a kind of and prevent writing mechanism, with the protection of firmware being prevented write.In order to make content of the present invention more clear, below the example that really can implement according to this as the present invention especially exemplified by embodiment.
Fig. 1 is the schematic diagram according to a kind of electronic installation of one embodiment of the invention.Please refer to Fig. 1, electronic installation 100 comprises CPU (central processing unit) (Central Processing Unit, CPU) 110, wafer set (Chipset) 120, embedded controller (Embedded Controller, EC) 130 and firmware memory 140.Wherein, embedded controller 130 is coupled to firmware memory 140, and is coupled to CPU (central processing unit) 110 by wafer set 120.Firmware memory 140 is ROM (read-only memory) (Read-Only Memory, ROM) or flash memory (Flash Memory) for example, in order to store a firmware.This firmware for example is Basic Input or Output System (BIOS) (Basic Input Output System, BIOS).Wafer set 120 for example is the south bridge wafer set.Wafer set 120 is by low pin number (Low Pin Count, LPC) bus is connected to embedded controller 130, and embedded controller 130 is connected to firmware memory 140 by Serial Peripheral Interface (Serial Peripheral Interface, SPI) bus.
In the present embodiment, firmware memory 140 comprises programmed protection block 141 and block 143.In programmed protection block 141, comprise embedded controller block 145 and firmware master routine block 147.Wherein, embedded Control block 145 is in order to store the director demon code of embedded controller 130 execution.147 of firmware master routine blocks are the master routine codes that stores the performed BIOS of CPU (central processing unit) 110.Block 143 is for example set setting value of inventory etc. in order to record desktop management interface (Desktop Management Interface, DMI) sequence number, BIOS.
And comprise in the director demon code that one configures the address data.Above-mentioned configuration address data recording block 143 and the address scope of programmed protection block 141 in firmware memory 140.For example, the address scope of embedded Control block 145 is 10000~11111, and the address scope of firmware master routine block 147 is (11111+1)~1FFFF, that is, the address scope of programmed protection block 141 is 10000~1FFFF.The address scope of block 143 is 20000~3FFFF.
When CPU (central processing unit) 110 receives when wanting to write to the data of firmware memory 140; can judge that these data want to write to the writing position of firmware memory 140 and whether be positioned at programmed protection block 141 by embedded controller 130, further whether decision will write to these data firmware memory 140 according to this.
Particularly; CPU (central processing unit) 110 can send first by BIOS and order to embedded controller 130; so that embedded controller 130 enters quickflashing pattern (Flash Mode); and then judge that by embedded controller 130 data want to write to the writing position of firmware memory 140 and whether be positioned at programmed protection block 141; when being positioned at programmed protection block 141 at writing position; cancellation writes to firmware memory 140 with data; and being positioned at block 143 at writing position, data writing is to firmware memory 140.
The above-mentioned electronic installation 100 of below namely arranging in pairs or groups further specifies the detailed step of the method for data writing.
Fig. 2 is the method flow diagram according to a kind of data writing of one embodiment of the invention.Please simultaneously with reference to Fig. 1 and Fig. 2, in step S205, receive the data of wanting to write to firmware memory 140.For example, CPU (central processing unit) 110 detects the instruction that the user assigns and wants to write data to firmware memory 140.
Then, in step S210, CPU (central processing unit) 110 can send first by BIOS and order to embedded controller 130, so that embedded controller 130 enters quickflashing pattern (Flash Mode).That is to say, this moment, access firmware memory 140 was wanted by system, therefore sent first by BIOS and ordered to embedded controller 130, so that embedded controller 130 temporary transient not access firmware memories 140.
In detail, embedded controller 130 can read the director demon code of embedded controller 130 correspondences in firmware memory 140 after entering the quickflashing pattern.At this, the director demon code is stored in embedded controller block 145.And embedded controller 130 can be stored to the director demon code temporary storage (not illustrating) of embedded controller, so that embedded controller 130 can be carried out director demon code in the temporary storage with execution in step S215.And the director demon code is copied to the action to be used by embedded controller 130 in the temporary storage of embedded controller 130, be to use for the control of firmware memory 140 is transferred to CPU (central processing unit) 110.
And, in step S215, CPU (central processing unit) 110 also can by BIOS with the data wanting to write and the writing position of wanting to write firmware memory 140 be sent to embedded controller 130.
Then, in step S220, judge whether to receive update instruction by embedded controller 140, used and judge the user whether wish is carried out more new element to firmware memory 140, and then determined whether to start the anti-mechanism of writing of firmware memory 140.If do not receive update instruction; expression user's this moment only is simple data writing; but not the action that wish refreshes firmware memory 140; therefore; execution in step S225, embedded controller 130 judge that above-mentioned data want to write to the writing position of firmware memory 140 and whether be positioned at programmed protection block 141.
If writing position is positioned at programmed protection block 141, then start and prevent writing mechanism, that is, in step S235, embedded controller 130 cancellations write to firmware memory 140 with data.If writing position is positioned at block 143, execution in step S230, embedded controller 130 writes to firmware memory 140 with data, namely data is write to corresponding writing position.
In addition, in step S220, if receive update instruction, the expression user wants to refresh the BIOS in the firmware memory 140, therefore execution in step S230 writes to firmware memory 140 by embedded controller 130 with data.
And after above-mentioned steps S230 and step S235, in step S240, CPU (central processing unit) 110 also can send second by BIOS and order to embedded controller 130, so that embedded controller 130 leaves the quickflashing pattern.
In sum, the present invention can judge the writing position of wanting to write when wanting data writing to firmware memory, if writing position is positioned at the programmed protection block, not process just skip over; If writing position is positioned at block, just data can be write.Accordingly, under existing equipment, just can protect the firmware (for example, BIOS) can be by program crash improperly.
Although the present invention discloses as above with embodiment; so it is not to limit the present invention, technician in any affiliated technical field, without departing from the spirit and scope of the present invention; when doing a little change and retouching, therefore protection scope of the present invention should be as the criterion with the scope that claim was defined.

Claims (10)

1. the method for a data writing is characterized in that, be applicable to an electronic installation, and the method comprises:
Receive data, and these data want to write to this firmware memory, this firmware memory comprises a block and a programmed protection block;
Send one first order to an embedded controller, so that this embedded controller enters a quickflashing pattern;
Judge that by this embedded controller these data want to write to a writing position of this firmware memory and whether be positioned at this programmed protection block;
If this writing position is positioned at this programmed protection block, then cancellation writes these data to this firmware memory; And
If this writing position is positioned at this block, write these data to this firmware memory by this embedded controller.
2. the method for data writing according to claim 1 is wherein sending this first order to this embedded controller, so that this embedded controller enters after the step of this quickflashing pattern, more comprises:
This embedded controller reads a director demon code corresponding to this embedded controller in this firmware memory, and stores this director demon code to a temporary storage of this embedded controller; And
This embedded controller is carried out this director demon code in this temporary storage, judges that to carry out these data want to write to the step whether this writing position of this firmware memory is positioned at this programmed protection block.
3. the method for data writing according to claim 2; wherein this programmed protection block comprises a master routine code of this director demon code and a firmware; and this director demon code comprises configuration address data, wherein should configuration address this block of data recording and the address scope of this programmed protection block in this firmware memory.
4. the method for data writing according to claim 1 wherein after the step that receives these data, more comprises:
Transmit these data and this writing position to this embedded controller.
5. the method for data writing according to claim 1, wherein judging that by this embedded controller these data are wanted to write to before whether this writing position of this firmware memory be positioned at the step of this programmed protection block, more comprise:
Judge whether to receive a update instruction;
If receive this update instruction, this embedded controller writes this firmware memory with these data; And
If do not receive this update instruction, carry out and to judge that these data want to write to the step whether this writing position of this firmware memory is positioned at this programmed protection block.
6. the method for data writing according to claim 1, it is wherein writing these data to the step of this firmware memory by this embedded controller, more comprises:
Send one second order to this embedded controller, so that this embedded controller leaves this quickflashing pattern.
7. an electronic installation is characterized in that, comprising:
One CPU (central processing unit) receives data;
One firmware memory comprises a programmed protection block and a block, and wherein this programmed protection block stores a firmware;
One embedded controller; be coupled to respectively this CPU (central processing unit) and this firmware memory; wherein; when this CPU (central processing unit) receives when wanting to write to these data of this firmware memory; send one first order to this embedded controller by this firmware; so that this embedded controller enters a quickflashing pattern; judge that these data want to write to a writing position of this firmware memory and whether be positioned at this programmed protection block; when being positioned at this programmed protection block at this writing position; cancellation writes to this firmware memory with these data; and be positioned at this block at this writing position, write these data to this firmware memory.
8. electronic installation according to claim 7, wherein this programmed protection block comprises a master routine code of a director demon code and this firmware, and this director demon code comprises configuration address data, wherein should configure address this block of data recording and the address scope of this programmed protection block in this firmware memory;
Wherein, this embedded controller reads this director demon code corresponding to this embedded controller in this firmware memory; and store this director demon code to a temporary storage of this embedded controller; so that this embedded controller is carried out this director demon code in this temporary storage, judge that to carry out these data want to write to the step whether this writing position of this firmware memory is positioned at this programmed protection block.
9. electronic installation according to claim 8, wherein this embedded controller can judge whether to receive a update instruction carry out judging that these data want to write to before this writing position of this firmware memory is positioned at the step of this block or this programmed protection block; If receive this update instruction, this embedded controller writes this firmware memory with these data; If do not receive this update instruction, carry out and to judge that these data want to write to the step whether this writing position of this firmware memory is positioned at this programmed protection block.
10. electronic installation according to claim 8, wherein this CPU (central processing unit) transmits these data and this writing position to this embedded controller by this firmware, and, write these data to this firmware memory at this embedded controller, this CPU (central processing unit) sends one second order to this embedded controller, so that this embedded controller leaves this quickflashing pattern by this firmware.
CN2011102961993A 2011-09-30 2011-09-30 Read-in data method and electronic device Pending CN103034505A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102961993A CN103034505A (en) 2011-09-30 2011-09-30 Read-in data method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102961993A CN103034505A (en) 2011-09-30 2011-09-30 Read-in data method and electronic device

Publications (1)

Publication Number Publication Date
CN103034505A true CN103034505A (en) 2013-04-10

Family

ID=48021431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102961993A Pending CN103034505A (en) 2011-09-30 2011-09-30 Read-in data method and electronic device

Country Status (1)

Country Link
CN (1) CN103034505A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201353A (en) * 2016-07-12 2016-12-07 曹蕊 A kind of data transfer apparatus for key assignments storage system and method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845332A (en) * 1994-08-03 1998-12-01 Hitachi, Ltd. Non-volatile memory, memory card and information processing apparatus using the same and method for software write protect control of non-volatile memory
CN1427344A (en) * 2001-12-20 2003-07-02 梅捷企业股份有限公司 Method of setting computer fire proof wall and its system
US20050021918A1 (en) * 2003-07-24 2005-01-27 Sang-Won Hwang Memory and information processing systems with lockable buffer memories and related methods
US6976136B2 (en) * 2001-05-07 2005-12-13 National Semiconductor Corporation Flash memory protection scheme for secured shared BIOS implementation in personal computers with an embedded controller
US20070067644A1 (en) * 2005-08-26 2007-03-22 International Business Machines Corporation Memory control unit implementing a rotating-key encryption algorithm
CN101661440A (en) * 2008-08-26 2010-03-03 爱特梅尔公司 Secure information processing
CN101739361A (en) * 2008-11-12 2010-06-16 联想(北京)有限公司 Access control method, access control device and terminal device
CN101853193A (en) * 2009-03-30 2010-10-06 刘文斌 Data protection restoration method, system and card based on hard disk controller

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845332A (en) * 1994-08-03 1998-12-01 Hitachi, Ltd. Non-volatile memory, memory card and information processing apparatus using the same and method for software write protect control of non-volatile memory
US6976136B2 (en) * 2001-05-07 2005-12-13 National Semiconductor Corporation Flash memory protection scheme for secured shared BIOS implementation in personal computers with an embedded controller
CN1427344A (en) * 2001-12-20 2003-07-02 梅捷企业股份有限公司 Method of setting computer fire proof wall and its system
US20050021918A1 (en) * 2003-07-24 2005-01-27 Sang-Won Hwang Memory and information processing systems with lockable buffer memories and related methods
US20070067644A1 (en) * 2005-08-26 2007-03-22 International Business Machines Corporation Memory control unit implementing a rotating-key encryption algorithm
CN101661440A (en) * 2008-08-26 2010-03-03 爱特梅尔公司 Secure information processing
CN101739361A (en) * 2008-11-12 2010-06-16 联想(北京)有限公司 Access control method, access control device and terminal device
CN101853193A (en) * 2009-03-30 2010-10-06 刘文斌 Data protection restoration method, system and card based on hard disk controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201353A (en) * 2016-07-12 2016-12-07 曹蕊 A kind of data transfer apparatus for key assignments storage system and method

Similar Documents

Publication Publication Date Title
KR100988157B1 (en) Method and apparatus for detecting memory device configuration, and computer readable medium containing instructions for performing method for detecting memory device configuration
US20180307496A1 (en) Methods for gc (garbage collection) por (power off recovery) and apparatuses using the same
CN113688087B (en) PCIE (peripheral component interface express) device enumeration method, system, storage medium and device
US8140730B2 (en) System reconfiguration of expansion cards
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
US7966486B2 (en) Computer system with dual basic input output system and operation method thereof
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
US8713230B2 (en) Method for adjusting link speed and computer system using the same
JP2008198192A (en) Repairable semiconductor memory device and repairing method of this semiconductor memory device
US7725806B2 (en) Method and infrastructure for recognition of the resources of a defective hardware unit
CN113360161A (en) Resource upgrading method and related product
CN103034505A (en) Read-in data method and electronic device
CN106708569B (en) Hot loading method and device for VOBC configuration file in over-the-line train
US11720276B2 (en) Memory system and controller for managing write status
US20190073134A1 (en) Methods for resetting a flash memory device and apparatuses using the same
CN113050976B (en) FPGA parallel upgrading method and device based on PCIe bus, medium and electronic equipment
US6438686B1 (en) Method and apparatus for eliminating contention with dual bus masters
EP2730993B1 (en) Reset method and network device
CN115129384A (en) Electronic equipment and running method of starting program of electronic equipment
CN110941452B (en) Configuration method, BIOS chip and electronic equipment
CN112199103B (en) Equipment upgrading method and terminal equipment
CN116302687A (en) Communication recovery method, device, system and readable storage medium
CN117008943A (en) Data processing method, device and medium
CN113805917A (en) Firmware updating method and device, electronic equipment and storage medium
CN115114193A (en) Memory system, control method of memory system, and host device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130410