================================== これは、 linux-2.6.13-rc5/Documentation/fb/vesafb.txt の和訳 です。 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 翻訳日 : 2005/8/8 原著作者: Gerd Knorr Nico Schmoigl 翻訳者 : Hiroshi.Suzuki < setter at reset dot jp > 校正者 : Chie Nakatani さん ================================== What is vesafb? vesafb ってナニ? =============== This is a generic driver for a graphic framebuffer on intel boxes. これは、インテル箱(インテルアーキテクチャ用)のグラフィックフレームバッファ用、汎用ドライバです。 The idea is simple: Turn on graphics mode at boot time with the help of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k (and other) ports do. 着想は単純なことです: m68k(ほか)に移植されたもの(カーネル)が行うように、 起動時にグラフィックモードを有効(BIOS 情報も含めて)にし、 フレームバッファデバイス /dev/fb0 として使用します。 This means we decide at boot time whenever we want to run in text or graphics mode. Switching mode later on (in protected mode) is impossible; BIOS calls work in real mode only. VESA BIOS Extensions Version 2.0 are required, because we need a linear frame buffer. つまりこれは、テキストモードで実行したいのか、グラフィックモードで実行したいのかを 起動時に決定できるというということです。 あとで(プロテクトモードでは)モード切り替えはできません; リアルモードでしか BIOS を呼び出す作業はできません。 リニアフレームバッファが必要なので、VESA BIOS 拡張 バージョン2.0(VBE 2.0)が必要です。 Advantages: 長所: * It provides a nice large console (128 cols + 48 lines with 1024x768) without using tiny, unreadable fonts. * You can run XF68_FBDev on top of /dev/fb0 (=> non-accelerated X11 support for every VBE 2.0 compliant graphics board). * Most important: boot logo :-) * 小さくて読みにくいフォントを使わなくても、快適で大きい(高解像度)コンソール (1024x768 で 128桁 + 48行)が使えます * /dev/fb0 (=> すべての、VBE 2.0 互換グラフィックボードで 非アクセル X11が使えます) 上で、XF68_FBDev をつかえます。 * もっとも重要な: ブートロゴ :-) Disadvantages: 短所: * graphic mode is slower than text mode... * グラフィックモードは、テキストモードより遅い... How to use it? 使い方は? ============== Switching modes is done using the vga=... boot parameter. Read Documentation/svga.txt for details. モード切り替えは、ブートパラメータ vga=... で行います。 詳細は、Documentation/svga.txt を読んでください。 You should compile in both vgacon (for text mode) and vesafb (for graphics mode). Which of them takes over the console depends on whenever the specified mode is text or graphics. vgacon(テキストモード用) と、vesafb(グラフィックモード用)の両方を コンパイルしなければいけません。 どちらがコンソールに取り入れられるかは、 指定されたモードがテキストであるか、グラフィックであるかに依存します。 The graphic modes are NOT in the list which you get if you boot with vga=ask and hit return. The mode you wish to use is derived from the VESA mode number. Here are those VESA mode numbers: グラフィックモードの種類は、vga=ask を入力して起動したときの一覧には*表示されません*。 使いたいモードは、VESA モード番号をもとにします。VESA モード番号を次に示します: | 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- 256 | 0x101 0x103 0x105 0x107 32k | 0x110 0x113 0x116 0x119 64k | 0x111 0x114 0x117 0x11A 16M | 0x112 0x115 0x118 0x11B The video mode number of the Linux kernel is the VESA mode number plus 0x200. Linux カーネルのビデオモード番号は、VESA モード番号に 0x200 を加算します。 Linux_kernel_mode_number = VESA_mode_number + 0x200 So the table for the Kernel mode numbers are: よって、カーネルモード番号の表は、次の通りです: | 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- 256 | 0x301 0x303 0x305 0x307 32k | 0x310 0x313 0x316 0x319 64k | 0x311 0x314 0x317 0x31A 16M | 0x312 0x315 0x318 0x31B To enable one of those modes you have to specify "vga=ask" in the lilo.conf file and rerun LILO. Then you can type in the desired mode at the "vga=ask" prompt. For example if you like to use 1024x768x256 colors you have to say "305" at this prompt. これらモードのうち一つを有効にするには、lilo.conf ファイルに "vga=ask" を指定し、 再度 LILO (lilo コマンド) を実行します。 そうすれば、"vga=ask" プロンプトで使いたいモードを入力できます。 例えば、1024x768 x256色 を使いたいなら、このプロンプトで "305" を入力します。 If this does not work, this might be because your BIOS does not support linear framebuffers or because it does not support this mode at all. Even if your board does, it might be the BIOS which does not. VESA BIOS Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a "bad mode number" message if something goes wrong. これがうまくいかないなら、BIOS がリニアフレームバッファをサポートしていないか、 このモードを全くサポートしないのかもしれません。 (グラフィック)ボードがサポートしていても、BIOS がサポートしていないかもしれません。 VESA BIOS 拡張 v2.0 が必要で、1.2 では *不十分* です。 何かがうまくいかないと、"bad mode number" メッセージが表示されます。 1. Note: LILO cannot handle hex, for booting directly with "vga=mode-number" you have to transform the numbers to decimal. 2. Note: Some newer versions of LILO appear to work with those hex values, if you set the 0x in front of the numbers. 1. 注記: LILO は、16進数を扱えません。"vga=mode-number" で直接起動するには、 番号(mode-number) を10進数に変換します。 2. 注記: LILO のより新しい版では、番号の前に 0x をつけてあげれば、 16進数 で動くように思えるものもあります。 X11 === XF68_FBDev should work just fine, but it is non-accelerated. Running another (accelerated) X-Server like XF86_SVGA might or might not work. It depends on X-Server and graphics board. XF68_FBDev は、うまく動くはずです。しかし、非アクセルになります。 他の XF86_SVGA のような (アクセル化した) X サーバは、動くかもしれないし、動かないかもしれません。 X サーバと、グラフィックボードに依存します。 The X-Server must restore the video mode correctly, else you end up with a broken console (and vesafb cannot do anything about this). X サーバは正しくビデオモードを復元しなければなりません。 でなければ、壊れたコンソールになってしまいます(vesafb はこれについてどうすることもできません)。 Refresh rates リフレッシュレート ============= There is no way to change the vesafb video mode and/or timings after booting linux. If you are not happy with the 60 Hz refresh rate, you have these options: Linux が起動した後に、vesafb ビデオモードおよび/または、タイミングを切り替える手段はありません。 60Hz のリフレッシュレートでは満足できないなら、次のオプションが使えます。 * configure and load the DOS-Tools for your the graphics board (if available) and boot linux with loadlin. * use a native driver (matroxfb/atyfb) instead if vesafb. If none is available, write a new one! * VBE 3.0 might work too. I have neither a gfx board with VBE 3.0 support nor the specs, so I have not checked this yet. * (入手可能なら)グラフィックボード用の DOS ツールを設定/読み込み、loadin で linux を起動します。 * vesafb なら代わりに、ネイティブドライバ(matroxfb/atyfb)を使う。 なければ、ぜひ新しく書いてください! * VBE 3.0 も動くかもしれません。私は、VBE 3.0 が使える グラフィックボードも、仕様書も持っていないので、 これについてはまだ調べていません。 Configuration 設定 ============= The VESA BIOS provides protected mode interface for changing some parameters. vesafb can use it for palette changes and to pan the display. It is turned off by default because it seems not to work with some BIOS versions, but there are options to turn it on. VESA BIOS は、いくつかのパラメータを変更するために、プロテクトモードインタフェースを提供しています。 vesafb は、パレット変更と、ディスプレイをパンするのに使えます。 BIOS バージョンによっては動かないものもあるようなので、デフォルトでは無効になっていますが、 有効にするためのオプションがあります。 You can pass options to vesafb using "video=vesafb:option" on the kernel command line. Multiple options should be separated by comma, like this: "video=vesafb:ypan,invers" カーネルコマンドラインで "video=vesafb:option" を使い、vesafb にオプションを渡せます。 複数のオプションは、"video=vesafb:ypan,invers" のように、カンマで区切ります。 Accepted options: 利用できるオプション: invers no comment... invers ノーコメント... ypan enable display panning using the VESA protected mode interface. The visible screen is just a window of the video memory, console scrolling is done by changing the start of the window. pro: * scrolling (fullscreen) is fast, because there is no need to copy around data. * You'll get scrollback (the Shift-PgUp thing), the video memory can be used as scrollback buffer kontra: * scrolling only parts of the screen causes some ugly flicker effects (boot logo flickers for example). ypan VESA プロテクトモードインタフェースを使ったディスプレイパンを有効にする。 可視スクリーンは、ビデオメモリウィンドウそのもので、コンソールのスクロールは ウィンドウの開始位置を変更することで行われます。 pro: * 周辺データをコピーしなくても良いので、(全画面)スクロールは高速です。 * 逆スクロールしたいとき(Shift-PgUp する)、ビデオメモリは逆スクロールバッファに使えます。 kontra: * スクリーンの一部だけをスクロールするとき、不快なちらつきが発生します(例:ブートロゴのちらつき)。 ywrap Same as ypan, but assumes your gfx board can wrap-around the video memory (i.e. starts reading from top if it reaches the end of video memory). Faster than ypan. ywrap ypan と同じですが、使っている グラフィックボードはビデオメモリを回り込み(wrap-around)できるはずです (例えば、ビデオメモリの末端に達したとき先頭から読みはじめる)。ypan より高速。 redraw scroll by redrawing the affected part of the screen, this is the safe (and slow) default. redraw スクリーンの影響を受けた部分を書換えることでスクロールする。 安全で(そして遅い)デフォルトです。 vgapal Use the standard vga registers for palette changes. This is the default. pmipal Use the protected mode interface for palette changes. vgapal パレット変更に標準の vga レジスタを使う。デフォルトです。 pmipal パレット変更にプロテクトモードインタフェースを使う。 mtrr:n setup memory type range registers for the vesafb framebuffer where n: 0 - disabled (equivalent to nomtrr) 1 - uncachable 2 - write-back 3 - write-combining (default) 4 - write-through If you see the following in dmesg, choose the type that matches the old one. In this example, use "mtrr:2". ... mtrr: type mismatch for e0000000,8000000 old: write-back new: write-combining ... mtrr:n vesafb フレームバッファ用に メモリタイプレンジレジスタを準備します。 ここの n は: 0 - 無効 (nomtrr と同じ) 1 - キャッシュしない 2 - ライトバック 3 - ライトコンバイニング (デフォルト) 4 - ライトスルー dmesg コマンドで次に示すものが表示されるなら、古いものと一致するタイプを選択します。 この例では、"mtrr:2" を使います。 ... mtrr: type mismatch for e0000000,8000000 old: write-back new: write-combining ... nomtrr disable mtrr nomtrr mtrr を無効にする vremap:n remap 'n' MiB of video RAM. If 0 or not specified, remap memory according to video mode. (2.5.66 patch/idea by Antonino Daplas reversed to give override possibility (allocate more fb memory than the kernel would) to 2.4 by tmb@iki.fi) vremap:n ビデオ RAM の MiB 'n' を再配置する。0 または、指定しない場合、ビデオモードに応じて、 メモリを再配置します。 (Antonino Daplas による、2.5.66 patch/idea は、上書きできるようにする (カーネルはさらに多くの fb メモリを割り当てるでしょう)ために、tmb@iki.fi により、 2.4系にバックポートされました)。 vtotal:n if the video BIOS of your card incorrectly determines the total amount of video RAM, use this option to override the BIOS (in MiB). vtotal:n カードのビデオ BIOS がビデオ RAMの総容量を正しく認識できない場合、 このオプションを使い、BIOS (MiB 中の) を上書きします。 Have fun! 楽しんでね! Gerd -- Gerd Knorr Minor (mostly typo) changes by Nico Schmoigl