[go: up one dir, main page]

CN110119637B - Hardware control method and hardware control system - Google Patents

Hardware control method and hardware control system Download PDF

Info

Publication number
CN110119637B
CN110119637B CN201810121494.7A CN201810121494A CN110119637B CN 110119637 B CN110119637 B CN 110119637B CN 201810121494 A CN201810121494 A CN 201810121494A CN 110119637 B CN110119637 B CN 110119637B
Authority
CN
China
Prior art keywords
physical address
address
hardware
extended physical
extended
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
CN201810121494.7A
Other languages
Chinese (zh)
Other versions
CN110119637A (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.)
MediaTek Inc
Original Assignee
MediaTek Inc
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 MediaTek Inc filed Critical MediaTek Inc
Priority to CN201810121494.7A priority Critical patent/CN110119637B/en
Publication of CN110119637A publication Critical patent/CN110119637A/en
Application granted granted Critical
Publication of CN110119637B publication Critical patent/CN110119637B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Storage Device Security (AREA)

Abstract

A hardware control method and a hardware control system are provided. The hardware control method is used for controlling at least one functional circuit by an operating system. The hardware control method includes the following steps. A first virtual address and a second virtual address from the operating system are respectively converted into a first intermediate address and a second intermediate address. The first intermediate address and the second intermediate address are respectively converted into a first extended physical address and a second extended physical address. The starting point of the first extended physical address is separated from the starting point of the second extended physical address by a distance. The first extended physical address and the second extended physical address are respectively converted into a first hardware physical address and a second hardware physical address. The first hardware physical address is adjacent to the second hardware physical address.

Description

硬件控制方法与硬件控制系统Hardware control method and hardware control system

技术领域technical field

本发明是有关于一种控制方法与控制系统,且特别是有关于一种受虚拟机控制的开关的硬件控制方法与硬件控制系统。The present invention relates to a control method and a control system, and in particular to a hardware control method and a hardware control system of a switch controlled by a virtual machine.

背景技术Background technique

随着科技的进步,各式电子产品不断推陈出新。许多的电子产品搭载各种功能电路,以实现各种功能。在信息安全的要求下,需要对各个功能电路进行权限的控制。对应于不同的操作系统,仅启用其需要的功能电路,并禁用不得使用的功能电路。With the advancement of science and technology, various electronic products are constantly being introduced. Many electronic products are equipped with various functional circuits to realize various functions. Under the requirements of information security, it is necessary to control the authority of each functional circuit. Corresponding to different operating systems, only the required functional circuits are enabled, and the unusable functional circuits are disabled.

传统上,请参照图1,其绘示操作系统OS11、OS12与开关R10、R11、R12、R13、R15、R16的对应关系的示意图。每个开关R10、R11、R12、R13、R15、R16是对应于特定功能电路的部分或全部功能。操作系统OS11对应于其可使用的功能电路,而被允许使用开关R11、R12、R16;操作系统OS12对应于其可使用的功能电路,而被允许使用开关R13、R15、R10。Conventionally, please refer to FIG. 1 , which shows a schematic diagram of the corresponding relationship between the operating systems OS11 , OS12 and the switches R10 , R11 , R12 , R13 , R15 , and R16 . Each switch R10, R11, R12, R13, R15, R16 corresponds to a part or all of the functions of a specific function circuit. The operating system OS11 is allowed to use the switches R11 , R12 , and R16 corresponding to its usable functional circuits; the operating system OS12 is allowed to use the switches R13 , R15 , and R10 corresponding to its usable functional circuits.

如图1所示,转换电路420根据操作系统OS12的控制指令查询到开关R10被允许使用。请参照图2,其绘示开关R10~R17与硬件物理地址PA’的对应关系的示意图。硬件物理地址PA’是对应一个页面大小(page size)。由于在搭配虚拟机控制开关时,转换电路420的操作是以一个页面大小为单位,这使得转换电路420针对开关R10所提供的硬件物理地址PA’同时对应到应该被禁用的开关R11、R12,造成本来应该被禁用的特定功能电路的部分或全部功能被允许使用,进而导致信息安全的漏洞产生。As shown in FIG. 1 , the conversion circuit 420 finds that the switch R10 is allowed to be used according to the control instruction of the operating system OS12 . Please refer to FIG. 2 , which shows a schematic diagram of the corresponding relationship between the switches R10-R17 and the hardware physical address PA'. The hardware physical address PA' corresponds to a page size. Since the operation of the conversion circuit 420 is based on a page size when the virtual machine control switch is used, this makes the hardware physical address PA' provided by the conversion circuit 420 for the switch R10 correspond to the switches R11 and R12 that should be disabled at the same time. Part or all of the functions of the specific functional circuit that should have been disabled are allowed to be used, thereby causing a loophole in information security.

发明内容Contents of the invention

本发明是有关于一种硬件控制方法与硬件控制系统,其利用延伸物理地址的设计,让操作系统提供的控制指令仅仅会启用一个开关,而不会启用应该禁用的其他开关,不会造成信息安全的漏洞。The present invention relates to a hardware control method and a hardware control system, which utilizes the design of extended physical addresses, so that the control instructions provided by the operating system will only enable one switch, and will not enable other switches that should be disabled, and will not cause information security breach.

根据本发明的第一方面,提出一种硬件控制方法。该硬件控制方法用来供一操作系统控制至少一功能电路。该硬件控制方法包括以下步骤。分别转换来自该操作系统的一第一虚拟地址与一第二虚拟地址为一第一中间地址与一第二中间地址。分别转换该第一中间地址与该第二中间地址为一第一延伸物理地址与一第二延伸物理地址。该第一延伸物理地址的起点与该第二延伸物理地址的起点间隔一间距。分别转换该第一延伸物理地址与该第二延伸物理地址为一第一硬件物理地址与一第二硬件物理地址。该第一硬件物理地址相邻于该第二硬件物理地址。分别决定该第一硬件物理地址与该第二硬件物理地址对应的一第一开关与一第二开关的状态。依据该第一开关与该第二开关的状态控制该至少一功能电路。According to a first aspect of the present invention, a hardware control method is proposed. The hardware control method is used for an operating system to control at least one functional circuit. The hardware control method includes the following steps. A first virtual address and a second virtual address from the operating system are respectively translated into a first intermediate address and a second intermediate address. Converting the first intermediate address and the second intermediate address into a first extended physical address and a second extended physical address respectively. The starting point of the first extended physical address is separated from the starting point of the second extended physical address by a distance. Converting the first extended physical address and the second extended physical address into a first hardware physical address and a second hardware physical address respectively. The first hardware physical address is adjacent to the second hardware physical address. The states of a first switch and a second switch corresponding to the first hardware physical address and the second hardware physical address are respectively determined. The at least one functional circuit is controlled according to the states of the first switch and the second switch.

根据本发明的第二方面,提出一种硬件控制系统。该硬件控制系统用来供一操作系统控制至少一功能电路。该硬件控制系统包括一第一转换电路、一第二转换电路及一分析电路。该第一转换电路用以分别转换来自该操作系统的一第一虚拟地址与一第二虚拟地址为一第一中间地址与一第二中间地址。该第二转换电路,用以分别转换该第一中间地址与该第二中间地址为一第一延伸物理地址与一第二延伸物理地址,该第一延伸物理地址的起点与该第二延伸物理地址的起点间隔一间距。该分析电路用以分别转换该第一延伸物理地址与该第二延伸物理地址为一第一硬件物理地址与一第二硬件物理地址。该第一硬件物理地址相邻于该第二硬件物理地址。该分析电路更分别决定该第一硬件物理地址与该第二硬件物理地址对应的一第一开关与一第二开关的状态,且依据该第一开关与该第二开关的状态控制该至少一功能电路。According to a second aspect of the present invention, a hardware control system is proposed. The hardware control system is used for an operating system to control at least one functional circuit. The hardware control system includes a first conversion circuit, a second conversion circuit and an analysis circuit. The first conversion circuit is used for respectively converting a first virtual address and a second virtual address from the operating system into a first intermediate address and a second intermediate address. The second conversion circuit is used to respectively convert the first intermediate address and the second intermediate address into a first extended physical address and a second extended physical address, the starting point of the first extended physical address and the second extended physical address The start of the address is separated by a gap. The analysis circuit is used for respectively converting the first extended physical address and the second extended physical address into a first hardware physical address and a second hardware physical address. The first hardware physical address is adjacent to the second hardware physical address. The analysis circuit further determines the states of a first switch and a second switch corresponding to the first hardware physical address and the second hardware physical address, and controls the at least one switch according to the states of the first switch and the second switch. functional circuit.

为了对本发明的上述及其他方面有更佳的了解,下文特举实施例,并配合所附图式详细说明如下:In order to have a better understanding of the above-mentioned and other aspects of the present invention, the following specific examples are given in detail with the accompanying drawings as follows:

附图说明Description of drawings

图1绘示操作系统与开关的对应关系的示意图。FIG. 1 is a schematic diagram illustrating the corresponding relationship between an operating system and a switch.

图2绘示多个开关与多个硬件物理地址的对应关系的示意图。FIG. 2 is a schematic diagram illustrating the corresponding relationship between a plurality of switches and a plurality of hardware physical addresses.

图3绘示开关的硬件控制系统的示意图。FIG. 3 is a schematic diagram of a hardware control system of a switch.

图4绘示根据一实施例的开关的硬件控制方法的流程图。FIG. 4 is a flowchart of a hardware control method of a switch according to an embodiment.

图5绘示操作系统与开关的对应关系。FIG. 5 shows the corresponding relationship between the operating system and the switches.

图6绘开关与延伸物理地址的对照图。FIG. 6 is a comparison diagram of switches and extended physical addresses.

图7绘开关与硬件物理地址的对照图。FIG. 7 is a comparison diagram of switches and hardware physical addresses.

图8绘示根据另一实施例的虚拟机的开关的硬件控制系统的示意图。FIG. 8 is a schematic diagram of a hardware control system of a switch of a virtual machine according to another embodiment.

图9绘示根据另一实施例的虚拟机的开关的硬件控制方法的流程图。FIG. 9 is a flowchart of a hardware control method for a switch of a virtual machine according to another embodiment.

符号说明Symbol Description

100、200:硬件控制系统100, 200: hardware control system

110:第一转换电路110: The first conversion circuit

120:第二转换电路120: Second conversion circuit

130、230:分析电路130, 230: Analysis circuit

231:判断电路231: Judgment circuit

232:映射电路232: Mapping circuit

420:转换电路420: conversion circuit

600:开关600: switch

A0:起始地址A0: start address

EPA1、EPA2:延伸物理地址EPA1, EPA2: extended physical address

GP:间距GP: Spacing

ID:标识符ID: identifier

IPA1、IPA2:中间地址IPA1, IPA2: Intermediate address

LUT:查找表LUT: look-up table

OS、OS11、OS12、OS21、OS22:操作系统OS, OS11, OS12, OS21, OS22: operating system

PA、PA’:硬件物理地址PA, PA': hardware physical address

R10、R11、R12、R13、R14、R15、R16、R17、R20、R21、R22、R23、R24、R25、R26、R27:开关R10, R11, R12, R13, R14, R15, R16, R17, R20, R21, R22, R23, R24, R25, R26, R27: switch

S110、S120、S130、S230、S231、S232、S233:步骤S110, S120, S130, S230, S231, S232, S233: steps

VA1、VA2:虚拟地址VA1, VA2: virtual address

具体实施方式Detailed ways

以下实施例提供硬件控制方法与硬件控制系统的各种实施方式,其利用延伸物理地址的设计,让操作系统提供的控制指令仅仅会启用一个开关,而不会启用应该禁用的其他开关,不会造成信息安全的漏洞。The following embodiments provide various implementations of hardware control methods and hardware control systems, which use the design of extended physical addresses, so that the control instructions provided by the operating system will only enable one switch, and will not enable other switches that should be disabled. Create information security loopholes.

请参照图3,其绘示受虚拟机控制的开关的硬件控制系统100的示意图。硬件控制系统100包括一第一转换电路110、一第二转换电路120及一分析电路130。第一转换电路110、第二转换电路120及分析电路130例如是一芯片、一电路板、一固件电路、或一芯片内的电路模块。以下进一步参照流程图详细说明各项元件的运作方式。Please refer to FIG. 3 , which is a schematic diagram of a hardware control system 100 for a switch controlled by a virtual machine. The hardware control system 100 includes a first conversion circuit 110 , a second conversion circuit 120 and an analysis circuit 130 . The first conversion circuit 110 , the second conversion circuit 120 and the analysis circuit 130 are, for example, a chip, a circuit board, a firmware circuit, or a circuit module in a chip. The operation mode of each element will be described in detail below with reference to the flow chart.

请参照图4,其绘示根据一实施例的开关的硬件控制方法的流程图。首先,在步骤S110中,第一转换电路110分别转换二虚拟地址(virtual address)VA1、VA2为二中间地址(intermediate physical address)IPA1、IPA2。其中虚拟地址VA1、VA2是由虚拟机(未绘示)依据一操作系统OS的一指令产生。Please refer to FIG. 4 , which is a flow chart of a hardware control method for a switch according to an embodiment. First, in step S110, the first conversion circuit 110 respectively converts two virtual addresses VA1 and VA2 into two intermediate physical addresses IPA1 and IPA2. The virtual addresses VA1 and VA2 are generated by a virtual machine (not shown) according to an instruction of an operating system OS.

第一转换电路110接着将中间地址IPA1、IPA2传送至第二转换电路120。The first conversion circuit 110 then transmits the intermediate addresses IPA1 , IPA2 to the second conversion circuit 120 .

在步骤S120中,第二转换电路120依据该中间地址IPA1、IPA2与该操作系统OS的一标识符ID进行查找,以分别转换中间地址IPA1、IPA2为二延伸物理地址(extendedphysical address)EPA1、EPA2。延伸物理地址EPA1的起点与延伸物理地址EPA2的起点间隔一间距GP(绘示于图6)。请参照图5,其绘示操作系统OS21、OS22与开关R20、R21、R22、R23、R25、R26的对应关系的示意图。每个开关R20、R21、R22、R23、R25、R26是对应于特定功能电路的部分或全部功能。开关R20、R21、R22、R23、R25、R26可为一存储器或一缓存器。操作系统OS21对应于其可使用的功能电路,而被允许使用开关R21、R22、R26;操作系统OS22对应于其可使用的功能电路,而被允许使用开关R23、R25、R20。In step S120, the second conversion circuit 120 searches according to the intermediate addresses IPA1, IPA2 and an identifier ID of the operating system OS, to respectively convert the intermediate addresses IPA1, IPA2 into two extended physical addresses (extended physical address) EPA1, EPA2 . The starting point of the extended physical address EPA1 and the starting point of the extended physical address EPA2 are separated by a distance GP (shown in FIG. 6 ). Please refer to FIG. 5 , which shows a schematic diagram of the corresponding relationship between the operating systems OS21 , OS22 and the switches R20 , R21 , R22 , R23 , R25 , and R26 . Each switch R20, R21, R22, R23, R25, R26 corresponds to a part or all of the functions of a specific function circuit. The switches R20, R21, R22, R23, R25, R26 can be a memory or a register. The operating system OS21 is allowed to use the switches R21 , R22 , and R26 corresponding to its usable functional circuits; the operating system OS22 is allowed to use the switches R23 , R25 , and R20 corresponding to its usable functional circuits.

在本实施例中,第二转换电路120根据操作系统OS22提供的虚拟地址VA1查询到开关R20被允许使用。请参照图6,其绘开关R20、R21与R22与延伸物理地址EPA1的对照图。延伸物理地址EPA1对应于拉开一间距GP的开关R20,且间距GP大于第二转换电路120的一页面大小(page size),例如是4KB。如此一来,延伸物理地址EPA1仅会对应于一个开关(例如是上述的开关R20),而不会对应到应该禁用的开关R21与R22。在此步骤中,第二转换电路120可以依据一查找表LUT转换中间地址IPA1为延伸物理地址EPA1,且该查找表LUT可由该虚拟机于开机时写入。请注意,在本实施例中,每个开关R20、R21、R22、R23、R25、R26对应的硬件物理地址(hardware physical address)PA并没有改变,而是每个开关R20、R21、R22、R23、R25、R26对应的延伸物理地址EPA1的长度为间距GP。In this embodiment, the second converting circuit 120 finds that the switch R20 is allowed to be used according to the virtual address VA1 provided by the operating system OS22. Please refer to FIG. 6 , which shows a comparison diagram of the switches R20 , R21 and R22 and the extended physical address EPA1 . The extended physical address EPA1 corresponds to the switch R20 separated by a distance GP, and the distance GP is greater than a page size of the second conversion circuit 120, for example, 4KB. In this way, the extended physical address EPA1 only corresponds to one switch (such as the above-mentioned switch R20 ), but does not correspond to the switches R21 and R22 that should be disabled. In this step, the second conversion circuit 120 can convert the intermediate address IPA1 into the extended physical address EPA1 according to a lookup table LUT, and the lookup table LUT can be written by the virtual machine when it is powered on. Please note that in this embodiment, the hardware physical address (hardware physical address) PA corresponding to each switch R20, R21, R22, R23, R25, R26 has not changed, but each switch R20, R21, R22, R23 The length of the extended physical address EPA1 corresponding to , R25 and R26 is the distance GP.

或者,在另一实施例中,第二转换电路120可透过一计算式转换中间地址IPA1、IPA2为延伸物理地址EPA1、EPA2。Or, in another embodiment, the second conversion circuit 120 can convert the intermediate addresses IPA1 and IPA2 into the extended physical addresses EPA1 and EPA2 through a calculation formula.

接着,在步骤S130中,分析电路130分别转换延伸物理地址EPA1、EPA2为二硬件物理地址PA1、PA2。请参照图7,其绘开关R20~R27与硬件物理地址PA1、PA2的对照图。分析电路130可以将延伸物理地址EPA1、EPA2转换为仅对应一个开关的硬件物理地址PA1、PA2。在此步骤中,分析电路130可以依据查找表LUT转换延伸物理地址EPA1、EPA2为硬件物理地址PA1、PA2。或者,在另一实施例中,分析电路130可以透过一计算式转换延伸物理地址EPA1、EPA2为硬件物理地址PA1、PA2。Next, in step S130 , the analysis circuit 130 respectively converts the extended physical addresses EPA1 and EPA2 into two hardware physical addresses PA1 and PA2 . Please refer to FIG. 7 , which shows a comparison diagram of switches R20 - R27 and hardware physical addresses PA1 and PA2 . The analysis circuit 130 can convert the extended physical addresses EPA1, EPA2 into hardware physical addresses PA1, PA2 corresponding to only one switch. In this step, the analysis circuit 130 can convert the extended physical addresses EPA1 and EPA2 into hardware physical addresses PA1 and PA2 according to the look-up table LUT. Or, in another embodiment, the analysis circuit 130 can convert the extended physical addresses EPA1 and EPA2 into hardware physical addresses PA1 and PA2 through a calculation formula.

然后,在步骤S140中,分析电路130分别决定硬件物理地址PA1、PA2对应的开关R20、R21的状态。Then, in step S140 , the analysis circuit 130 determines the states of the switches R20 and R21 corresponding to the hardware physical addresses PA1 and PA2 respectively.

并且,在步骤S150中,分析电路130依据开关R20、R21的状态控制至少一功能电路。开关与功能电路的关系可以是一对一关系、多对一关系、或多对多关系。Moreover, in step S150 , the analysis circuit 130 controls at least one functional circuit according to the states of the switches R20 and R21 . The relationship between switches and functional circuits may be one-to-one, many-to-one, or many-to-many.

如图3所示,透过硬件物理地址PA1,即可启用对应的开关600,并进而运行对应开关600的功能电路(未绘示)。As shown in FIG. 3 , through the hardware physical address PA1 , the corresponding switch 600 can be enabled, and then the functional circuit (not shown) corresponding to the switch 600 can be run.

如此一来,透过延伸物理地址EPA1的设计,操作系统OS提供的控制指令仅仅会启用一个该被允许使用的开关,而不会启用应该禁用的其他开关,不会造成信息安全的漏洞,解决了先前技术的问题。In this way, by extending the design of the physical address EPA1, the control command provided by the operating system OS will only enable a switch that should be allowed to be used, but will not enable other switches that should be disabled, and will not cause information security loopholes. problems with prior art.

请参照图8,其绘示根据另一实施例的开关的硬件控制系统200的示意图。在此实施例中,分析电路230包括一判断电路231以及一映射电路232,其余相同之处不再重复叙述。Please refer to FIG. 8 , which shows a schematic diagram of a switch hardware control system 200 according to another embodiment. In this embodiment, the analyzing circuit 230 includes a judging circuit 231 and a mapping circuit 232 , and the rest of the similarities will not be described again.

请参照图9,其绘示根据另一实施例的开关的硬件控制方法的流程图。在本实施例中,转换延伸物理地址EPA1、EPA2为硬件物理地址PA1、PA2的步骤S230包括步骤S231、步骤S232及步骤S233。Please refer to FIG. 9 , which is a flow chart of a hardware control method of a switch according to another embodiment. In this embodiment, the step S230 of converting the extended physical addresses EPA1 and EPA2 into hardware physical addresses PA1 and PA2 includes step S231 , step S232 and step S233 .

如图6所示,第一延伸物理地址EPA1与第二延伸物理地址EPA2具有共同的一起始地址A0。在步骤S231中,判断电路231判断延伸物理地址EPA1、EPA2是否大于起始地址A0加上间距GP的地址。若延伸物理地址EPA1、EPA2大于起始地址加上间距GP的地址,则进入步骤S232;若延伸物理地址EPA1、EPA2不大于起始地址加上间距GP的地址,则进入步骤S233。由于对应第二个以后的开关R21~R27的延伸物理地址(例如是延伸物理地址EPA2)之间均被拉开间距GP,故只有对应第一个开关R20的延伸物理地址EPA1未改变。延伸物理地址EPA1不大于起始地址加上间距GP的地址,故表示延伸物理地址EPA1是对应到第一个开关R20。As shown in FIG. 6 , the first extended physical address EPA1 and the second extended physical address EPA2 have a common starting address A0 . In step S231 , the judging circuit 231 judges whether the extended physical addresses EPA1 , EPA2 are greater than the starting address A0 plus the address of the distance GP. If the extended physical address EPA1, EPA2 is greater than the initial address plus the address of the distance GP, then enter step S232; if the extended physical address EPA1, EPA2 is not greater than the initial address plus the address of the distance GP, then enter step S233. Since the extended physical addresses corresponding to the second and subsequent switches R21 - R27 (for example, the extended physical address EPA2 ) are separated by a distance GP, only the extended physical address EPA1 corresponding to the first switch R20 remains unchanged. The extended physical address EPA1 is not greater than the initial address plus the address of the gap GP, so the extended physical address EPA1 corresponds to the first switch R20.

在步骤S233中,分析电路230直接以延伸物理地址EPA1作为硬件物理地址PA1。In step S233 , the analysis circuit 230 directly uses the extended physical address EPA1 as the hardware physical address PA1 .

在步骤S232中,判断电路231传送延伸物理地址EPA2至映射电路232。映射电路232映射延伸物理地址EPA2为一重映射物理地址(remapping physical address),分析电路230以重映射物理地址作为硬件物理地址PA2。In step S232 , the judging circuit 231 transmits the extended physical address EPA2 to the mapping circuit 232 . The mapping circuit 232 maps the extended physical address EPA2 into a remapping physical address, and the analysis circuit 230 uses the remapping physical address as the hardware physical address PA2.

也就是说,当延伸物理地址EPA1是对应到第一个开关R20时,则无须进行转换,如此可以加速处理的速度。That is to say, when the extended physical address EPA1 is corresponding to the first switch R20, no conversion is required, which can speed up the processing speed.

上述各种实施例提供了延伸物理地址EPA1、EPA2的设计,让操作系统OS提供的控制指令仅仅会启用一个被允许使用的开关,而不会启用应该禁用的其他开关,不会造成信息安全的漏洞。The above-mentioned various embodiments provide the design of extending the physical address EPA1, EPA2, so that the control command provided by the operating system OS will only enable a switch that is allowed to be used, and will not enable other switches that should be disabled, and will not cause information security. loophole.

综上所述,虽然本发明已以实施例揭露如上,然其并非用以限定本发明。本领域的技术人员,在不脱离本发明的精神和范围内,当可作各种的更动与润饰。因此,本发明的保护范围当视后附的申请权利要求书所界定者为准。To sum up, although the present invention has been disclosed by the above embodiments, it is not intended to limit the present invention. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention should be defined by the appended application claims.

Claims (16)

1. A hardware control method for an operating system to control at least one functional circuit, the hardware control method comprising:
respectively converting a first virtual address and a second virtual address from the operating system into a first intermediate address and a second intermediate address;
converting the first intermediate address and the second intermediate address into a first extended physical address and a second extended physical address respectively, wherein a starting point of the first extended physical address and a starting point of the second extended physical address are separated by a distance, wherein the step of converting the first intermediate address into the first extended physical address is performed by a conversion circuit, and the distance is larger than or equal to a page size of the conversion circuit;
respectively converting the first extended physical address and the second extended physical address into a first hardware physical address and a second hardware physical address, wherein the first hardware physical address is adjacent to the second hardware physical address;
respectively determining the states of a first switch and a second switch corresponding to the first hardware physical address and the second hardware physical address; and
and controlling the at least one functional circuit according to the states of the first switch and the second switch.
2. The hardware control method of claim 1 wherein the first extended physical address corresponds to only one of the first switches and the second extended physical address corresponds to only one of the second switches.
3. The hardware control method of claim 1 wherein the first extended physical address and the second extended physical address are ordered from a common starting address, the hardware control method further comprising:
judging whether the first extended physical address is larger than the address of the initial address plus the distance; and
if the first extended physical address is not greater than the starting address plus the space, the step of converting the first extended physical address to the first hardware physical address uses the first extended physical address as the first hardware physical address.
4. The hardware control method of claim 1 wherein the pitch is greater than or equal to 4KB.
5. The hardware control method of claim 1 wherein the step of converting the first intermediate address to the first extended physical address is based on a lookup table.
6. The hardware control method of claim 5 wherein the virtual address is generated by the operating system via a virtual machine according to an instruction, and the lookup table is generated via the virtual machine.
7. The hardware control method of claim 1 wherein the step of converting the first intermediate address to the first extended physical address is based on an identifier corresponding to the operating system.
8. The hardware control method of claim 1 wherein the step of converting the first intermediate address to the first extended physical address is computationally based.
9. A hardware control system for an operating system to control at least one functional circuit, the hardware control system comprising:
a first conversion circuit for converting a first virtual address and a second virtual address from the operating system into a first intermediate address and a second intermediate address, respectively;
a second conversion circuit for converting the first intermediate address and the second intermediate address into a first extended physical address and a second extended physical address, respectively, wherein the start point of the first extended physical address and the start point of the second extended physical address are separated by a distance, and the distance is greater than or equal to a page size of the second conversion circuit; and
an analyzing circuit for converting the first extended physical address and the second extended physical address into a first hardware physical address and a second hardware physical address, respectively, wherein the first hardware physical address is adjacent to the second hardware physical address; the analysis circuit further determines states of a first switch and a second switch corresponding to the first hardware physical address and the second hardware physical address respectively, and controls the at least one functional circuit according to the states of the first switch and the second switch.
10. The hardware control system of claim 9 wherein the first extended physical address corresponds to only one of the first switches and the second extended physical address corresponds to only one of the second switches.
11. The hardware control system of claim 9 wherein the first extended physical address and the second extended physical address are ordered from a common starting address, the analyzing circuit comprising:
and the judging circuit is used for judging whether the first extended physical address is larger than the address of the initial address plus the interval or not, and if the first extended physical address is not larger than the address of the initial address plus the interval, the first extended physical address is used as the first hardware physical address.
12. The hardware control system of claim 9 wherein the pitch is 4KB.
13. The hardware control system of claim 9 wherein said second translation circuit translates said first intermediate address to said first extended physical address according to a lookup table.
14. The system of claim 13, wherein the virtual address is generated by the operating system via a virtual machine according to an instruction, and the lookup table is generated via the virtual machine.
15. The hardware control system of claim 9 wherein the second translation circuit translates according to an identifier corresponding to the operating system.
16. The hardware control system of claim 9 wherein said second translation circuit translates said first intermediate address to said first extended physical address in a computational formula.
CN201810121494.7A 2018-02-07 2018-02-07 Hardware control method and hardware control system Active CN110119637B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810121494.7A CN110119637B (en) 2018-02-07 2018-02-07 Hardware control method and hardware control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810121494.7A CN110119637B (en) 2018-02-07 2018-02-07 Hardware control method and hardware control system

Publications (2)

Publication Number Publication Date
CN110119637A CN110119637A (en) 2019-08-13
CN110119637B true CN110119637B (en) 2023-04-14

Family

ID=67520112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810121494.7A Active CN110119637B (en) 2018-02-07 2018-02-07 Hardware control method and hardware control system

Country Status (1)

Country Link
CN (1) CN110119637B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0126769D0 (en) * 2001-11-07 2002-01-02 Sun Microsystems Inc Computer system with virtual memory and paging mechanism
CN101059761A (en) * 2006-04-20 2007-10-24 联想(北京)有限公司 Dummy machine system and its hardware access method
CN101093448A (en) * 2006-06-23 2007-12-26 联想(北京)有限公司 Method for switching a system of virtual machine and hardware devices
CN101520738A (en) * 2008-02-27 2009-09-02 黄歆媚 Virtual machine system based on the management technology of equipment access storage and equipment access control method thereof
CN102693186A (en) * 2011-02-25 2012-09-26 西门子公司 Method for managing physical memory of a data storage and data storage management system
JP2014119787A (en) * 2012-12-13 2014-06-30 Renesas Electronics Corp Processor
CN105074663A (en) * 2013-03-12 2015-11-18 高通股份有限公司 Method and apparatus to selectively enable operations of a virtual machine monitor on demand
CN106203082A (en) * 2016-06-29 2016-12-07 上海交通大学 The system and method efficiently isolating kernel module based on virtualization hardware characteristic
CN107305509A (en) * 2016-04-22 2017-10-31 三星电子株式会社 It is related to the Buffer mapping scheme of the predistribution of internal memory

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7827381B2 (en) * 2006-06-05 2010-11-02 Oracle America, Inc. Hybrid techniques for memory virtualization in a computer system
EP1870813B1 (en) * 2006-06-19 2013-01-30 Texas Instruments France Page processing circuits, devices, methods and systems for secure demand paging and other operations
US8010763B2 (en) * 2007-08-02 2011-08-30 International Business Machines Corporation Hypervisor-enforced isolation of entities within a single logical partition's virtual address space
US8140820B2 (en) * 2008-05-21 2012-03-20 Arm Limited Data processing apparatus and method for handling address translation for access requests issued by processing circuitry

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0126769D0 (en) * 2001-11-07 2002-01-02 Sun Microsystems Inc Computer system with virtual memory and paging mechanism
CN101059761A (en) * 2006-04-20 2007-10-24 联想(北京)有限公司 Dummy machine system and its hardware access method
CN101093448A (en) * 2006-06-23 2007-12-26 联想(北京)有限公司 Method for switching a system of virtual machine and hardware devices
CN101520738A (en) * 2008-02-27 2009-09-02 黄歆媚 Virtual machine system based on the management technology of equipment access storage and equipment access control method thereof
CN102693186A (en) * 2011-02-25 2012-09-26 西门子公司 Method for managing physical memory of a data storage and data storage management system
JP2014119787A (en) * 2012-12-13 2014-06-30 Renesas Electronics Corp Processor
CN105074663A (en) * 2013-03-12 2015-11-18 高通股份有限公司 Method and apparatus to selectively enable operations of a virtual machine monitor on demand
CN107305509A (en) * 2016-04-22 2017-10-31 三星电子株式会社 It is related to the Buffer mapping scheme of the predistribution of internal memory
CN106203082A (en) * 2016-06-29 2016-12-07 上海交通大学 The system and method efficiently isolating kernel module based on virtualization hardware characteristic

Also Published As

Publication number Publication date
CN110119637A (en) 2019-08-13

Similar Documents

Publication Publication Date Title
JP5654056B2 (en) Hierarchical translation table control
EP2997483B1 (en) System and method for extended peripheral component interconnect express fabrics
US9785597B2 (en) Mapping device addresses to physical memory addresses
TWI526832B (en) Methods and systems for reducing the amount of time and computing resources that are required to perform a hardware table walk (hwtw)
CN102650975A (en) Realization method of I2C bus for multi-hardware platform FT server
JP6160553B2 (en) Memory card access device, control method therefor, and memory card access system
JP5198334B2 (en) Computer system with hypervisor
TWI431468B (en) System, method and non-transitory computer-readable storage medium for customizing a scsi error response received from a scsi target in a storage network environment
CN105335308A (en) Method, apparatus and system for processing access information of storage device
JP2005527021A (en) Method and apparatus for translating guest physical address in virtual machine environment
CN111183411A (en) Dynamic address translation for virtual machines
CN110119637B (en) Hardware control method and hardware control system
TW202001572A (en) MMIO addressing using a translation lookaside buffer
WO2016041453A1 (en) Remote resource access method and exchange device
TW201931136A (en) Hardware controlling method and hardware controlling system
JP2008263678A (en) Servo motor controller
JP2002067405A (en) System for transferring data in printer
US20170257518A1 (en) Data processing apparatus, method for controlling data processing apparatus, and storage medium
CN106815163B (en) SoC with hot-plug function and its PCI-E root port controller
US10101698B2 (en) Information processing apparatus, information processing method, and storage medium
US20090063712A1 (en) Kvm switch identifying peripheral for computer and method thereof
US9740492B2 (en) System management mode trust establishment for OS level drivers
US20240070946A1 (en) Computer device and method for displaying augmented-reality (ar) virtual keyboard
US12182032B2 (en) Memory migration and page fault avoidance
CN110096457A (en) Hardware system and hardware controlling method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20191224

Address after: No.1, Duhang 1st Road, Hsinchu City, Hsinchu Science Park, Taiwan, China

Applicant after: MEDIATEK Inc.

Address before: 1/2, 4th floor, 26 Taiyuan Street, Zhubei City, Hsinchu County, Taiwan, China

Applicant before: MSTAR SEMICONDUCTOR Inc.

GR01 Patent grant
GR01 Patent grant