History log of /freebsd-9.3-release/sys/boot/sparc64/loader/metadata.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 150469 22-Sep-2005 ru

Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
"boot_dfltroot", "boot_mute", and "boot_pause" respectively.


# 149111 15-Aug-2005 marius

- Change the code that determines whether to use a serial console and
which serial device to use in that case respectively to not rely on
the OFW names of the input/output and stdin/stdout devices. Instead
check whether input and output refers to the same device and is of
type serial (uart(4) was already doing this) and for the fallback
to a serial console in case a keyboard is the selected input device
but unplugged do the same for stdin and stdout in case the input
device is nonexistent (PS/2 and USB keyboards) or has a 'keyboard'
property (RS232 keyboards). Additionally also check whether the OFW
did a fallback to a serial console in the same way in case the
output device is nonexistent. While at it save on some variables
and for sys/boot/sparc64/loader/metadata.c move the code in question
to a new function md_bootserial() so it can be kept in sync with
uart_cpu_getdev_console() more easily.
This fixes selecting a serial console and the appropriate device
when using a device path for the 'input-device' and 'output-device'
OFW environment variables instead of an alias for the serial device
to use or when using a screen alias that additionally denotes a
video mode (like e.g. 'screen:r1024x768x60') but no keyboard is
plugged in (amongst others). It also makes the code select a serial
console in case the OFW did the same due to a misconfiguration like
both 'input-device' and 'output-device' set to 'keyboard' or to a
nonexisting device (whether the OFW does a fallback to a serial
console in case of a misconfiguration or one ends up with just no
console at all highly depends on the OBP version however).
- Reduce the size of buffers that only ever need to hold the string
'serial' accordingly. Double the size of buffers that may need to
hold a device path as e.g. '/pci@8,700000/ebus@5/serial@1,400000:a'
exceeds 32 chars.
- Remove the package handle of the '/options' node from the argument
list of uart_cpu_getdev_dbgport() as it's unused there and future
use is also unlikely.

MFC after: 1 week


# 138249 01-Dec-2004 scottl

Remove the last vestiges of the userconfig option. None of this actually
did anything, so this commit should be considered a NO-OP.


# 127826 04-Apr-2004 marcel

To quote the submitter:
"...If "keyboard" is the selected input-device and "screen" the
output-device (both via /options) but the keyboard is unplugged,
OF automatically switches to ttya for the console, it even prints
a line telling so on "screen". Solaris respects this behaviour and
uses ttya as the console in this case and people probably expect
FreeBSD to do the same (it's also very handy to temporarily switch
consoles)..."
"...I changed the comparison of the console device with "ttya" ||
"ttyb" to "tty" because on AXe boards all 4 onboard UARTs end in
SUB-D connectors (ttya and ttyb being 16550 and ttyc and ttyd a
SAB82532) and there's no Sun keyboard connector (but PS/2). If one
plugs a serial card in a box there also can be more than just ttya
and ttyb available for a console..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt that the change is correct: marcel


# 124139 04-Jan-2004 obrien

Convert to __FBSDID.


# 122499 11-Nov-2003 jake

Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb.
This ensures that uart gets a higher console priority than syscons when
a serial console is being used. Testing against the "console" environment
variable doesn't make sense since we only have one loader console driver.


# 114338 30-Apr-2003 peter

Also look for an "elf64 kernel" (for sparc64) and "elf32 kernel" (for
powerpc) when building metadata.


# 106738 10-Nov-2002 jake

Change the device path representation in libofw to use the full firmware
path, instead of an internal i386 specific one. Don't try to interpret
a disklabel in ofw_disk.c, open the partition's device node directly and
let the firmware do it. This fixes booting from a partition other than 'a'
on sparc64, which is needed to support more installation methods.

No objection: ppc


# 105427 18-Oct-2002 tmm

Pass the right number of tlb slots to the kernel. The allocation scheme
was changed in r1.4, but I neglected to update most of the code in
metadata.c.

Pointy hat to: tmm


# 98472 20-Jun-2002 peter

Add boot_serial and boot_multicons variables to set RB_SERIAL and
RB_MULTIPLE since this seems to be the easiest way to add these flags
for non-forth loaders etc.


# 97445 29-May-2002 jake

Use a contrived 'tlb_entry' structure for passing the mappings for the
kernel text and data from the loader to the kernel, so that the tte format
is not part of the loader->kernel ABI.


# 93678 02-Apr-2002 tmm

Do not use semi-fixed TLB slots for the 4M kernel pages any more.


# 91139 23-Feb-2002 jake

Keep track of the ttes used to map the kernel and pass them to it as loader
metadata. Modify tlb handling functions to take a tte, instead of virtual
address, physical address and flags.


# 91107 23-Feb-2002 jake

Include <machine/metadata.h>.


# 85720 30-Oct-2001 jake

Add code to copy the enironment and loader metadata into kernel space.