Search
j0ke.net Open Build Service
>
Projects
>
stresslinux
>
memtest86+
> serial-enable
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File serial-enable of Package memtest86+ (Revision 13)
Currently displaying revision
13
,
show latest
--- memtest86+-2.01/config.h +++ memtest86+-2.01/config.h @@ -13,7 +13,7 @@ /* SERIAL_CONSOLE_DEFAULT - The default state of the serial console. */ /* This is normally off since it slows down testing. Change to a 1 */ /* to enable. */ -#define SERIAL_CONSOLE_DEFAULT 0 +#define SERIAL_CONSOLE_DEFAULT 1 /* SERIAL_TTY - The default serial port to use. 0=ttyS0, 1=ttyS1 */ #define SERIAL_TTY 0 --- memtest86+-2.01/init.c +++ memtest86+-2.01/init.c @@ -40,6 +40,7 @@ static void cacheable(void); static int cpuspeed(void); int beepmode; +extern short serial_cons; static void display_init(void) { @@ -76,6 +77,9 @@ } serial_echo_print("\x1B[0m"); + + if (!serial_cons && SERIAL_CONSOLE_DEFAULT) + cprint (23, 0, "Timout on serial console: disabled"); } /* --- memtest86+-2.01/serial.h +++ memtest86+-2.01/serial.h @@ -140,10 +140,12 @@ #define serial_echo_inb(a) inb((a)+serial_base_ports[serial_tty]) #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) /* Wait for transmitter & holding register to empty */ -#define WAIT_FOR_XMITR \ - do { \ - lsr = serial_echo_inb(UART_LSR); \ - } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY) +#define WAIT_FOR_XMITR \ + int _i = 1<<15; \ + do { \ + lsr = serial_echo_inb(UART_LSR); \ + } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY && --_i); \ + if (!_i) serial_cons = 0 #if 0 static inline void serial_echo(int ch)