CN106033520B - A kind of data processing method and device - Google Patents

A kind of data processing method and device Download PDF

Info

Publication number
CN106033520B
CN106033520B CN201510117009.5A CN201510117009A CN106033520B CN 106033520 B CN106033520 B CN 106033520B CN 201510117009 A CN201510117009 A CN 201510117009A CN 106033520 B CN106033520 B CN 106033520B
Authority
CN
China
Prior art keywords
electronic equipment
code
file
access
preassigned pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510117009.5A
Other languages
Chinese (zh)
Other versions
CN106033520A (en
Inventor
吴会军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510117009.5A priority Critical patent/CN106033520B/en
Publication of CN106033520A publication Critical patent/CN106033520A/en
Application granted granted Critical
Publication of CN106033520B publication Critical patent/CN106033520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of data processing method and devices, this method is applied in an electronic equipment, this method comprises: basic input output system is obtained to indicate that electronic equipment passes through the first instruction of the file in first code access electronic equipment, the first code being stored in advance in the memory space of basic input output system is transferred, and executes first code access electronics and sets file in hard disk.Specifically, in embodiments of the present invention, user can carry out file operation by first code pre-stored in basic input output system, the process of file operation is executed under basic input output system code in this way, so that operating system can not view user to the specific operation process of file, and then it ensure that the safety of operating process of the user to file.

Description

A kind of data processing method and device
Technical field
This application involves electronic technology field more particularly to a kind of data processing method and devices.
Background technique
With electronic technology development, various portable electronic devices are also more and more, for example mobile phone, tablet computer etc. are portable Formula electronic equipment.
Currently, for user when electronic equipment operates file, the file system of electronic equipment will record user to text The operation data of part, and the operation data of record can be stored in a disk areas by file system, so that What user can be convenient transfers out the operation data of file system record.
But the operation data is saved by disk areas, so that other equipment can also be transferred arbitrarily in disk The operation data of preservation, so that the safety of operation data is lower.
Summary of the invention
The embodiment of the invention provides a kind of data processing method and devices, to solve file system guarantor in the prior art Deposit the lower problem of the safety of operation data.
Its specific technical solution is as follows:
A kind of data processing method is applied to an electronic equipment, which comprises
Basic input-output system BIOS is in the electronic equipment to obtain to indicate the electronic equipment by the First instruction of the file in electronic equipment described in one code access;
Based on first instruction, the first code being stored in advance in the BIOS memory space is transferred, and hold The row first code accesses the file in the electronic equipment hard disk.
Optionally, it is used to indicate the electronic equipment and accesses by first code file in the electronic equipment obtaining First instruction before, further includes:
It detects whether to exist and switches to the electronic equipment by second by the first preassigned pattern access file system The switching command of preassigned pattern access file system, wherein first preassigned pattern is the normal mode of operation of CPU, described Second preassigned pattern is System Management Mode;
When detecting the switching command, the electronic equipment is switched to hard by second preassigned pattern access File in disk.
Optionally, the code in the setting memory space of the electronic equipment is transferred, and passes through the first generation Code accesses the file in the electronic equipment, comprising:
Stop the currently performed execution program of CPU in the electronic equipment, and detects and accessed by the first code Whether the file in the electronic equipment is completed;
If completing, the execution program current in the CPU is restarted.
Optionally, the first code is specially to access the code of disk file and/or run at least one application program Code.
A kind of data processing equipment, comprising:
Module is obtained, for obtaining to indicate that the electronic equipment is accessed in the electronic equipment by first code First instruction of file;
Execution module, for transferring the storage sky for being stored in advance in basic input output system based on first instruction Between in the first code, and execute the first code and access file in the electronic equipment hard disk.
Optionally, further includes:
Detection module, for detecting whether being cut in the presence of the electronic equipment is accessed file system by the first preassigned pattern Shift to the switching command that file system is accessed by the second preassigned pattern, wherein first preassigned pattern is the normal work of CPU Operation mode, second preassigned pattern are System Management Mode;
Switching module, for when detecting the switching command, the electronic equipment to be switched to by described second File in preassigned pattern access hard disk.
Optionally, the execution module, comprising:
Detection unit for stopping the currently performed execution program of the CPU in the electronic equipment, and is detected by described First code accesses whether the file in the electronic equipment is completed;
Processing unit, for when detecting that the first code accesses the file completion in the electronic equipment, then weighing Open the execution program current in the CPU.
Optionally, the first code is the code for accessing disk file and/or the generation for running at least one application program Code.
The embodiment of the invention provides a kind of data processing method, this method is applied in an electronic equipment, this method packet It includes: basic input output system (English: Basic Input Output System, referred to as: BIOS) obtain to indicate electronics Equipment accesses the first instruction of the file in electronic equipment by first code, transfers and is stored in advance in BIOS memory space First code, and execute first code access electronics and set file in hard disk.Specifically, in embodiments of the present invention, it uses Family can carry out file operation by first code pre-stored in BIOS, and the process of such file operation is all in BIOS It is executed under code, so that OS can not view user to the specific operation process of file, and then ensure that user to the behaviour of file Make the safety of process.
In addition, in embodiments of the present invention, data processing equipment is additionally provided, when electronic equipment is switched to from normal mode The method of SMM mode, so that user carries out the access of fixed disk file under SMM mode, in System Management Mode SMM Under, user can realize the file access in the electronic equipment by BIOS, so that user to the operation of file all It is to be carried out based on the code in BIOS, so that the OS in electronic equipment can not know the operation to file of the user Journey, so that the operation of file more has completeness.
Detailed description of the invention
Fig. 1 is a kind of flow chart of data processing method in the embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of data processing equipment in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of data processing method, this method is applied in an electronic equipment, this method packet It includes: basic input output system (English: Basic Input Output System, referred to as: BIOS) obtain to indicate electronics Equipment accesses the first instruction of the file in electronic equipment by first code, transfers and is stored in advance in BIOS memory space First code, and execute first code access electronics and set file in hard disk.Specifically, in embodiments of the present invention, it uses Family can carry out file operation by first code pre-stored in BIOS, and the process of such file operation is all in BIOS It is executed under code, so that OS can not view user to the specific operation process of file, and then ensure that user to the behaviour of file Make the safety of process.
Technical solution of the present invention is described in detail below by attached drawing and specific embodiment, it should be understood that this hair Particular technique feature in bright embodiment and embodiment is the explanation to technical solution of the present invention, rather than is limited, not In the case where conflict, the particular technique feature in the embodiment of the present invention and embodiment be can be combined with each other.
It is as shown in Figure 1 a kind of flow chart of data processing method in the embodiment of the present invention, this method is set using an electronics In standby, which has complete operating system and basic input-output system BIOS, this method comprises:
S101, basic input-output system BIOS are obtained to indicate that electronic equipment accesses electronic equipment by first code In file first instruction;
S102 transfers the first code being stored in advance in BIOS memory space, and execute the first generation based on the first instruction File in code access electronic equipment hard disk.
Specifically, the file operation of user in the electronic device is all based under the normal mode of operating system and carries out, User is recorded in some storage region of the electronic equipment operation of file at this time, but based under operating system The operation note stored under normal mode can be accessed by other electronic equipments, result in operation of the user to file operation in this way Record security is poor.
Therefore, in embodiments of the present invention, the New Technology File System (English: New of mainboard BIOS is modified first Technology File System, referred to as: NTFS) code, guarantee to access by BIOS with subsequent user in this way File in the hard disk of electronic equipment.
Specifically, in embodiments of the present invention, which modifies the NTFS code of BIOS first, so that after It is continuous file access to be carried out by BIOS.Secondly, also needing an independent memory space to protect in the electronic equipment User is deposited to the operational motion of file, that is, the code of access disk file.
In the electronic device, the distribution of memory space is indicated Memory Controller Hub by BIOS to complete, that is to say, that BIOS Specifically how the memory headroom in electronic equipment should be distributed to determine, then to Memory Controller Hub one instruction, to indicate Memory Controller Hub is allocated in deterministic fashion.The memory headroom in electronic equipment is assigned in Memory Controller Hub Later, the configuring condition of memory headroom is sent to BIOS by the Memory Controller Hub in the electronic equipment, and BIOS can know at this time The configuring condition of road current memory.
After BIOS determines the configuring condition of memory, which will be to operating system (Operating System, abbreviation OS) configuring condition of memory headroom is reported, under normal circumstances, BIOS can configure all memory headrooms Situation is reported to OS, and allows all memory headrooms for OS, is all visible, so all reading institutes can be used in OS There is the content saved in memory headroom.
But in embodiments of the present invention, when BIOS reports the configuring condition of memory headroom to OS, which will It is invisible that a part of memory headroom is configured to OS, that is to say, that the content stored in the partial memory space, OS can not be to them The operation for being read out or being written, for OS, which is inaccessible memory headroom.
Further, in embodiments of the present invention, in order to enable BIOS can timely call the first generation being stored in advance Code, therefore, in embodiments of the present invention, which can be stored in the firmware of BIOS, it may be assumed that in the ROM of BIOS.Here First code included at least access disk file code and/or be at least one application program code.
Specifically, when needing through BIOS to access file, the visit of file is carried out by the code in BIOS It asks, thus needs to transfer out the execution code in ROM, such as first code, the first code also need to be written to BIOS In a preconfigured memory headroom, for OS, which is sightless, so OS can not be to memory sky Between access, ensure that in this way by BIOS carry out disk file access safety.
For example, in embodiments of the present invention, there are an operating system OS, basic input and output in the electronic equipment System bios, there are one memory headrooms.
Firstly, the NTFS code in modification BIOS, so that BIOS is able to access that the file in hard disk, hard disk here includes Disk either solid state hard disk (English: Solid State Drives, referred to as: SSD).
System Management Mode (English: System Management Mode, abbreviation: SMM) is entered in the electronic equipment When, that is to say, that when the electronic equipment is switched under SMM mode, the user to the access of fixed disk file all directly by BIOS come It realizes, and carrys out the file in access hard disk not by file system.
Certainly, when electronic equipment enters SMM mode, the electronic equipment is to by BIOS/firmware pre-stored first Code is written in pre-configured memory headroom, which cannot see for OS, is being written to this After in memory headroom, which will transfer out the first code in the memory headroom, then visiting by first code Ask the file in hard disk, first code here is exactly file read-write driving, it may be assumed that accesses the code of disk file.
By above-mentioned explanation, at System Management Mode SMM, user can lead to the file access in the electronic equipment BIOS is crossed to realize, so that user is all based on the code in BIOS to the operation of file to carry out, so that electronics OS in equipment can not know the operating process to file of the user, so that the operation of file more has completeness.
Further, in order to enable electronic equipment can according to the demand of user between normal mode and SMM mode phase Mutually switching, therefore, electronic equipment are additionally provided with trigger device or the triggering software, the trigger device and triggering of a hardware Software can be triggered to switch to electronic equipment by the first preassigned pattern access file system and be visited by the second preassigned pattern Ask the switching command of file system.
Therefore, which can detect whether to exist in real time accesses file by the first preassigned pattern for electronic equipment System switches to the switching command that file system is accessed by the second preassigned pattern, the first preassigned pattern here be CPU just Normal operating mode, the second preassigned pattern are System Management Mode.Under the first preassigned pattern, it is by under OS that user, which accesses file, File system carry out.And under the second preassigned pattern, it is progress of being got off by SMM mode that user, which accesses file,.
Certainly, after detecting the switching command, which will switch to hard by the access of the second preassigned pattern File in disk.The mode for accessing file at this time is exactly to be realized by BIOS.
What needs to be explained here is that SMM is a standard architecture spy unified to all Intel processors Property, this mode realizes that the specified function of platform provides a kind of transparent mechanism for OS, be activated when external SMM interruption or When advanced programming interrupt control unit receives an interruption, processor will go into SMM.In the smm, when preservation is currently running When the entire context of program, processor is switched to the address space of a separation, and then SMM specified code is perhaps transparent Execution.When returning from SMM, processor be will be returned to by the state before system break.
Therefore, in embodiments of the present invention, under SMM mode, electronic equipment will stop the currently performed execution journey of CPU Sequence.That is, in user by BIOS to carry out file access when, the electronic equipment will generate one interruption, the interruption use Stop current execution program to trigger CPU.
Certainly, after the CPU in the electronic equipment stops executing current execution program, which will be real-time Detection accesses whether the file in electronic equipment is completed by first code, if should be accessed in electronic equipment by first code The operation of file when not completing, the CPU in the electronic equipment will continue to stop the execution of current execution program;If passing through When the operation of file in first code access electronic equipment has been completed, the CPU in the electronic equipment, which will restart, currently to be held Capable program, that is, once terminated by the process that first code accesses file, the CPU in the electronic equipment will restart The execution program terminated before.It can guarantee in this way so that the file operation that user carries out under SMM mode more has peace Quan Xing.
In addition, it should also be noted that, in embodiments of the present invention, in the memory headroom that OS cannot be identified, in addition to can Except code to save access hard disk file, application program can also be saved, such as the code of some test function programs, Can be tested process by BIOS in this way, so that checking procedure is more safe.
Such as some safety certificates can be stored in the memory headroom, when receiving a certain electronic equipment either When the checking command that a certain network server is sent, which can first switch to SMM mode, and then electronic equipment can The safety certificate in the memory headroom can be transferred out by BIOS, to terminate when program performed by CUP currently hold at this time Capable program.BIOS will execute the checking procedure of safety certificate at this time, after the verification of safety certificate is completed, the electronic equipment The program being terminated in CPU will be restarted.The safety check of safety certificate is ensured that in this way, not only can be mentioned Efficiency is risen, and the verification safety of safety certificate can also be promoted.
In embodiments of the present invention, when user needs to carry out the operation of file under safer environment, the electronics Equipment carries out the access of file by being switched under SMM mode, under the SMM mode, user passes through the operation of file BIOS is realized, so that OS is sightless to the operation of file, therefore improve the safety of file operation.
A kind of data processing method in the embodiment of the present invention is corresponded to, additionally provides a kind of data processing in the embodiment of the present invention Device is illustrated in figure 2 a kind of structural schematic diagram of data processing equipment in the embodiment of the present invention, the data processing equipment application Into an electronic equipment, which includes:
Module 201 is obtained, for obtaining to indicate that the electronic equipment accesses the electronic equipment by first code In file first instruction;
Execution module 202, for transferring the storage for being stored in advance in basic input output system based on first instruction The first code in space, and execute the first code and access file in the electronic equipment hard disk.
Further, in embodiments of the present invention, the data processing equipment further include:
Detection module, for detecting whether being cut in the presence of the electronic equipment is accessed file system by the first preassigned pattern Shift to the switching command that file system is accessed by the second preassigned pattern, wherein first preassigned pattern is the normal work of CPU Operation mode, second preassigned pattern are System Management Mode;
Switching module, for when detecting the switching command, the electronic equipment to be switched to by described second File in preassigned pattern access hard disk.
Further, in embodiments of the present invention, the execution module in the electronic equipment, comprising:
Detection unit for stopping the currently performed execution program of the CPU in the electronic equipment, and is detected by described First code accesses whether the file in the electronic equipment is completed;
Processing unit, for when detecting that the first code accesses the file completion in the electronic equipment, then weighing Open the execution program current in the CPU.
Further, in embodiments of the present invention, the first code in the data processing equipment is to access the generation of disk file Code and/or the code for running at least one application program.
Although the preferred embodiment of the application has been described, but one of ordinary skilled in the art once knows substantially Creative concept, then additional changes and modifications may be made to these embodiments.It is wrapped so the following claims are intended to be interpreted as It includes preferred embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (8)

1. a kind of data processing method, which is characterized in that be applied to an electronic equipment, which comprises
Basic input-output system BIOS is obtained to indicate that the electronic equipment accesses the electronic equipment by first code In file first instruction;
Based on first instruction, the first code being stored in advance in the BIOS memory space is transferred, and execute institute It states first code and accesses file in the electronic equipment hard disk;Wherein, the method also includes the first code is written Into the memory headroom of the pre-configured electronic equipment in case transferring, behaviour of the memory headroom to the electronic equipment It is invisible to make system.
2. the method as described in claim 1, which is characterized in that be used to indicate the electronic equipment in acquisition and pass through first code Before the first instruction for accessing the file in the electronic equipment, further includes:
It detects whether to exist that the electronic equipment is accessed file system and switched to by the first preassigned pattern and makes a reservation for by second The switching command of mode access file system, wherein first preassigned pattern be CPU normal mode of operation, described second Preassigned pattern is System Management Mode;
When detecting the switching command, the electronic equipment is switched to by the second preassigned pattern access hard disk File.
3. method according to claim 2, which is characterized in that transfer described in the setting memory space of the electronic equipment Code, and the file in the electronic equipment is accessed by the first code, comprising:
Stop the currently performed execution program of CPU in the electronic equipment, and detects by described in first code access Whether the file in electronic equipment is completed;
If completing, the execution program current in the CPU is restarted.
4. the method as described in claim 1, which is characterized in that the first code is specially the code for accessing disk file And/or run the code of at least one application program.
5. a kind of data processing equipment, which is characterized in that be applied in an electronic equipment, comprising:
Module is obtained, for obtaining the file accessed indicating the electronic equipment by first code in the electronic equipment First instruction;
Execution module, for transferring and being stored in advance in the memory space of basic input output system based on first instruction The first code, and execute the first code and access file in the electronic equipment hard disk;Wherein, at the data The first code is also written in the memory headroom of the pre-configured electronic equipment in case transfer by reason device, described Memory headroom is invisible to the operating system of the electronic equipment.
6. data processing equipment as claimed in claim 5, which is characterized in that further include:
Detection module, for detecting whether being switched in the presence of the electronic equipment is accessed file system by the first preassigned pattern The switching command of file system is accessed by the second preassigned pattern, wherein first preassigned pattern is the normal work mould of CPU Formula, second preassigned pattern are System Management Mode;
Switching module, for the electronic equipment being switched to and is made a reservation for by described second when detecting the switching command File in mode access hard disk.
7. data processing equipment as claimed in claim 6, which is characterized in that the execution module, comprising:
Detection unit for stopping the currently performed execution program of the CPU in the electronic equipment, and detects and passes through described first Whether the file in electronic equipment described in code access is completed;
Processing unit, for when detecting that the first code accesses the file completion in the electronic equipment, then restarting institute State the execution program current in CPU.
8. data processing equipment as claimed in claim 5, which is characterized in that the first code is to access the generation of disk file Code and/or the code for running at least one application program.
CN201510117009.5A 2015-03-17 2015-03-17 A kind of data processing method and device Active CN106033520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510117009.5A CN106033520B (en) 2015-03-17 2015-03-17 A kind of data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510117009.5A CN106033520B (en) 2015-03-17 2015-03-17 A kind of data processing method and device

Publications (2)

Publication Number Publication Date
CN106033520A CN106033520A (en) 2016-10-19
CN106033520B true CN106033520B (en) 2019-03-08

Family

ID=57150166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510117009.5A Active CN106033520B (en) 2015-03-17 2015-03-17 A kind of data processing method and device

Country Status (1)

Country Link
CN (1) CN106033520B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1330324A (en) * 2000-06-27 2002-01-09 株式会社东芝 Data processing unit and method for controlling overwrited by non-volatility storage device
JP2005128591A (en) * 2003-10-21 2005-05-19 Ricoh Co Ltd Security management method for document
CN101166562A (en) * 2005-02-24 2008-04-23 百利国际游戏有限公司 System and method for an alterable storage media in a gaming machine
US7506150B2 (en) * 2005-04-18 2009-03-17 Asmedia Technology Inc. Computer system and related method of playing audio files when booting
CN103946815A (en) * 2011-09-30 2014-07-23 英特尔公司 Method, system and apparatus for region access control

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI370394B (en) * 2008-09-19 2012-08-11 Asustek Comp Inc Computer, booting software production and method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1330324A (en) * 2000-06-27 2002-01-09 株式会社东芝 Data processing unit and method for controlling overwrited by non-volatility storage device
JP2005128591A (en) * 2003-10-21 2005-05-19 Ricoh Co Ltd Security management method for document
CN101166562A (en) * 2005-02-24 2008-04-23 百利国际游戏有限公司 System and method for an alterable storage media in a gaming machine
US7506150B2 (en) * 2005-04-18 2009-03-17 Asmedia Technology Inc. Computer system and related method of playing audio files when booting
CN103946815A (en) * 2011-09-30 2014-07-23 英特尔公司 Method, system and apparatus for region access control

Also Published As

Publication number Publication date
CN106033520A (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US11068277B2 (en) Memory allocation techniques at partially-offloaded virtualization managers
US10318737B2 (en) Secure booting of virtualization managers
US20180121366A1 (en) Read/write request processing method and apparatus
US10860332B2 (en) Multicore framework for use in pre-boot environment of a system-on-chip
US10445154B2 (en) Firmware-related event notification
US10127068B2 (en) Performance variability reduction using an opportunistic hypervisor
EP2787444A2 (en) Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
TW201015323A (en) Secure information processing
WO2018039967A1 (en) Virtual machine switching method and apparatus, electronic device, and computer program product
CN105094084B (en) Support the service and system that the coherence data on multinuclear controller accesses
EP3436947B1 (en) Secure driver platform
WO2019212696A1 (en) Multithread framework for use in pre-boot environment of a system-on-chip
CN114222975A (en) Data preservation using memory aperture flush sequence
CN107567629A (en) Dynamic firmware module loader in credible performing environment container
CN105940375A (en) Dynamic reassignment for multi-operating system devices
CN114741233A (en) Quick start method
US9699093B2 (en) Migration of virtual machine based on proximity to peripheral device in NUMA environment
CN114691300A (en) Hot migration method of virtual machine instance
CN107066331B (en) TrustZone-based resource allocation method and equipment
US20180157605A1 (en) Configuration of a memory controller for copy-on-write
CN105556461A (en) Techniques for pre-OS image rewriting to provide cross-architecture support, security introspection, and performance optimization
CN106033520B (en) A kind of data processing method and device
CN110321205B (en) Method and equipment for managing hosted program in hosted program
CN113238842A (en) Task execution method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant