Content of the invention
In view of this, the application provides a kind of multisystem communication method and terminal.
According to the one side of the embodiment of the present application, a kind of multisystem communication method is provided, is applied to terminal, wherein, describedTerminal is provided with least one first operating system and at least one second operating system, described first operating system and described theTwo operating systems are provided with shared drive, and methods described includes:Described first operating system and described second operating system are passed throughDescribed shared drive carries out the communication of data flow, and wherein, described first operating system and described second operating system are to described commonEnjoy internal memory and carry out exclusive reference.
Further, described first operating system and described second operating system carry out data flow by described shared driveCommunication include:
Described first operating system and described second operating system carry out data according to SMC instruction by described shared driveThe communication of stream;
Wherein, described SMC instructs is to carry out the instruction of multisystem communication for instruction, described first operating system and describedIn second operating system, one sends SMC instruction, another sound in described first operating system and described second operating systemIn SMC instruction, described shared drive should be locked, and obtain the access rights of described shared drive.
Further, described first operating system and described second operating system are passed through in described sharing according to SMC instructionThe communication depositing into row data flow includes:
When described first operating system has the access rights of described shared drive, described first operating system execution theOne operation, wherein, described first operation includes writing data flow and/or from described shared drive receive data to described shared driveAccording to stream;
When described first operating system completes the first operation, described first operating system is sent out to described second operating systemSMC is sent to instruct;
Second operating system is locked to described shared drive in response to SMC instruction, and obtains the access of described shared driveAuthority;
Second operating system execution the second operation, wherein, described second operation includes described from the reading of described shared driveData flow and/or to described shared drive write described data flow.
Further, methods described also includes:When described second operating system completes the second operation, described second operationFirst operating system described in system sends SMC instruction;
Described first operating system is locked to described shared drive in response to SMC instruction, and obtains described shared driveAccess rights.
Further, described first operating system is normal operating system;Second operating system is SOS.
According to the another aspect of the embodiment of the present application, provide a kind of terminal, wherein, described terminal be provided with least oneOne operating system and at least one second operating system, described first operating system and described second operating system are provided with sharedInternal memory, described first operating system and described second operating system carry out the communication of data flow by described shared drive, wherein,Described first operating system and described second operating system carry out exclusive reference to described shared drive.
Further, described first operating system and described second operating system are passed through in described sharing according to SMC instructionDeposit into the communication of row data flow;Wherein, described SMC instructs the instruction being to carry out multisystem communication for instruction, described first behaviourMake a transmission SMC instruction, described first operating system and described second operating system in system and described second operating systemIn another in response to SMC instruction, described shared drive is locked, and obtain the access rights of described shared drive.
Further, when described first operating system has the access rights of described shared drive, described first operationSystem execution first operation, wherein, described first operation includes writing data flow and/or from described shared to described shared driveMemory read data stream;When described first operating system completes the first operation, control described first operating system to described theTwo operating systems send SMC instruction;Second operating system is locked to described shared drive in response to SMC instruction, and obtains describedThe access rights of shared drive;Second operating system execution the second operation, wherein, described second operation is included in described sharingDeposit the described data flow of reading and/or write described data flow to described shared drive.
Further, when described second operating system completes the second operation, the first behaviour described in described second operating systemMake system and send SMC instruction;Described first operating system is locked to described shared drive in response to SMC instruction, and obtains describedThe access rights of shared drive.
Further, described first operating system is normal operating system, and described second operating system is safety operation systemSystem.
Multisystem communication method and terminal that the embodiment of the present application provides, logical by a Sharing Memory Realization data flowLetter, and by SMC instruction, shared drive is locked, only allow oneself shared drive to be accessed, it is to avoid multiple operating systems are sameWhen shared drive is written and read operating the hardware resource exceptions leading to.Further, one of multisystem system is madeFor SOS, process the system of the affairs of concerning security matters or privacy, improve the security performance of system.
Specific embodiment
Below based on embodiment, the application is described, but the application is not restricted to these embodiments.UnderLiterary composition in the detailed description of the application, detailed describes some specific detail sections.Do not have for a person skilled in the artThe description of these detail sections can also understand the application completely.In order to avoid obscuring the essence of the application, known method, mistakeJourney, flow process do not describe in detail.In addition accompanying drawing is not necessarily drawn to scale.
Flow chart in accompanying drawing, block diagram illustrate the system of the embodiment of the present application, method, the possible system frame of deviceFrame, function and operation, the square frame on flow chart and block diagram can represent a module, program segment or only one section of code, instituteState module, program segment and code to be all used to realize the executable instruction of regulation logic function.It should also be noted that described realize ruleThe executable instruction determining logic function can reconfigure, thus generating new module and program segment.Therefore accompanying drawing square frame withAnd square frame order is used only to preferably illustrate process and the step of embodiment, and should not be in this, as the limit to invention itselfSystem.
The multisystem communication method that the embodiment of the present application provides, it is adaptable to be provided with the terminal of multiple operating system, below hasBody is taking dual operating systems as a example.
Described terminal is provided with least one first operating system and at least one second operating system, described first operationSystem and described second operating system are provided with shared drive.Described first operating system and described second operating system pass through instituteState the communication that shared drive carries out data flow.
In the present embodiment, terminal can be the terminal such as smart mobile phone, panel computer.First operating system is in processing businessWhen, need the resource of the second operating system, then send, to the second operating system, the request obtaining resource requirement;Or the second operationSystem, in processing business, needs the resource of the first operating system, then send to the first operating system and obtain asking of resource requirementAsk.Wherein, described resource data can be for being stored in the data of described first operating system or the second operating system or through theResult data after one operating system or the process of the second operating system etc..
Wherein, described first operating system and described second operating system carry out exclusive reference to described shared drive, that is,When described first operating system conducts interviews to described shared drive, the second operating system can not be visited to described shared driveAsk;When described second operating system conducts interviews to described shared drive, described first operating system is to described shared driveCan not access.
Specifically, described first operating system and described second operating system are logical according to SMC (security monitoring calls) instructionCross the communication that described shared drive carries out data flow.
In the present embodiment, described SMC instructs the instruction being to carry out multisystem communication for instruction, described first operation systemIn system and described second operating system, one sends SMC instruction, in described first operating system and described second operating systemAnother is locked to described shared drive in response to SMC instruction, and obtains the access rights of described shared drive.With the first operationAs a example system is the operating system working, now the first operating system has the access rights to described shared drive, withShared drive described in Shi Suoding makes the second operating system cannot access, it is to avoid multisystem is written and read operating from shared drive simultaneouslyThe hardware anomalies causing.
Fig. 1 shows the multisystem communication method that the embodiment of the present application provides.Described multisystem communication method is applied to endEnd, wherein, described terminal is provided with least one first operating system and at least one second operating system, described first operationSystem and described second operating system are provided with shared drive.As shown in figure 1, this multisystem communication method comprises the following steps.
In step S01, when the first operating system has the access rights of shared drive, the first operating system execution theOne operation.
In the present embodiment, the first operation includes writing data flow and/or from shared drive reading data to shared driveStream.
In step S02, when the first operating system completes the first operation, the first operating system is sent out to the second operating systemSMC is sent to instruct.
In the present embodiment, when the first operating system completes the reading to shared drive and/write operation, the first operating systemSend SMC wake instruction second operating system to the second operating system, interrupt the control to shared drive for first operating system simultaneouslySystem power, i.e. access rights.
In step S03, the second operating system is locked to shared drive in response to SMC instruction, and obtains shared driveAccess rights.
In the present embodiment, the second operating system instructs, according to the SMC receiving, the access rights obtaining to shared drive,Locking shared drive makes the first operating system cannot access simultaneously.
In step S04, second operating system execution the second operation, wherein, the second operation includes reading from shared driveData flow and/or to shared drive write data flow.
In the present embodiment, the second operating system carries out to shared drive writing data according to SMC instruction or reads data.
In a preferred embodiment, step S01 is further comprising the steps of.
In step S05, when the second operating system completes the second operation, second operating system the first operating system sendsSMC instructs.
In the present embodiment, when the second operating system completes the reading to shared drive and/write operation, the second operating systemSend SMC wake instruction first operating system to the first operating system, interrupt the control to shared drive for second operating system simultaneouslySystem power, i.e. access rights.
In step S06, the first operating system is locked to shared drive in response to SMC instruction, and obtains shared driveAccess rights.
In the present embodiment, the first operating system obtains the access to described shared drive according to the SMC instruction receivingAuthority, lock described shared drive makes the second operating system cannot access simultaneously.
In a preferred embodiment, described first operating system is normal operating system;Second operating system is peaceFull operation system.
Specifically, Modem1 corresponds to draw-in groove SIM1 taking double card double standby mobile phone as a example, and Modem2 corresponds to draw-in groove SIM2, such as Fig. 1Shown it is assumed that the normal speech business datum (as ordinary contacts dialing, note or call etc.) of Modem1 and Modem2 is by theOne operating system is processed, and the important Voice traffic data of Modem1 and Modem2 is (as important relation people dialing, note or callDeng) processed by the second operating system, the first operating system judges whether to need the second operating system to process, when the first operation systemSystem judges that this business datum need to be processed in the second operating system, then send to the second operation this business datum through shared driveSystem, and send SMC instruction breaks first operating system to the second operating system, wake up the second operating system to process this businessData.Because the safe class of the second operating system is higher than the first operating system, therefore, it can reduce important data serviceThe loss of data and illegal leakage, and then improve the security performance of terminal.
The multisystem communication method that the embodiment of the present application provides, by the communication of a Sharing Memory Realization data flow, andAnd internal storage access notice is sent using SMC instruction, notify shared drive is locked according to described internal storage access, only allow oneself rightShared drive accesses, it is to avoid multiple operating systems are written and read to shared drive operating the hardware resource exceptions leading to simultaneously.MoreFurther, using one of multisystem system as security system, process the system of the affairs of concerning security matters or privacy, improve systemSecurity performance.
Fig. 2 shows the structural representation of the terminal according to the embodiment of the present application.As shown in Fig. 2 this terminal includes firstOperating system 10, the second operating system 20 and shared drive 30.
Wherein, described first operating system 10 and described second operating system 20 carry out data flow by shared drive 30Communication, wherein, described first operating system 10 and described second operating system 20 carry out exclusive reference to described shared drive 30.
In the present embodiment, terminal can be the terminal such as smart mobile phone, panel computer.First operating system 10 is processing industryDuring business, need the resource of the second operating system 20, then the request of the acquisition resource requirement sending to the second operating system 20;OrSecond operating system 20, in processing business, needs the resource of the first operating system 10, then sends to the first operating system 10Obtain the request of resource requirement.Wherein, described resource data can be for being stored in described first operating system 10 or the second operationThe data of system 20 or the result data after the first operating system 10 or the second operating system 20 are processed etc..
Wherein, described first operating system 10 and described second operating system 20 carry out mutual exclusion visit to described shared drive 30Ask.I.e. when described first operating system 10 conducts interviews to described shared drive 30, the second operating system 20 is to shared drive30 can not access;When described second operating system 20 conducts interviews to described shared drive 30, described first operating system 10Described shared drive 30 can not be accessed.
Specifically, described first operating system 10 and described second operating system 20 refer to according to SMC (security monitoring calls)Order carries out the communication of data flow by described shared drive 30.
In the present embodiment, described SMC instructs the instruction being to carry out multisystem communication for instruction, described first operation systemIn system 10 and described second operating system 20, one sends SMC instruction, described first operating system 10 and described second operation systemAnother in system 20 is locked to described shared drive 30 in response to SMC instruction, and obtains the access right of described shared drive 30Limit.So that the first operating system 10 is the operating system working as a example, now the first operating system 10 has to described sharedThe access rights of internal memory 30, lock described shared drive 30 makes the second operating system 20 cannot access simultaneously, it is to avoid multisystem is sameWhen be written and read operating the hardware anomalies causing from shared drive 30.
Described first operating system 10 and described second operating system 20 are entered by described shared drive 30 according to SMC instructionThe communication of row data flow;
When described first operating system 10 has the access rights of described shared drive 30, described first operating system 10Execution first operation, wherein, described first operation includes writing data flow and/or in described sharing to described shared drive 30Deposit 30 reading data flows;When described first operating system 10 completes the first operation, described first operating system 10 is to describedTwo operating system 20 sends SMC instruction;Second operating system 20 is locked to described shared drive 30 in response to SMC instruction, and obtainsObtain the access rights of described shared drive 30;Second operating system 20 execution second operation, wherein, described second operation include fromDescribed shared drive 30 reads described data flow and/or writes described data flow to described shared drive 30.
When described second operating system 20 completes the second operation, the first operating system described in described second operating system 2010 send SMC instruction;Described first operating system 10 is locked to described shared drive 30 in response to SMC instruction, and obtains describedThe access rights of shared drive 30.
In a preferred embodiment, described first operating system 10 is normal operating system, described second operation systemSystem 20 is SOS.
The terminal that the embodiment of the present application provides, realizes data flow between multiple operating systems by a shared drive 30Communication, and internal storage access notice is sent using SMC instruction, notify shared drive 30 is locked according to described internal storage access, keep awayExempt from multiple operating systems shared drive 30 to be written and read operating the hardware resource exceptions leading to simultaneously.Further, will be manyOne of system system, as security system, processes the system of the affairs of concerning security matters or privacy, improves the security performance of system.
Professional should further appreciate that, each example describing in conjunction with the embodiments described hereinUnit and algorithm steps, can be hard in order to clearly demonstrate with electronic hardware, computer software or the two be implemented in combination inPart and the interchangeability of software, generally describe composition and the step of each example in the above description according to function.These functions to be executed with hardware or software mode actually, the application-specific depending on technical scheme and design constraint.Professional and technical personnel can use different methods to each specific application realize described function, but this realizationIt is not considered that exceeding scope of the present application.
The step of the method in conjunction with the embodiments described herein description or algorithm can be with hardware, computing deviceSoftware module, or the combination of the two is implementing.Software module can be placed in random access memory (RAM), internal memory, read-only storage(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical fieldIn interior known any other form of storage medium.
According to embodiments herein as described above, these embodiments do not have all of details of detailed descriptionthe, not yetLimit the specific embodiment that this invention is only described.Obviously, as described above, can make many modifications and variations.This explanationBook is chosen and is specifically described these embodiments, is to preferably explain the principle of the application and practical application, so that affiliatedTechnical field technical staff can utilize the application and the modification on the basis of the application to use well.The protection model of the applicationEnclose and should be defined by the scope that the application claim is defined.