Le 30.11.15 18:37, Stuart Henderson a écrit :
On 2015/11/30 18:10, Mathias Schmocker wrote:
Le 30.11.15 11:12, Stuart Henderson a écrit :
On 2015/11/29 19:41, Mathias Schmocker wrote:
Please find here an update for memtest86+-4.20:
http://smat.ch/memtest86+.tgz for ports/sysutils/memtest86+
Please send a cvs diff, you can use "cvs add" and "cvs rm" as necessary
and "cvs diff -uNp".
Here attached the output of cvs diff -uNp , as done in sysutils/memtest86+
Thanks.
+ /* SERIAL_BAUD_RATE - Baud rate for the serial console */
+-#define SERIAL_BAUD_RATE 9600
++#define SERIAL_BAUD_RATE 115200
I'm not really keen on this, 9600 is pretty standard as a speed for
serial consoles.
Index: patches/patch-lib_c
===================================================================
RCS file: patches/patch-lib_c
diff -N patches/patch-lib_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_c 29 Nov 2015 17:04:39 -0000
@@ -0,0 +1,106 @@
+patch based on PR 138925 http://bugs.freebsd.org
The diff in the attachment to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=138925
makes this optional - that more conservative approach seems like it's probably
a good idea.
+- outb(0xfe,0x64);
++ if (!serial_cons)
++ /* Try Keyboard Controler */
++ outb(0xfe,0x64);
++
++ /* Try Reset Control Register */
++ outb(0x02,0xcf9);
++ outb(0x06,0xcf9);
+ break;
0xcf9 makes sense to me.
In version 5.0.1, I saw the code doing while (1) on this...
(there is other problems to solve with v 5.0.1 still...)
+- /* Prior to disabling interrupts, read the LSR and RBR
+- * registers */
+- comstat = serial_echo_inb(UART_LSR); /* COM? LSR */
+- comstat = serial_echo_inb(UART_RX); /* COM? RBR */
+- serial_echo_outb(0x00, UART_IER); /* Disable all interrupts */
++ /* Disable interrupts */
++ comstat = serial_echo_inb(UART_IER);
++ comstat &= 0xf0;
++ serial_echo_outb(comstat, UART_IER);
++
++ /* disable fifo */
++ serial_echo_outb(0, UART_FCR);
++
++ /* Clear pending interrupts */
++ while (((comstat = serial_echo_inb(UART_IIR)) & UART_IIR_NO_INT) == 0) {
++ comstat &= 0x0f;
++ switch (comstat) {
++ case UART_IIR_RLSI:
++ lsr = serial_echo_inb(UART_LSR);
++ if (lsr & (UART_LSR_BI|UART_LSR_FE|UART_LSR_PE))
++ (void)serial_echo_inb(UART_RX);
++ break;
++ case UART_IIR_RDI:
++ case UART_IIR_RDI|0x8: /* fifo */
++ (void)serial_echo_inb(UART_RX);
++ break;
++ case UART_IIR_MSI:
++ (void)serial_echo_inb(UART_MSR);
++ default:
++ break;
++ }
++ }
I don't know enough about this area to know what that does..
Me neither, I just copied what was in the freebsd PR, trusting what the
comments said.
I just tested without this bit, it works too :)
+@@ -854,6 +885,7 @@
+ { 9, 0x0f}, /* ^I/TAB -> TAB */
+ { 19, 0x39}, /* ^S -> SP */
+ { 17, 28}, /* ^Q -> CR */
++ { 80, 0x3B}, /* F1 key for failsafe on serial_cons (and 'P') */
+
+ { ' ', 0x39}, /* SP -> SP */
+ { 'a', 0x1e},
makes sense to me.