or1k fix bug: Initialize thread context with higher stack address.

Since or1k architecture stack grows down, threads should be initialized
with high stack addresses instead of lower ones. This is done in
_CPU_Context_Initialize function.
or1ksim: Console: implement uart_read_polled

Implement uart_read_polled which is needed for any application that
reads input from users. It works fine with pppd, capture, and all
termios tests.
libnetworking: Update due to Termios changes
pppd: Fix warnings
pppd: Import change from NetBSD

This avoids the use of gethostbyname() in case the "noipdefault" option
is given.  The gethostbyname() uses DNS by default.
bsp/leon3: Replace the define LEON3_MP_IRQ with a weakly linked variable

The LEON3_MP_IRQ define is used to pick the IRQ to be used by the
shared memory driver and for inter-processor interrupts. On some LEON3
systems, for example the GR712RC, the default value of 14 is not suitable.
To make this value configurable from the application, it is replaced with
a weakly linked variable that can be overridden from the application.
Fix assertion "BUF != NULL" for i386

 BSP_uart_termios_write_com1 and BSP_uart_termios_write_com2
bsp/stm32f4XXXX: System clock configuration

Added simple math to caclulate register values for the PLL
and for the prescalers. It will try to keep 48MHz for the USB OTG FS.
Also it will set latency on the Flash memory for the high speeds.

Limitations:
It is assumed that 1MHz resolution is enough.
Best fits for the clocks are achieved with multiplies of 42MHz.
Even though APB1, APB2 and AHB are calculated user is still required
to provide correct values for the bsp configuration for the:
STM32F4_PCLK1
STM32F4_PCLK2
STM32F4_HCLK (= system clock)
as those are used for the peripheral clocking calculations.
libmisc/shell: Remove the need for -lm when linking from the ping command.

Remove the use of sqrt and so the need to link to -lm.
Clean up some warnings.
SPARC BSPs: remove BSP_fatal_return unreached code
SPARC: add BSP specific error handler

Instead of calling the system call TA instruction directly it
is better paractise to isolate the trap implementation to the
system call functions.

BSP_fatal_exit() is added.
SPARC: Fatal_halt use source and exit codes

The Fatal_halt handler now have two options, either halt
as before or enter system error state to return to
debugger or simulator. The exit-code is now also
propagated to the debugger which is very useful for
testing.

The CPU_Fatal_halt handler was split up into two, since
the only the LEON3 support the CPU power down.

The LEON3 halt now uses the power-down instruction to save
CPU power. This doesn't stop a potential watch-dog timer
from expiring.
LEON3: use CPU_Fatal_halt for halt

By removing the bsp_reset() mechanism and instead relying on the
CPU_Fatal_halt() routine SMP and single-core can halt by updating
the _Internal_errors_What_happened structure and set the state to
SYSTEM_STATE_TERMINATED (the generic way). This will be better
for test scripts and debugger that can generically look into why
the OS stopped.

For SMP systems, only the fatal-reporting CPU waits until all other
CPUs are powered down (with a time out of one clock tick). The
reason why a fatal stop happend may be because CPU0 was soft-locked
up so we can never trust that CPU0 should do the halt for us.
erc32,leon2: replace bsp_reset with SPARC fatal handler

Now that a SPARC fatal handler is defined, we no longer
need the BSP specific reset routine.
termios: Fix transmit daemon

Do not call rtems_termios_refill_transmitter() in case a PPP line
discipline is present.  This is similar to
rtems_termios_dequeue_characters().
termios: Separate flow control from normal handler
termios: Partially hide rtems_termios_tty

Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler.  This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.
bsps: Add Termios console driver initialization

Add a simple Termios console driver using a table for statically
registered devices used in console_initialize() and dynamic installation
via console_device_install().
libchip/serial: Add alternative NS16550 driver

Use the Termios device API.
libchip/serial: Fix NS16550 for pppstart()

Call rtems_termios_dequeue_characters() only in case all characters of
the last write handler invocation have been transmitted.  This avoids
problems with pppstart() since the start line discipline does not know
how many characters have been dequeued and assumes the maximum.