view seminar/seminar2012/20120605.html @ 3:fea44bb81877 default tip

many change
author taiki
date Tue, 10 Dec 2013 15:31:33 +0900
parents
children
line wrap: on
line source

<!DOCTYPE html>

<!--
  Google HTML5 slide template

  Authors: Luke Mahé (code)
           Marcin Wichary (code and design)
           
           Dominic Mazzoni (browser compatibility)
           Charles Chen (ChromeVox support)

  URL: http://code.google.com/p/html5slides/
-->

<html>
  <head>
    <title>Presentation</title>
    <link src='../styles.css'>
    <meta charset='utf-8'>
    <script
        src='../slides.js'></script>
  </head>
  
  <style>
    /* Your individual styles here, or just use inline styles if that’s
       what you want. */
    
    
  </style>
  <body style='display: none'>

      <section class='slides layout-regular template-default'>
      
      <!-- Your slides (<article class='nobackground'>s) go here. Delete or comment out the
           slides below. -->

      <article>
        <h1>CbC による OS の実装(仮)</h1>
        <p>Taiki Taira / 05,Jun,2012</p>
      </article>

      <article>
      <h3>研究目標</h3>
      <p>
      複雑化、多様化した BIOS を書き換え改良した仕様の(U)EFI に準拠した、GRUB2 で起動する。64bit のメモリを有効に扱う。<br>
      shared library を減らす。<br>
      故障や部品交換等でOSそのものが止まるような箇所をなくす。<br>
      OS を構成する CPU 等の機器に多少の障害が起きてもすぐに切られることがないようにする。<br>
      CbC で動作し、Cerium の Task Manager をのせる。

      </p>
      </article>
      <article>
        <h3>
            設計
        </h3>
        <img src='images/os_plan.png'>
        <p>
        Cerium の Task Mangaer を載せ、OS に渡される処理を並列化する。
        CbC のコンパイラを載せ、実行可能にする。
        </p>
      </article>

      <article class='nobackground'>
        <h3>
          今週の作業 [~ 2011/06/12 ]
       </h3>
       <p> 
       64bit へ移行するソースの理解と作業 <br>
       コンパイラについて
       </p> 
       </article>

      <article>
      <h3> compiler </h3>
      <p>gcc</p>
      <ul>binutils
          <li>as</li>
          <li>ld</li>
      </ul>
       </article>

      <article class='nobackground'>
        <h3>
            MSR (Model Specific Register)
        </h3>
        <p>
        モデル固有レジスタ<br>
        CPU 内部制御用のレジスタ群<br>
        RDMSR WRMSR 命令を使用して読み書き<br>
        </p>
    <h4>
        機能
    </h4>
        <ul>
            <li>メモリキャッシュ制御</li>
            <li>拡張機能の有効/無効</li>
            <li>Microcode の更新(Intel Only)</li>
            <li>パフォーマンスモニタの制御</li>
            <li>温度測定</li>
            <li>デバッグ制御</li>
            <li>マシンチェック</li>
        </ul>

       </article>

      <article class='nobackground'>
    <h3>
        MSR を操作する命令
    </h3>
      <h4>
          RDMSR
      </h4>
      <p>
      ecx レジスタに MSR のアドレスを指定すると edx:eax レジスタに MSR の内容を読み込む。<br>
      上位32bit が edx , 下位 32bit が eax へ入る。
      </p>
      <h4>
          RDMSR
      </h4>
      <p>
      ecx レジスタに指定したMSR のアドレスに、 edx:eax レジスタの内容を書き込む。<br>
      </p>

       </article>
      <article class='nobackground'>
      <section>
      <pre>
#define MSR_EFER      0xc0000080 /* extended feature register */
#define _EFER_LME     8  /* Long mode enable */

/* Enable Long mode in EFER (Extended Feature Enable Register) */
movl    $MSR_EFER, %ecx
rdmsr
btsl    $_EFER_LME, %eax
wrmsr
      </pre>
      </section>
       </article>

      <article class='nobackground'>
        <h3>
            今後やること
        </h3>
        <ul>
            <li>Task Manager のソースと論文を読む</li>
            <li> 32bit mode から 64bit mode (long mode) へ。</li>
        </ul>
      </article>

      <article class='nobackground'>
       </article>

      <article class='nobackground'>
       <h3> Multiboot Specification </h3>
       Multiboot Specification で規定された少量の規定を満たせばこの企画に準拠したブートローダー(ex. grub) から起動できる。<br>
       Multiboot Specification2 が作られており、grub2 (gurb の最新 grub1.99 )が対応しているため、Multiboot Specification2 に対応させる必要がある。<br>
       </p>
       </article>

      <article class='nobackground'>
       <h3> Physical Address Extension (PAE)</h3>
       <p>
       物理アドレス拡張。<br>
       32bit CPU で 4GiB以上のメモリを扱う技術。<br>
       AMD の AMD 64 アーキテクチャと Interl 64 アーキテクチャでは PAE のページテーブルエントリ構造を保ったまま512エントリをもった4段のページテーブル構造にすることで仮想アドレス空間を48、物理アドレス空間を52bit まで拡張。<br>
       IA-32 の PAE 互換を使用する場合物理アドレス空間の範囲は64bit mode で使った場合と同様。<br>
       </p>
       </article>

     <article class='nobackground'>
       <h3> Intel x86 architectures --- Segment Descripter </h3>
       <ul>
           <li> Interrupt Descriptor Table --- 割り込みの設定に使われる</li>
           <li> Global Descripter Table --- すべてのプログラムから共通にアクセスするセグメントを定義する </li>
           <li> Local Descriptor Table --- タスク単位に存在する</li>
       </ul>
       </article>

     <article class='nobackground'>
     <h3>
         Enable long mode
     </h3>
     <p>最初にCPUのIDを確認し、Long mode が使用可能かチェックする。
     <ul>
         <li>ページングを不許可にする</li>
         <li> CR4 レジスタへ PAE を許可するためのbit をセットする</li>
         <li> CR3 を PML4 と一緒にロードする</li>
         <li> long mode を MSR の 0xC0000080 の EEER.LME フラグを
                セットすることによって許可する</li >
         <li></li>
         <li>ページングを許可する</li>
     </ul>

      </article>
     <article class='nobackground'>
     <h3>
         linux kernel 3.3
     </h3>
     <p>
     arch/x86/boot/compressed/head_64.S で protect mode からlong mode へ移行するアセンブラが記述してある。<br>
     64bit の GDT (Global Descripter Table) や PAE (Physical Address Extension) などもこのソースで用意している。<br>
     </p>

     </article>


      <article class='nobackground'>
        <h2>
            END
        </h2>
      </article>

      <article class='nobackground'>

      </article>

     <article class='nobackground'>
        <h3>
            UEFI【Unified Extensible Firmware Interface】
        </h3>
        <p>
        OS とプラットフォームファームウェアとの間のソフトウェアインターフェースを定義する「仕様」<br> 
        BIOS との置き換えになる。特定のプロセッサやアーキテクチャに限定されない。<br> 
        2005 年に EFI から標準化され、 UEFI へ名前が変更された。
        </p>
        <img src='images/SoftWareStack.png'>
        </article>
        <article class='nobackground'>
        <h3>
            UEFI 特徴
        </h3>
        <p>
            2TiB を超える大きなディスクからブート可能<br>
            CPU に依存しないアーキテクチャ<br>
            CPU に依存しないドライバ<br>
            ネットワークも使用可能な柔軟なプレOS環境<br>
            MBR GUID サポート-&gt;2TB 以上のシリアルATA HDD から起動可能<br>
            BIOS -&gt; 16 bit プロセッサモード 1MB アドレス空間<br>
            UEFI -&gt; 32 bit ,64 bit のプロセッサモード<br> 
            -&gt; ブート前に 64bit アドレッシングの全メモリに直接アクセス可能
        </p>
      </article>

      <article class='nobackground'>
        <h3>サポート</h3>
        <p>
        VMware Fusion<br> 
        QEMU<br>
        ViertualBox 3.1 〜(Unix/Linux)

        </p>
        <h3>引用</h3>
        <p>
        wikipedia UEFI
        </p>
      </article>

      <article class='nobackground'>
      <h3>xv6</h3>
      <p>
      MIT が operating systems Engineering という授業で使うために開発した OS 。<br>
      Sixth Edition Unix が元になっている。
      </p>
      <p>
      VMware Fusion で動かすことに成功。
      </p>

      </article>


      <article class='nobackground'>
        <h3>
        </h3>
        <ul class="build">
          <li>
            This is an example of a list
          </li>
          <li>
            The list items fade in
          </li>
          <li>
            Last one!
          </li>
        </ul>

        <div class="build">
          <p>Any element with child nodes can build.</p>
          <p>It doesn't have to be a list.</p>
        </div>
      </article>

      <article class='smaller'>
        <h3>
          Slide with bullet points (small font)
        </h3>
        <ul>
          <li>
            Use this template to create your presentation
          <li>
            Use the provided color palette, box and arrow graphics, and
            chart styles
          <li>
            Instructions are provided to assist you in using this
            presentation template effectively
          <li>
            At all times strive to maintain Google's corporate look and feel
        </ul>
      </article>

      <article class='nobackground'>
        <h3>
          Slide with a table
        </h3>
        
        <table>
          <tr>
            <th>
              Name
            <th>
              Occupation
          <tr>
            <td>
              Luke Mahé
            <td>
              V.P. of Keepin’ It Real
          <tr>
            <td>
              Marcin Wichary
            <td>
              The Michael Bay of Doodles
        </table>
      </article>
      
      <article class='smaller'>
        <h3>
          Slide with a table (smaller text)
        </h3>
        
        <table>
          <tr>
            <th>
              Name
            <th>
              Occupation
          <tr>
            <td>
              Luke Mahé
            <td>
              V.P. of Keepin’ It Real
          <tr>
            <td>
              Marcin Wichary
            <td>
              The Michael Bay of Doodles
        </table>
      </article>
      
      <article class='nobackground'>
        <h3>
          Styles
        </h3>
        <ul>
          <li>
            <span class='red'>class="red"</span>
          <li>
            <span class='blue'>class="blue"</span>
          <li>
            <span class='green'>class="green"</span>
          <li>
            <span class='yellow'>class="yellow"</span>
          <li>
            <span class='black'>class="black"</span>
          <li>
            <span class='white'>class="white"</span>
          <li>
            <b>bold</b> and <i>italic</i>
        </ul>
      </article>
      
      <article class='nobackground'>
        <h2>
          Segue slide
        </h2>
      </article>

      <article class='nobackground'>
        <h3>
          Slide with an image
        </h3>
        <p>
          <img style='height: 500px' src='images/example-graph.png'>
        </p>
        <div class='source'>
          Source: Sergey Brin
        </div>
      </article>

      <article class='nobackground'>
        <h3>
          Slide with an image (centered)
        </h3>
        <p>
          <img class='centered' style='height: 500px' src='images/example-graph.png'>
        </p>
        <div class='source'>
          Source: Larry Page
        </div>
      </article>

      <article class='fill'>
        <h3>
          Image filling the slide (with optional header)
        </h3>
        <p>
          <img src='images/example-cat.jpg'>
        </p>
        <div class='source white'>
          Source: Eric Schmidt
        </div>
      </article>

      <article class='nobackground'>
        <h3>
          This slide has some code
        </h3>
        <section>
        <pre>
&lt;script type='text/javascript'&gt;
  // Say hello world until the user starts questioning
  // the meaningfulness of their existence.
  function helloWorld(world) {
    for (var i = 42; --i &gt;= 0;) {
      alert('Hello ' + String(world));
    }
  }
&lt;/script&gt;
&lt;style&gt;
  p { color: pink }
  b { color: blue }
  u { color: 'umber' }
&lt;/style&gt;
</pre>
        </section>
      </article>
      
      <article class='smaller'>
        <h3>
          This slide has some code (small font)
        </h3>
        <section>
        <pre>
&lt;script type='text/javascript'&gt;
  // Say hello world until the user starts questioning
  // the meaningfulness of their existence.
  function helloWorld(world) {
    for (var i = 42; --i &gt;= 0;) {
      alert('Hello ' + String(world));
    }
  }
&lt;/script&gt;
&lt;style&gt;
  p { color: pink }
  b { color: blue }
  u { color: 'umber' }
&lt;/style&gt;
</pre>
        </section>
      </article>
      
      <article class='nobackground'>
        <q>
          The best way to predict the future is to invent it.
        </q>
        <div class='author'>
          Alan Kay
        </div>
      </article>
      
      <article class='smaller'>
        <q>
          A distributed system is one in which the failure of a computer 
          you didn’t even know existed can render your own computer unusable.
        </q>
        <div class='author'>
          Leslie Lamport
        </div>
      </article>
      
      <article class='nobackground'>
        <h3>
          A slide with an embed + title
        </h3>
        
        <iframe src='http://www.google.com/doodle4google/history.html'></iframe>
      </article>

      <article class='nobackground'>
        <iframe src='http://www.google.com/doodle4google/history.html'></iframe>
      </article>

      <article class='fill'>
        <h3>
          Full-slide embed with (optional) slide title on top
        </h3>
        <iframe src='http://www.google.com/doodle4google/history.html'></iframe>
      </article>
      
      <article class='nobackground'>
        <h3>
          Thank you!
        </h3>
        
        <ul>
          <li>
            <a href='http://www.google.com'>google.com</a>
        </ul>
      </article>

    </section>

  </body>
</html>