rpms/memtest86+/devel parity-bits.diff, NONE, 1.1 memtest86+.spec, 1.28, 1.29
Warren Togami (wtogami)
fedora-extras-commits at redhat.com
Thu Oct 18 16:11:48 UTC 2007
- Previous message (by thread): rpms/mirage/devel .cvsignore, 1.4, 1.5 mirage.spec, 1.9, 1.10 sources, 1.4, 1.5
- Next message (by thread): rpms/frysk/F-7 .cvsignore, 1.47, 1.48 frysk.spec, 1.115, 1.116 sources, 1.47, 1.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: wtogami
Update of /cvs/pkgs/rpms/memtest86+/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10558
Modified Files:
memtest86+.spec
Added Files:
parity-bits.diff
Log Message:
one more patch from mschmidt to allow configuration of parity and bits
parity-bits.diff:
--- NEW FILE parity-bits.diff ---
Index: memtest86+-1.70/lib.c
===================================================================
--- memtest86+-1.70.orig/lib.c
+++ memtest86+-1.70/lib.c
@@ -23,6 +23,9 @@ const short serial_base_ports[] = {0x3f8
#endif
int serial_baud_rate = SERIAL_BAUD_RATE;
+unsigned char serial_parity = 0;
+unsigned char serial_bits = 8;
+
char buf[18];
struct ascii_map_str {
@@ -722,6 +725,7 @@ void ttyprint(int y, int x, const char *
void serial_echo_init(void)
{
int comstat, hi, lo, serial_div;
+ unsigned char lcr;
/* read the Divisor Latch */
comstat = serial_echo_inb(UART_LCR);
@@ -731,12 +735,13 @@ void serial_echo_init(void)
serial_echo_outb(comstat, UART_LCR);
/* now do hardwired init */
- serial_echo_outb(0x03, UART_LCR); /* No parity, 8 data bits, 1 stop */
+ lcr = serial_parity | (serial_bits - 5);
+ serial_echo_outb(lcr, UART_LCR); /* No parity, 8 data bits, 1 stop */
serial_div = 115200 / serial_baud_rate;
- serial_echo_outb(0x83, UART_LCR); /* Access divisor latch */
+ serial_echo_outb(0x80|lcr, UART_LCR); /* Access divisor latch */
serial_echo_outb(serial_div & 0xff, UART_DLL); /* baud rate divisor */
serial_echo_outb((serial_div >> 8) & 0xff, UART_DLM);
- serial_echo_outb(0x03, UART_LCR); /* Done with divisor */
+ serial_echo_outb(lcr, UART_LCR); /* Done with divisor */
/* Prior to disabling interrupts, read the LSR and RBR
* registers */
@@ -969,12 +974,14 @@ void wait_keyup( void ) {
* ttyS0
* ttyS1
* ttyS0,115200
+ * ttyS0,9600e8
*/
void serial_console_setup(char *param)
{
char *option, *end;
unsigned long tty;
unsigned long baud_rate;
+ unsigned char parity, bits;
if (strncmp(param, "ttyS", 4))
return; /* not a serial port */
@@ -1005,9 +1012,42 @@ void serial_console_setup(char *param)
if (baud_rate == 0 || (115200 % baud_rate) != 0)
return; /* wrong baud rate */
+ if (*end == '\0')
+ goto save_baud_rate; /* no more options given */
+
+ switch (toupper(*end)) {
+ case 'N':
+ parity = 0;
+ break;
+ case 'O':
+ parity = UART_LCR_PARITY;
+ break;
+ case 'E':
+ parity = UART_LCR_PARITY | UART_LCR_EPAR;
+ break;
+ default:
+ /* Unknown parity */
+ return;
+ }
+
+ end++;
+ if (*end == '\0')
+ goto save_parity;
+
+ /* word length (bits) */
+ if (*end < '7' || *end > '8')
+ return; /* invalid number of bits */
+
+ bits = *end - '0';
+
+ end++;
if (*end != '\0')
return; /* garbage at the end */
+ serial_bits = bits;
+save_parity:
+ serial_parity = parity;
+save_baud_rate:
serial_baud_rate = (int) baud_rate;
save_tty:
serial_tty = (short) tty;
Index: memtest86+.spec
===================================================================
RCS file: /cvs/pkgs/rpms/memtest86+/devel/memtest86+.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- memtest86+.spec 17 Oct 2007 17:58:03 -0000 1.28
+++ memtest86+.spec 18 Oct 2007 16:11:16 -0000 1.29
@@ -6,7 +6,7 @@
Summary: Stand-alone memory tester for x86 and x86-64 computers
Name: memtest86+
Version: 1.70
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPL
ExclusiveArch: %{ix86} x86_64
Group: System Environment/Base
@@ -18,6 +18,7 @@
Patch0: additional-lib-functions.diff
Patch1: console-boot-parameter.diff
Patch2: use-strtoul-in-getval.diff
+Patch3: parity-bits.diff
Requires(preun): coreutils
# require glibc-devel.i386 via this file:
BuildRequires: %{_includedir}/gnu/stubs-32.h
@@ -37,6 +38,7 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
# Regular build flags not wanted for this binary
@@ -68,6 +70,9 @@
/sbin/new-memtest-pkg --remove %{version}
%changelog
+* Thu Oct 18 2007 Warren Togami <wtogami at redhat.com> - 1.70-3
+- one more patch from mschmidt to allow configuration of parity and bits
+
* Wed Oct 17 2007 Warren Togami <wtogami at redhat.com> - 1.70-2
- mschmidt's boot time configuration of serial console (#319631)
- Previous message (by thread): rpms/mirage/devel .cvsignore, 1.4, 1.5 mirage.spec, 1.9, 1.10 sources, 1.4, 1.5
- Next message (by thread): rpms/frysk/F-7 .cvsignore, 1.47, 1.48 frysk.spec, 1.115, 1.116 sources, 1.47, 1.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list