summaryrefslogtreecommitdiff
path: root/src/serial.c
Commit message (Collapse)AuthorAgeFilesLines
* Move most of the VAR16FIXED() defs to misc.c.Kevin O'Connor2014-06-041-3/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* debug: Add runtime option to not report the debug serial port to the OS.Kevin O'Connor2014-01-221-0/+4
| | | | | | | | | | DOS resets the serial ports reported by the BIOS. This can mess up debugging and timing when the serial baud rate changes on the debug port. The new "etc/advertise-serial-debug-port" option allows one to suppress the debug serial port from the normal list of serial ports the BIOS reports to DOS. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Remove ioport.h; disperse its contents to other header files.Kevin O'Connor2013-09-281-0/+1
| | | | | | | Move the inb(), insb(), etc. code from ioport.h to x86.h. Move the PORT_* definitions to their appropriate hardware files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Move function definitions for output.c from util.h to new file output.h.Kevin O'Connor2013-09-181-1/+2
| | | | | | Also, sort the order of include files in the c files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Move stacks.c definitions from util.h to new file stacks.h.Kevin O'Connor2013-09-181-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Rename check_timer() function (and similar) to irqtimer_check().Kevin O'Connor2013-07-211-6/+6
| | | | | | | Rename functions to be more consistent and so they are not confused with the normal timer functions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Minor - remove CLEARBITS_BDA and SETBITS_BDA macros.Kevin O'Connor2012-06-101-4/+2
| | | | | | | Remove these infrequently used macros and replace with explicit GET_BDA/SET_BDA calls. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Generalize timer based delay code.Kevin O'Connor2010-05-231-31/+6
| | | | | | Move the timer based counting code in serial.c to clock.c. Rework the interface to make it similar to the tsc based timers.
* Be sure to add "void" to all function prototypes that take no args.Kevin O'Connor2010-01-031-2/+2
| | | | Omitting "void" leads to a K&R style declaration which was not intended.
* Distinguish between debug reports for unimplemented vs invalid calls.Kevin O'Connor2009-12-131-8/+6
| | | | | | | | Don't use "fail" in the debug output - as this confuses users. When reporting on an invalid parameter - use the word "invalid". When reporting on an unimplemented call - state it is unimplemented. Add separate debug levels for unimplemented vs invalid calls. Also, increase the debug level of several entry points.
* Replace irq_enable() regions with explicit calls to check for irqs.Kevin O'Connor2009-10-241-6/+3
| | | | | | | | Add new function yield() which will permit irqs to trigger. The yield() call enables irqs to occur in 32bit mode. Add [num]sleep calls that yield instead of just spinning. Rename existing int 1586 usleep call to biosusleep. Convert many calls to mdelay to msleep.
* Cleanup serial and lpt timers.Kevin O'Connor2009-07-131-53/+83
| | | | | | | | Separate out the 18.2Hz timer check into its own code. Cleanup serial return codes. Use a real timers for lpt port. Replace lpt "nop" call with udelay(5). Move irq_enable() into calls that need it.
* Improve serial port detection.Kevin O'Connor2009-05-121-24/+27
| | | | | Add port names for serial port registers. When detecting serial port, ignore top two bits of IIR register.
* Minor - report found serial and lpt ports.Kevin O'Connor2009-05-061-1/+3
|
* Move variables from assembler to C code.Kevin O'Connor2009-01-171-0/+3
| | | | | | | | Define macro VAR16FIXED for declaring a variable at a fixed location. Introduce new file src/misc.c, and move non int15 calls from system.c to it. Implement all fixed location variables in C code. Move IDT/GDT defs to misc.c. Remove unused gdt entry 1.
* Misc fixes.Kevin O'Connor2009-01-171-0/+1
| | | | | The pnp bios string can't be const and VAR16_32. Show ps2 port status when discarding data.
* Change license from GPLv3 to LGPLv3.Kevin O'Connor2009-01-151-1/+1
| | | | | | | | Change license of contributions from Kevin O'Connor from GPLv3 to LGPLv3 (or later). Since the work as a whole is based on Kevin's contributions and the "bochs bios" which has a license of LGPL (v2 or later), this effectively makes the work as a whole available under LGPLv3 (or later).
* Add additional config options to remove parts of code.Kevin O'Connor2008-07-211-0/+14
| | | | | | | Added options CONFIG_BOOT, CONFIG_SERIAL, CONFIG_LPT, CONFIG_KEYBOARD, CONFIG_BOOTMENU. Also extended coverage of existing options to ensure full code got removed.
* Extract 'struct bregs' out of biosvar.h; clean up header includes.Kevin O'Connor2008-07-041-1/+2
|
* Support config driven debugging of each irq handler.Kevin O'Connor2008-06-121-2/+2
| | | | This allows one to easily enable verbose output from handlers.
* Move debugging messages to appropriate functions.Kevin O'Connor2008-06-081-0/+2
| | | | Move dprintf calls from post() to the function calls that perform the work.
* Serial debugging code must not access BDA.Kevin O'Connor2008-06-071-39/+10
| | | | | | | | | | Regular serial writing code uses the system timer to timeout failed writes - however, serial debugging can't rely on access to the BDA segment or the hardware timer. Therefore, implement a simple debug only serial writing function and separate it from the regular serial output code. Also include change to dump_regs - don't call __dprintf if debugging not on.
* Add support for sending debug messages to a serial port.Kevin O'Connor2008-05-071-9/+42
| | | | Enable by turning on CONFIG_DEBUG_SERIAL option.
* Move serial/lpt setup from post.c to serial.cKevin O'Connor2008-04-131-0/+55
|
* Replace debug_exit calls with debug info while setting a failure.Kevin O'Connor2008-03-091-13/+11
| | | | | | Calling debug_exit at the end of a call doesn't help much - several of the registers are already clobbered at this point. It also increases stack usage because it prevents call tail optimization in many places.
* Rename VISIBLE macro for better control.Kevin O'Connor2008-03-051-2/+2
| | | | | VISIBLE16 is used to mark functions externally available in 16bit code. VISIBLE32 is for 32bit functions.
* Version 0.1.2rel-0.1.2Kevin O'Connor2008-02-251-0/+209
|
* Initial checkin.rel-0.1.0Kevin O'Connor2008-02-251-0/+23