<?xml version="1.0"?>
<!DOCTYPE webpage
PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
"http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd">

<webpage id="ports-sparc64-faq">
  <config param="desc"
  value="NetBSD/sparc64 Frequently Asked Questions" />
  <config param="cvstag"
  value="$NetBSD: faq.xml,v 1.5 2011/01/19 12:06:14 martin Exp $" />
  <config param="rcsdate" value="$Date: 2011/01/19 12:06:14 $" />
  <head>
<!-- Copyright (c) 1994-2005
        The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->
    <title>NetBSD/sparc64 Frequently Asked Questions</title>
  </head>
  <sect1 role="toc">
    <sect2 id="general">
      <title>General Questions</title>
      <sect3 id="netbooting">
        <title>How do I netboot NetBSD/sparc64?</title>
        <para>See the 
        <ulink url="../../docs/network/netboot/">Diskless
        NetBSD HOW-TO</ulink>.</para>
      </sect3>
      <sect3 id="cdrominstall">
        <title>Can I boot from a CDROM?</title>
        <para>Yes. There are ISO images available at:
        <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/iso/" />
        </para>
        <para>After burning an ISO to a CD, you can boot it with</para>
        <programlisting>boot cdrom</programlisting>
      </sect3>
      <sect3 id="debugger">
        <title>How do I drop into DDB?</title>
        <para>Since this is a SPARC we attempt to honor L1-A or
        STOP-A from the keyboard and BREAK from a serial console.</para>
      </sect3>
      <sect3 id="console-switching">
        <title>How do I switch virtual consoles</title>
	<para>First note that currently not all sparc64 console drivers
	  support this. Work is ongoing to make it available for all
	  drivers using wscons/wsdisplay. If you do not have wskbd or
	  wsdisplay in your kernel configuration file, you can not switch
	  virtual consoles.</para>
	<para>On drivers where virtual consoles are supported, you switch
	  between them by pressing STOP-F1 .. STOP-Fn (or L1-F1 .. L1-Fn
	  depending on your keyboard).</para>
	</sect3>
      <sect3 id="audio-mixerctl">
        <title>How do I turn off the internal speaker in my U5/U10</title>
	<para>U5 and U10 machines have an internal speaker connected to
	the on-board audio. If you connect something to the headphone
	or line-out connector, you probably want to turn this speaker 
	off.</para>
	<para>The &man.mixerctl.1; utility is used to control this.
	To shut off the speaker permanently, add this to 
	<filename>/etc/mixerctl.conf</filename>:
	<programlisting>monitor.mono=off</programlisting> and add
	<programlisting>mixerctl=YES</programlisting> to 
	<filename>/etc/rc.conf</filename>.</para>
	</sect3>
      <sect3 id="fast-dmmu-miss">
        <title>Why am I getting a Fast Data Access MMU
        Miss?</title>
        <para>"Fast Data Access MMU Miss" is being printed by the
        PROM. It happens in early bootstrapping before the virtual
        memory system has been brought up when the kernel or
        bootloader access unmapped memory.</para>
        <para>This usually happens due to a mismatch between the
        kernel and <code>ofwboot</code>. It's usually best to have both
	the latest kernel and latest <code>ofwboot</code>.</para>
        <para>The main differences between versions involve how 
        <code>ofwboot</code>
        allocates memory for text and data segments. Originally, it
        allocated whatever memory was available and the segments
        could end up with any alignment. The kernel needs both text
        and data segments both physically and virtually aligned to
        a 4MB boundary, and the data segment must be extended to a
        4MB boundary so they can be mapped in with 4MB pages. The
        kernel has code to relocate itself, if necessary, but some
        PROMs are buggy and relocation does not work, especially on
        newer machines.</para>
        <para>Versions 1.2 and 1.3 makes sure that any segment's
        physical alignment is the lesser of its virtual alignment
        or 4MB. This means the kernel does not need to relocate the
        text segment, but sometimes there is something in the way
        of extending the data segment to 4MB</para>
        <para>Version 1.4 is buggy and always extends all segments
        to exactly 4MB. This is a problem if segments happen to be
        greater than 4MB, in which case they are truncated.</para>
        <para>Version 1.5 extends the data+BSS segment to the next
        4MB boundary. This, in conjunction with a recent kernel
        means that the kernel never needs to be relocated. It is
        required for new machines where kernel relocation or data
        segment extension simply fails. However, since it does
        extend the data segment, older kernels will not detect this
        and think that something else is in the way, forcing them
        to relocate the data segment.</para>
        <para>In short, although different combinations may work,
        it is best to have 
        <code>ofwboot</code>
        match the kernel.</para>
      </sect3>
      <sect3 id="pci-cards">
        <title>Can I use "standard" PCI cards?</title>
        <para>Some standard PCI cards "just work" in
        NetBSD/sparc64, such as network cards, IDE cards, etc.
        However, for these cards to be recognised by the PROM, you
        need to update the SUNW,builtin-drivers FCode package to
        force the device into native PCI mode.</para>
        <para>Lloyd Parkes has provided the nvram commands to have
        a "standard" IDE controller recognised correctly by the
        PROM.</para>
        <programlisting>dev /packages/SUNW,builtin-drivers
: class018000
f 9 my-space + " config-b!" $call-parent class010100
;
device-end</programlisting>
        <para>See Lloyd's 
        <ulink
        url="http://mail-index.NetBSD.org/port-sparc64/2002/02/24/0000.html">
        original message</ulink>
        and 
        <ulink
        url="http://mail-index.NetBSD.org/port-sparc64/2002/02/24/0001.html">
        follow-up message</ulink>.
        </para>
      </sect3>
      <sect3 id="mmap-ram">
        <title>Why can &man.mmap.2; on /dev/mem only access RAM and not devices?</title>
        <para>
          The sparc64 architecture requires special handling for PCI memory.
	  The /dev/mem device driver can not easily get the MMU and external
	  cache handling coherent without collaborating with all PCI device
	  drivers. So in a better-safe-than-sorry policy /dev/mem restricts
	  access to known-safe areas - which basically means main memory.
          See this
          <ulink url="http://mail-index.NetBSD.org/port-sparc64/2005/03/13/0006.html">
	  message</ulink> for details.
        </para>
        <para>
          If you want to access PCI memory space you need to go through some
          sort of PCI device driver that maps it correctly.
        </para>
      </sect3>
      <sect3 id="boot-fstypes">
        <title>What file system types can NetBSD/sparc64 boot from?</title>
        <para>
	  When booting from hard disk, the NetBSD/sparc64 bootloader
	  currently only supports FFSv1 partitions. The FFSv1 may be on a
	  RAID-1 set managed by RAIDframe.
        </para>
      </sect3>
    </sect2>
    <sect2 id="x-stuff">
    <title>X Setup</title>
      <sect3 id="x-disclaimer">
      <title>Does this section about X setup apply to my NetBSD version?</title>
      <para>
        The following sections assume NetBSD 5.0 or newer.
      </para>
      <para>
	With the release of NetBSD 5.0, the sparc64 port uses
	X.Org instead of XFree86.
      </para>
      </sect3>
      <sect3 id="how-to-configure-x">
      <title>How do I create an xorg.conf file?</title>
        Running 
	<programlisting>X -configure</programlisting>
	as root will probe the available hardware and create an
	xorg.conf.new file in ~root. Moving this file to 
	/etc/X11/xorg.conf should be enough to get the X server going.
      </sect3>
      <sect3 id="x-keyboard-layout">
      <title>How do I change the keyboard layout under X</title>
        In /etc/X11/xorg.conf there is a separate section for the keyboard.
        Keyboard layout options may be added there. An example for a german
	type 6 keyboard is:
	<programlisting>
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "Protocol" "wskbd"
        Option      "Device" "/dev/wskbd"
        Option      "XkbModel" "pc102"
        Option      "XkbLayout" "de"
        Option      "XkbVariant" "nodeadkeys"
EndSection
	</programlisting>
	(Just ignore the blatant lie about the keyboard model.)
      </sect3>
      <sect3 id="x-switch-virtual-consoles">
      <title>How do I switch virtual consoles while in X</title>
	<para>
	You can not do that, currently. We are working on improving the
	X server support to allow this in the future.
	</para>
      </sect3>
      <sect3 id="x-does-not-accelerate">
      <title>I have a Creator graphics adapter, but X is very slow</title>
        <para>
        There are various types of creator graphics cards, some (called AFB)
	need special firmware downloaded to the framebuffer before X can
	use acceleration.</para>
	<para>
	To check if you have such a card, look in /var/log/Xorg.0.log
	and search for output like this:
	<programlisting>
(II) /dev/fb0: Detected Elite3D M3/M6, checking firmware...
(II) /dev/fb0: ... AFB firmware not loaded
(WW) /dev/fb0: Forcing no acceleration on Elite3D M3/M6
</programlisting>
	If you see this, install the <filename role="pkg">
	sysutils/afbinit</filename> package, which can download the missing
	firmware to the board, and get afb.ucode (the firmware image) from
	<ulink url="http://dlc.sun.com/osol/sparc-gfx/downloads/afb-ucode.tar.bz2">
	SUN</ulink>. Thanks to <ulink url="http://lists.freedesktop.org/archives/x-packagers/2009-December/000091.html">
	Alan Coopersmith</ulink> for making
	it available.</para>
      </sect3>
    </sect2>
    <sect2 id="other-sun">
    <title>Other sources of information</title>

    <sect3 id="sun-system-handbook">
      <title>Sun System Handbook</title>
      <para><ulink url="http://sunsolve.sun.com/handbook_pub/">Sun System
      Handbook</ulink>
      - Sun's online system docs</para>
    </sect3>
    <sect3 id="memory-modules">
      <title>Memory Modules</title>
      <para><ulink
      url="http://sunsolve.sun.com/handbook_pub/Devices/Memory/MEM_Modules.html">
      Memory Modules</ulink>
      - memory module compatibility
      (requires a SunSolve login with a valid Sun Service Plan;
      <ulink url="http://www.sunshack.org/data/sh/2.1/infoserver.central/data/syshbk/Devices/Memory/MEM_Modules.html">alternative, free but unofficial link</ulink>)
      </para>
    </sect3>

    <sect3 id="sunHELP">
      <title>SunHELP</title>
      <para>
      <ulink url="http://www.sunhelp.org/">SunHELP</ulink>
      - much sun related information</para>
    </sect3>

    <sect3 id="hostid-faq">
      <title>Sun NVRAM/Hostid FAQ</title>
      <para><ulink
      url="http://www.squirrel.com/squirrel/sun-nvram-hostid.faq.html">
      Sun NVRAM/Hostid FAQ</ulink>
      - if your machine PROM's battery has gone dead</para>
    </sect3>

    <sect3 id="cablepinout">
      <title>Sun Serial Port &amp; Cable Pinouts</title>
      <para><ulink
      url="http://www.sunhelp.org/unix-serial-port-resources/">
      Sun Serial Port &amp; Cable Pinouts</ulink>
      - lists serial port pinouts for almost all models</para>
    </sect3>

    <sect3 id="docs.sun.com">
      <title>Sun Product Documentation</title>
      <para><ulink url="http://docs.sun.com/">Sun Product
      Documentation</ulink>
      - various online documents by Sun Microsystems. 
      </para>
      <itemizedlist>
        <listitem>
          <ulink
          url="http://docs.sun.com/app/docs/coll/216.2/OPENBOOTCMDREF_3.x/">
          OpenBoot 3.x Command Reference Manual</ulink>
        </listitem>
        <listitem>
          <ulink url="http://docs.sun.com/app/docs/coll/265.1/">Sun Ultra
          1 and 2 Service Manuals Collection</ulink>
        </listitem>
        <listitem>
          <ulink url="http://docs.sun.com/app/docs/coll/185.5/">Sun Ultra
          5 Hardware AnswerBook</ulink>
        </listitem>
        <listitem>
          <ulink url="http://docs.sun.com/app/docs/coll/465.4/">Sun Ultra
          10 Hardware AnswerBook</ulink>
        </listitem>
        <listitem>
          <ulink url="http://docs.sun.com/app/docs/coll/125.3/">Sun Ultra
          30 Hardware AnswerBook</ulink>
        </listitem>
      </itemizedlist>
      </sect3>
    </sect2>

    <sect2 id="other-onsite">
    <title>More general sources of information</title>

    <sect3 id="install-notes">
      <title>NetBSD Install Notes</title>
      <para>
      <ulink
      url="ftp://ftp.NetBSD.org/pub/NetBSD/&os;-&release.latest;/sparc64/INSTALL.html">
      &os; &release.latest;</ulink> install notes - supported hardware and
      how to install.</para>
    </sect3>

    <sect3 id="mailinglist">
      <title>Mailing List</title>
      <para><ulink url="../../mailinglists/#port-sparc64">port-sparc64
      mailing list</ulink>
      - if you have any additional questions please
      subscribe.</para>
    </sect3>
      
    <sect3 id="hardware-docs">
      <title>Hardware Documentation</title>
      <para>
      <ulink url="../../docs/Hardware/Machines/Sun/">
      Hardware Documentation - Sun Microsystems</ulink>
      - some links to information about Sun Microsystems
      computers.</para>
    </sect3>

    <sect3 id="diskless-howto">
      <title>Diskless NetBSD HOW-TO</title>
      <para>
      <ulink url="../../docs/network/netboot/">Diskless
      NetBSD HOW-TO</ulink></para>
   </sect3>

   <sect3 id="serial-port-primer">
   <title>NetBSD Serial Port Primer</title>
   <para>
        <ulink url="../../docs/Hardware/Misc/serial.html">
        NetBSD Serial Port Primer</ulink>
      </para>
   </sect3>

   <sect3 id="general-docs">
      <title>General NetBSD Documentation</title>
      <para><ulink url="../../docs/">General NetBSD
      Documentation</ulink>
      - for questions not specific to NetBSD/sparc64.</para>
    </sect3>
   </sect2>
  </sect1>
  <parentsec url="./" text="NetBSD/sparc64 Port Page" />
</webpage>


