Kevin O'Connor [Sun, 19 Jul 2009 22:52:46 +0000 (18:52 -0400)]
Expand int155f "vgahook" detection.
Verify VGA card vendor is via before supporting via 155f calls.
Add support for future code depending on coreboot board id.
Add code for via VX855 memory size and speed detection.
Kevin O'Connor [Tue, 14 Jul 2009 00:29:07 +0000 (20:29 -0400)]
Cleanup serial and lpt timers.
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.
Kevin O'Connor [Sat, 4 Jul 2009 17:46:33 +0000 (13:46 -0400)]
Use "p->sum -= checksum()" style for setting checksums.
Some code cleared the original checksum and then calculated a new one,
others manipulated the checksum range to not include the old
checksum. However, this was error prone - use the "-=" syntax
consistently to reduce possible errors.
Kevin O'Connor [Sat, 4 Jul 2009 08:04:36 +0000 (04:04 -0400)]
Optionrom code cleanup.
Nearly all calers of callrom() use OPTION_ROM_INITVECTOR - make it
default.
Prefer (void*) to explicit casts.
Rename init_optionrom to init_pcirom; rename verifysize_optionrom to
init_optionrom.
Add 'isvga' parameter to init_optionrom/init_pcirom; unify vga call
path to use these functions.
Extract cbfs directory scanning into new function run_cbfs_roms().
Allow roms in "vgaroms/" to run even if no pci vga device exists.
Comment improvements.
Kevin O'Connor [Sun, 21 Jun 2009 13:10:28 +0000 (09:10 -0400)]
Forward port bochs smp changes; rename smpdetect.c to smp.c.
Rename smpdetect.c to smp.c - the code does more than just cpu detection.
Don't probe cpu count on demand - schedule it during post.
Add logic to run wrmsr on all cpus.
Don't make mtrr setup specific to kvm - do it on all machines that
have mtrr and msrs.
Detect cpu signature/features automatically in mptable.
Also, make sure acpi structures are packed.
Kevin O'Connor [Tue, 16 Jun 2009 03:03:05 +0000 (23:03 -0400)]
Unify mode16/32 compiler checks.
Add ASSERT16/ASSERT32 macros to farptr.h.
Use those macros in place of open-coded checks.
Add "noreturn" attribute to functions to reduce compiler warnings.
Add ASSERT32 to smp_probe() to eliminate 16bit assembler warnings.
Kevin O'Connor [Thu, 11 Jun 2009 02:44:06 +0000 (22:44 -0400)]
Add support for gcc v3.x compilers.
Suppress __attribute__((externally_visible)) when no -fwhole-program
Add switch hack for compilers without -fno-jump-tables
Define memcpy() function (for compilers without -minline-all-stringops).
Define call16_simpint as a macro (a param needs to be inlined).
Make sure s3_resume is only defined in 32bit mode.
Kevin O'Connor [Thu, 11 Jun 2009 01:56:01 +0000 (21:56 -0400)]
Do garbage collection of unused sections.
Implement -ffunction-sections and -fdata-sections in both 32bit and
16bit code.
Make sure all sections have unique names (even asm and discarded
sections).
Enhance tools/layoutrom.py script to find all sections reachable from
exported 16bit code - prune all other sections.
Mark sections with "export" if they can be visible outside of code -
these sections wont be dropped when pruning unused sections.
Kevin O'Connor [Mon, 1 Jun 2009 02:00:20 +0000 (22:00 -0400)]
VGA: Comment and name update.
Remove remaining "biosfn_" prefixes from functions.
Don't use register names as function parameters.
vgafb_read_pixel should return a value (instead of passing in a pointer)
Kevin O'Connor [Mon, 1 Jun 2009 01:15:33 +0000 (21:15 -0400)]
VGA: Arrange screen writing functions to minimize stack.
Pass pointer to cursor position into write_string and write_teletype.
Handle flag processing of write_string in handle_1013.
Implement a tail-recursive scroll_one() function.
Kevin O'Connor [Sun, 31 May 2009 19:25:14 +0000 (15:25 -0400)]
VGA: Further simplify scrolling code.
Introduce memcpy_stride and memset_stride functions.
Simplify the moves and fills using src and dest pointers.
Don't nest for loops - just use one loop for copies.
Kevin O'Connor [Sun, 31 May 2009 04:46:47 +0000 (00:46 -0400)]
VGA: Breakup biosfn_scroll.
Rename biosfn_scroll to vgafb_scroll.
Break function up into per-mode scroll function.
Pass row/col params in a 'struct cursorpos'.
Encode direction as sign in nblines.
Move parameter checking to callers.
Add enhancement to 'attr' for using mode specific default attribute.
Also, make get_cursor_pos local to vga.c.
Kevin O'Connor [Sun, 17 May 2009 22:11:33 +0000 (18:11 -0400)]
VGA: Extract code from vga.c into new files vgaio.c and vgafb.c.
Move hardware IO accessor functions to vgaio.c.
Move framebuffer and font manipulation code to vgafb.c.
Also, have biosfn_write_teletype use biosfn_write_char_attr/only.
Also, breakout set_scan_lines() functionality from biosfn_load_text_X.
Kevin O'Connor [Sun, 17 May 2009 03:31:27 +0000 (23:31 -0400)]
Define unified entry points for irq handlers.
The irq entry points now push the handler address and jump to a
function that does parameter setup. This reduces the code size
because the entry setup isn't repeated for every handler.
Kevin O'Connor [Thu, 7 May 2009 03:35:59 +0000 (23:35 -0400)]
Add initial port of the "open source vga bios" project.
This is an initial import of the code from:
http://www.nongnu.org/vgabios/
The code has been ported from bcc to gcc and gas.
This is an initial import - many functions have not been ported; many
bugs are present.
Kevin O'Connor [Thu, 7 May 2009 03:23:01 +0000 (23:23 -0400)]
Minor - formatting enhancements; add memset_far funcs.
Use consistent types in mtrr.c.
Remove extra ';' from lds files.
Report found serial and lpt ports.
Remove extra newlines from inline asm.
Add memset_far and memset16_far functions.
Kevin O'Connor [Mon, 20 Apr 2009 03:18:54 +0000 (23:18 -0400)]
Fixup previous memcpy optimization.
Different gcc versions handle __builtin_memcpy differently.
Add -minline-all-string to force inlining of memcpy on old gcc.
Always use __builtin_memcpy for all memcpy calls.
Use memcpy4() for the option rom case where 4-byte accesses is important.