BarclayII / AIMv6

Reimplementation and extension of teaching operating system xv6, supersedes xv6-Loongson3a
GNU General Public License v2.0
16 stars 17 forks source link

When and how do we load ELF-related code #7

Open davidgao opened 9 years ago

davidgao commented 9 years ago

Been doing some research and even simple validation and loading of ELF files CANNOT fit into 448-bit MBR code. Here are some possible solutions.

  1. preload such functions, x86 will have trouble but arm and mips should be fine.
  2. use "partition boot record"-like strategy, MBR loads a bigger raw image containing such functions, RECOMMENDED.
  3. manually optimize code size. ARM can utilize THUMB instruction set. NOT RECOMMENDED, too much work away from our goal.
  4. use other format (like raw binary) for the kernel.
BarclayII commented 9 years ago

Or, we can simply omit MBR altogether and use whatever we like to bring up the kernel.

What matters in (current) operating system course and experiment is the kernel, not BIOS. We could just tell them where and how to put the kernel on the storage regardless of the detail of BIOS stage.

We could release the BIOS code and document the mechanism as a challenge. Loongson’s PMON code is quite crappy, though.

发自 Windows 邮件

发件人: David Gao 发送时间: ‎2015‎年‎8‎月‎2‎日 ‎21‎:‎19 收件人: BarclayII/AIMv6 主题: [AIMv6] When and how do we load ELF-related code (#7)

Been doing some research and even simple validation and loading of ELF files CANNOT fit into 448-bit MBR code. Here are some possible solutions.

  1. preload such functions, x86 will have trouble but arm and mips should be fine.
  2. use "partition boot record"-like strategy, MBR loads a bigger raw image containing such functions, RECOMMENDED.
  3. manually optimize code size. ARM can utilize THUMB instruction set. NOT RECOMMENDED, too much work away from our goal

— Reply to this email directly or view it on GitHub.

davidgao commented 9 years ago

even better.

leon001 commented 9 years ago

Hi,

We want to use the boot loader to hide the difference of underline ISAs. Please finish your documents like Appendix B in the Xv6 Book.

Our focus is the teaching OS like xv6. It is a tight schedule for us to provide a reference implementation and documents for other TAs.

Thanks for your contributions.

Regards,

Leon

Prof. Liang ZHANG (Leon) Ph.D School of Computer Science Fudan University, Shanghai, 200433 China +86-21-65642219 Tel. +86-21-65642219 Fax +86-18930692817 Mobile. +86-13916354953 Mobile. lzhang@fudan.edu.cn email

-----原始邮件----- 发件人:"Gan Quan" notifications@github.com 发送时间:2015-08-03 00:12:45 (星期一) 收件人: BarclayII/AIMv6 AIMv6@noreply.github.com 抄送: 主题: Re: [AIMv6] When and how do we load ELF-related code (#7)

Or, we can simply omit MBR altogether and use whatever we like to bring up the kernel.

What matters in (current) operating system course and experiment is the kernel, not BIOS. We could just tell them where and how to put the kernel on the storage regardless of the detail of BIOS stage.

We could release the BIOS code and document the mechanism as a challenge. Loongson’s PMON code is quite crappy, though.

发自 Windows 邮件

发件人: David Gao 发送时间: ‎2015‎年‎8‎月‎2‎日 ‎21‎:‎19 收件人: BarclayII/AIMv6 主题: [AIMv6] When and how do we load ELF-related code (#7)

Been doing some research and even simple validation and loading of ELF files CANNOT fit into 448-bit MBR code. Here are some possible solutions.

  1. preload such functions, x86 will have trouble but arm and mips should be fine.
  2. use "partition boot record"-like strategy, MBR loads a bigger raw image containing such functions, RECOMMENDED.
  3. manually optimize code size. ARM can utilize THUMB instruction set. NOT RECOMMENDED, too much work away from our goal

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.