节点文献

系统级X86模拟器在无操作系统主机上的启动实现及外设模拟方案

【作者】 张妍

【导师】 臧斌宇;

【作者基本信息】 复旦大学 , 计算机软件与理论, 2011, 硕士

【摘要】 随着微处理器设计工艺的飞速发展和计算机体系结构技术的不断进步,新的硬件平台被推出的速度逐年加快,大量新型的、具有更高性能和更适用于特定专业领域的体系架构涌入市场。其中比较典型的如中国自主研发的“龙芯”和“众志”芯片等。相较于此,系统软件及配套应用软件的开发速度显得缓慢。软件的开发速度赶不上微处理器的研发速度,软件与硬件间的兼容性问题逐渐突出。这使得新硬件的实用性受到了很大的冲击,为新型处理器的研发工作设置了不小的障碍。动态二进制翻译技术的出现可以有效的解决这一兼容性问题。它在硬件平台与系统及软件之间架起了一层抽象层,使得原有系统与软件无需重新编译,即可正确运行在新的体系架构上。目前,二进制翻译器的研发已得到了广泛重视,成为工业界及学术界的热点研究领域。许多设计完善、性能高效的二进制翻译器亦被投入广泛使用之中。但是,目前所流行的二进制翻译模拟器大都运行于应用层。这表示在推出新型微处理器时,硬件制造商仍然需要及时地提供配套操作系统以及相关系统服务的支持,才能保证硬件及时地抢占市场资源。应用级模拟器并不能从根本上解决新型微处理器兼容原有操作系统及软件的问题,因此,将二进制翻译器直接搭建在无操作系统的平台上被纳入了我们的研究范围之中设计这样的系统级模拟器,就必须要解决模拟器在无操作系统平台上的引导和启动问题。此外,考虑到缺乏相关系统服务的支持,以及模拟环境与实际物理硬件环境之间的差异性,怎样为虚拟环境模拟外设,怎样调度底层真实物理硬件,也是系统级模拟器需要解决的关键问题。本文的研究工作基于一个轻量级的系统级X86模拟器的设计与实现,着眼于模拟器在无操作系统平台上的启动问题和外设模拟问题的研究,并提供了简单的实现机制。该模拟器旨在为在中国自主研发的微处理器上运行现有主流X86操作系统提供前期的理论研究与实践工作。考虑到整个X86系统架构的复杂性,当前实现的X86模拟器仅支持X86实模式环境的模拟。目前,该模拟器可运行于没有预装操作系统的X86和ARM体系结构上,其内加载运行于实模式下的X86操作系统环境及配套应用程序。本文的主要贡献包括:1.为中国自主研发的微处理器与现有主流X86系统以及应用的兼容问题提供可行的解决思路。2.结合底层实际体系架构特性,为模拟器整合或设计可用的bootloader,以实现模拟器在无操作系统主机上的启动。3.在无底层操作系统及相关系统服务的支持下,探讨模拟器为X86模拟环境提供虚拟外围设备,同时正确调用实际物理外围设备的设计方案。

【Abstract】 With the rapid development of microprocessor design technology and system architecture, lots of brand new platforms have been launched these years. More and more advanced architectures with higher performance, or specially designed for specific usage, are flooding into the market every year. China also developed and promoted our own processors, such as Loongson and MPRC Unicore-2. In comparison, the development of operating systems and software cannot catch up with the hardware. The compatibility problem between these two is more and more severe gradually, becoming an obstacle to promotion and popularization of newly developed architectures.Dynamic binary translation technic can be applied to efficiently solve this compatibility problem, by enabling an abstract layer between the software and the hardware. Thus existing operating systems or applications can be launched and operate normally on these new architectures without being altered or re-complied. Dynamic binary translation has become a hot spot in both industry and research, attracting more and more companies’and developers’attention. Many well designed and fully functioned emulators based on binary translation came up and have been put into use recently.However, most of these translators run at the application level, requiring support from underlying system service. As a result, when the hardware manufactures raise a new architecture, they still need to raise available operating systems, shared libraries, and maybe applications as well. That’s to say, translators operate as applications can efficiently solve the compatibility problems between platforms with different ISAs, while having limit usage to the compatibility between existing software and newly developed hardware. And this brings the requirement of developing a translator running at the system level.Several specific problems need to be solved when launching a binary translator on a platform without operating systems. Firstly, we need to integrate a bootloader into our emulator to boot it from the raw hardware. Besides, considering the differences between the emulated environment and the real underlying environment, device emulation for virtual machine and access to real peripheral devices needs to be carefully designed as well.This article bases on an implementation of a simple X86 emulating based on dynamic binary translation running at system level. We studied the bootloader technic and device emulation design, and provided easy implementation to them. This project tries to explore a preliminary research work to solve the compatibility problem between the new processors raised by China and operating systems as well as applications based on X86 architecture. Considering the complexity of the whole X86 architecture, currently we only support the emulation of X86 real mode. For now, the emulator can run on X86 and ARM machines without operating systems pre-installed, launching OS running in X86 real mode and some typical applications inside of it.This article has the following contributes.1. Provided a feasible solution for the compatibility problems between the brand new processors developed by China and the existing X86 operating systems as well as applications.2. Designed or integrated a light-weight bootloader to boot our emulator on a platform with no OS pre-installed.3. Explored feasible resolutions to virtualize necessary peripheral for the emulated X86 environment, and to access and update the underlying physical devices properly without OSes and relevant system services’supports.

  • 【网络出版投稿人】 复旦大学
  • 【网络出版年期】2012年 04期
  • 【分类号】TP391.2
  • 【下载频次】131
节点文献中: 

本文链接的文献网络图示:

本文的引文网络