Deleted Added
full compact
sio.c (60947) sio.c (61649)
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/sio/sio.c 60947 2000-05-26 11:41:08Z tanimura $
33 * $FreeBSD: head/sys/dev/sio/sio.c 61649 2000-06-14 06:41:33Z ps $
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91
35 * from: i386/isa sio.c,v 1.234
36 */
37
38#include "opt_comconsole.h"
39#include "opt_compat.h"
40#include "opt_ddb.h"
41#include "opt_sio.h"

--- 1821 unchanged lines hidden (view full) ---

1863
1864 /* input event? (check first to help avoid overruns) */
1865 while (line_status & LSR_RCV_MASK) {
1866 /* break/unnattached error bits or real input? */
1867 if (!(line_status & LSR_RXRDY))
1868 recv_data = 0;
1869 else
1870 recv_data = inb(com->data_port);
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91
35 * from: i386/isa sio.c,v 1.234
36 */
37
38#include "opt_comconsole.h"
39#include "opt_compat.h"
40#include "opt_ddb.h"
41#include "opt_sio.h"

--- 1821 unchanged lines hidden (view full) ---

1863
1864 /* input event? (check first to help avoid overruns) */
1865 while (line_status & LSR_RCV_MASK) {
1866 /* break/unnattached error bits or real input? */
1867 if (!(line_status & LSR_RXRDY))
1868 recv_data = 0;
1869 else
1870 recv_data = inb(com->data_port);
1871#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER)
1872 /*
1873 * Solaris implements a new BREAK which is initiated
1874 * by a character sequence CR ~ ^b which is similar
1875 * to a familiar pattern used on Sun servers by the
1876 * Remote Console.
1877 */
1878#define KEY_CRTLB 2 /* ^B */
1879#define KEY_CR 13 /* CR '\r' */
1880#define KEY_TILDE 126 /* ~ */
1881
1882 if (com->unit == comconsole) {
1883 static int brk_state1 = 0, brk_state2 = 0;
1884 if (recv_data == KEY_CR) {
1885 brk_state1 = recv_data;
1886 brk_state2 = 0;
1887 } else if (brk_state1 == KEY_CR && (recv_data == KEY_TILDE || recv_data == KEY_CRTLB)) {
1888 if (recv_data == KEY_TILDE)
1889 brk_state2 = recv_data;
1890 else if (brk_state2 == KEY_TILDE && recv_data == KEY_CRTLB) {
1891 breakpoint();
1892 brk_state1 = brk_state2 = 0;
1893 goto cont;
1894 } else
1895 brk_state2 = 0;
1896 } else
1897 brk_state1 = 0;
1898 }
1899#endif
1871 if (line_status & (LSR_BI | LSR_FE | LSR_PE)) {
1872 /*
1873 * Don't store BI if IGNBRK or FE/PE if IGNPAR.
1874 * Otherwise, push the work to a higher level
1875 * (to handle PARMRK) if we're bypassing.
1876 * Otherwise, convert BI/FE and PE+INPCK to 0.
1877 *
1878 * This makes bypassing work right in the

--- 1385 unchanged lines hidden ---
1900 if (line_status & (LSR_BI | LSR_FE | LSR_PE)) {
1901 /*
1902 * Don't store BI if IGNBRK or FE/PE if IGNPAR.
1903 * Otherwise, push the work to a higher level
1904 * (to handle PARMRK) if we're bypassing.
1905 * Otherwise, convert BI/FE and PE+INPCK to 0.
1906 *
1907 * This makes bypassing work right in the

--- 1385 unchanged lines hidden ---