aboutsummaryrefslogtreecommitdiff
path: root/src/serial.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-06serial: Disable serial port detection on 64-bit machinesHelge Deller1-0/+3
The serial ports on 64-bit machines are PCI devices only. Skip searching on typical serial port addresses to avoid HPMCs. Signed-off-by: Helge Deller <deller@gmx.de>
2021-09-24Add portaddr_t typedef to specify I/O port addressesHelge Deller1-1/+3
On x86 I/O ports are located below address 0x4000, while on PA-RISC I/O ports are allowed in the whole 32/64 bit address space. So, introduce a portaddr_t typedef which defaults to the current u16 type on x86 and to unsigned long on PA-RISC. Signed-off-by: Helge Deller <deller@gmx.de>
2014-06-04Move most of the VAR16FIXED() defs to misc.c.Kevin O'Connor1-3/+0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-01-22debug: Add runtime option to not report the debug serial port to the OS.Kevin O'Connor1-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>
2013-09-28Remove ioport.h; disperse its contents to other header files.Kevin O'Connor1-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>
2013-09-18Move function definitions for output.c from util.h to new file output.h.Kevin O'Connor1-1/+2
Also, sort the order of include files in the c files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Move stacks.c definitions from util.h to new file stacks.h.Kevin O'Connor1-0/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-07-21Rename check_timer() function (and similar) to irqtimer_check().Kevin O'Connor1-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>
2012-06-10Minor - remove CLEARBITS_BDA and SETBITS_BDA macros.Kevin O'Connor1-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>
2010-05-23Generalize timer based delay code.Kevin O'Connor1-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.
2010-01-03Be sure to add "void" to all function prototypes that take no args.Kevin O'Connor1-2/+2
Omitting "void" leads to a K&R style declaration which was not intended.
2009-12-13Distinguish between debug reports for unimplemented vs invalid calls.Kevin O'Connor1-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.
2009-10-24Replace irq_enable() regions with explicit calls to check for irqs.Kevin O'Connor1-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.
2009-07-13Cleanup serial and lpt timers.Kevin O'Connor1-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.
2009-05-12Improve serial port detection.Kevin O'Connor1-24/+27
Add port names for serial port registers. When detecting serial port, ignore top two bits of IIR register.
2009-05-06Minor - report found serial and lpt ports.Kevin O'Connor1-1/+3
2009-01-17Move variables from assembler to C code.Kevin O'Connor1-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.
2009-01-17Misc fixes.Kevin O'Connor1-0/+1
The pnp bios string can't be const and VAR16_32. Show ps2 port status when discarding data.
2009-01-15Change license from GPLv3 to LGPLv3.Kevin O'Connor1-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).
2008-07-21Add additional config options to remove parts of code.Kevin O'Connor1-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.
2008-07-04Extract 'struct bregs' out of biosvar.h; clean up header includes.Kevin O'Connor1-1/+2
2008-06-12Support config driven debugging of each irq handler.Kevin O'Connor1-2/+2
This allows one to easily enable verbose output from handlers.
2008-06-08Move debugging messages to appropriate functions.Kevin O'Connor1-0/+2
Move dprintf calls from post() to the function calls that perform the work.
2008-06-07Serial debugging code must not access BDA.Kevin O'Connor1-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.
2008-05-07Add support for sending debug messages to a serial port.Kevin O'Connor1-9/+42
Enable by turning on CONFIG_DEBUG_SERIAL option.
2008-04-13Move serial/lpt setup from post.c to serial.cKevin O'Connor1-0/+55
2008-03-09Replace debug_exit calls with debug info while setting a failure.Kevin O'Connor1-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.
2008-03-05Rename VISIBLE macro for better control.Kevin O'Connor1-2/+2
VISIBLE16 is used to mark functions externally available in 16bit code. VISIBLE32 is for 32bit functions.
2008-02-25Version 0.1.2rel-0.1.2Kevin O'Connor1-0/+209
2008-02-25Initial checkin.rel-0.1.0Kevin O'Connor1-0/+23