Kevin O'Connor [Sat, 25 Jul 2009 17:54:52 +0000 (13:54 -0400)]
Update TODO items.
Kevin O'Connor [Sat, 25 Jul 2009 17:48:27 +0000 (13:48 -0400)]
Add malloc_high/fseg() and rework bios table creation to use them.
Add malloc like functions for memory management instead of open-coding
memory reservation in all callers.
Add ability for unused high ram to be returned for general purpose use.
Break up acpi table creation into multiple functions.
Also, move smbios tables into high ram (instead of f-segment).
Kevin O'Connor [Sat, 25 Jul 2009 01:49:26 +0000 (21:49 -0400)]
When enabling write access to 0xf0000, just copy from 0xffff0000.
Instead of copying the bios to temp space and then copying back to
0xf0000, just copy from the permanent location at 0xffff0000.
This should make startup slightly faster.
Kevin O'Connor [Sun, 19 Jul 2009 23:05:30 +0000 (19:05 -0400)]
Only run the vga option rom of an enabled vga device.
Find the vga device with legacy range decoding enabled. This should
allow multiple vga cards in the same machine to work properly.
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:35:38 +0000 (20:35 -0400)]
Update todo list.
Kevin O'Connor [Tue, 14 Jul 2009 00:31:35 +0000 (20:31 -0400)]
Minor - clarify intermediate object file names.
Rename romlayout16.o to code16.o.
Rename ccode32.o to code32.o.
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 [Sun, 12 Jul 2009 13:29:46 +0000 (09:29 -0400)]
Delay fdpt pointer setting in ebda to drive map stage.
Can't set the fdpt pointers during init as the ebda might get moved.
Kevin O'Connor [Sun, 12 Jul 2009 13:12:32 +0000 (09:12 -0400)]
Add u64 cast to READ64_SEG() macro to fix vga compiling.
Cast is needed when pulling pointers or other non-int types.
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:10:32 +0000 (04:10 -0400)]
Add option for running vga rom during s3 resume.
Add support for running the vga rom when the option
CONFIG_S3_RESUME_VGA_INIT is set (default is off).
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 [Wed, 1 Jul 2009 01:45:56 +0000 (21:45 -0400)]
Rework READ64_SEG macro to prevent spurious warning on gcc 4.4.
Gcc is reporting a spurious unused variable warning - work around it.
Kevin O'Connor [Wed, 1 Jul 2009 01:13:44 +0000 (21:13 -0400)]
Add descriptions to the gcc tests in tools/test-gcc.sh.
Kevin O'Connor [Fri, 26 Jun 2009 22:55:50 +0000 (18:55 -0400)]
Enhance gcc test for visible variables with -fwhole-program.
Add 'extern' decl before variable test - some older compilers wont
mark a variable visible if an extern decl precedes it.
Kevin O'Connor [Tue, 23 Jun 2009 00:05:56 +0000 (20:05 -0400)]
Don't use "objcopy --extract-symbol" - old binutils don't have that option.
Kevin O'Connor [Tue, 23 Jun 2009 00:04:56 +0000 (20:04 -0400)]
Minor - remove VAR16_32 from extern declaration in header.
Kevin O'Connor [Sun, 21 Jun 2009 13:57:33 +0000 (09:57 -0400)]
Remove 0x09 as a normal post code (forward port from bochs).
Kevin O'Connor [Sun, 21 Jun 2009 13:35:10 +0000 (09:35 -0400)]
Forward port bochs pci changes.
No need for vga io region override.
Don't need kvm to force pci interrupt line on acpi device to 9.
Set the PCI base address to 0xc0000000.
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 [Thu, 18 Jun 2009 00:35:41 +0000 (20:35 -0400)]
Support running non-pci specific vga option roms from CBFS.
Load option roms from the "vgaroms/" CBFS directory during VGA scan.
Kevin O'Connor [Thu, 18 Jun 2009 00:33:41 +0000 (20:33 -0400)]
Avoid makefile "else ifeq" syntax - old versions don't support it.
Kevin O'Connor [Tue, 16 Jun 2009 03:35:30 +0000 (23:35 -0400)]
Make sure memcpy() works in 16bit mode also.
Make sure %es is set before doing a "rep movs" call.
Kevin O'Connor [Tue, 16 Jun 2009 03:16:15 +0000 (23:16 -0400)]
Fix compile of smpdetect - last commit missed an include.
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 [Tue, 16 Jun 2009 02:45:00 +0000 (22:45 -0400)]
Minor - clarify disabling "-combine" warning.
Kevin O'Connor [Tue, 16 Jun 2009 02:27:01 +0000 (22:27 -0400)]
Avoid -fwhole-program on broken gcc instead of stopping build.
Enhance build to detect and avoid gcc with broken -fwhole-program
Also, remove workaround for older gcc that mess up global exports.
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 [Thu, 11 Jun 2009 01:40:26 +0000 (21:40 -0400)]
checkstack.py should not match pushaw on stack usage check.
Tighten regex so that pushaw doesn't confuse parser.
Kevin O'Connor [Thu, 11 Jun 2009 00:33:57 +0000 (20:33 -0400)]
Try to check for IDE drive 0 responding to drive 1 commands.
If the IDE primary drive is responding to secondary drive, it's hard
to detect if the secondary drive is really present - skip test.
Kevin O'Connor [Mon, 1 Jun 2009 02:42:04 +0000 (22:42 -0400)]
VGA: Move direct in/out calls out of vgafb.c.
Implement wrapper calls in vgaio.c and use them instead.
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 [Mon, 1 Jun 2009 00:46:43 +0000 (20:46 -0400)]
VGA: Reduce stack usage.
Make 'struct carattr' 3 bytes in size - gcc does better with this.
Add 'noinline' directives to some funcs to reduce handle_10 stack usage.
Kevin O'Connor [Mon, 1 Jun 2009 00:43:06 +0000 (20:43 -0400)]
VGA: No need to scroll multiple times when writing a tab.
A tab can only scroll the screen once.
Inline the code from check_scroll into write_teletype.
Also, move row check in write_string to handle_1013.
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 05:37:54 +0000 (01:37 -0400)]
VGA: Simplify scrolling implementation.
Check for nblines==0 in calling function.
Eliminate full screen clearing optimization.
Kevin O'Connor [Sun, 31 May 2009 05:09:30 +0000 (01:09 -0400)]
VGA: Fix bad commit to vgafb.c - missing '}'.
Kevin O'Connor [Sun, 31 May 2009 04:53:18 +0000 (00:53 -0400)]
VGA: Define clear_screen in terms of memmodel.
Use vmode_g->memmodel instead of memmodel and svgamode.
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 [Sat, 30 May 2009 07:40:22 +0000 (03:40 -0400)]
Fix typo in irqentryarg declaration.
Kevin O'Connor [Thu, 28 May 2009 02:27:10 +0000 (22:27 -0400)]
In register dump, show %esp - not address of regs.
The address of the callers stack can be inferred from the address of
'regs' - do the math in the dump function.
Kevin O'Connor [Thu, 28 May 2009 02:23:33 +0000 (22:23 -0400)]
Keep relocated 16bit code so checkstack can use it.
Make was stripping the relocated 16bit code - keep the unstripped
16bit code so that checkstack can parse it.
Kevin O'Connor [Tue, 26 May 2009 04:47:32 +0000 (00:47 -0400)]
VGA: Move cursor setting out of biosfn_write_teletype.
Call set_cursor_pos in callers that need it.
Kevin O'Connor [Tue, 26 May 2009 04:20:40 +0000 (00:20 -0400)]
VGA: Remove recursion from biosfn_write_teletype().
Kevin O'Connor [Tue, 26 May 2009 04:05:37 +0000 (00:05 -0400)]
VGA: Simplify vgafb_write/read_char.
Pass cursor position into vgafb_write_char and vgafb_read_char.
Don't pass count into vgafb_write_char.
Break text writing into separate function.
Kevin O'Connor [Tue, 26 May 2009 03:37:13 +0000 (23:37 -0400)]
VGA: Remove vmode_g->class - store info in vmode_g->memmodel.
Kevin O'Connor [Mon, 25 May 2009 15:44:11 +0000 (11:44 -0400)]
VGA: Use struct for car/attr/WITH_ATTR.
The three parameters are used frequently together - define a struct to
hold them.
Alos, merge biosfn_write_char_attr/_only into one function.
Kevin O'Connor [Mon, 25 May 2009 15:05:18 +0000 (11:05 -0400)]
VGA: Combine x/y/page into one parameter.
These three values are frequently used together - put them in a struct
and pass the struct around.
Kevin O'Connor [Mon, 25 May 2009 13:41:07 +0000 (09:41 -0400)]
VGA: Inline biosfn_set_video_mode() into its only caller.
Kevin O'Connor [Mon, 25 May 2009 13:06:50 +0000 (09:06 -0400)]
VGA: Replace biosfn_load_text_* with vgafb_load_font().
The functions font loading functions are nearly identical - replace
with one common function.
Kevin O'Connor [Mon, 25 May 2009 04:44:29 +0000 (00:44 -0400)]
VGA: Factor out hardware accesses from biosfn_set_video_mode.
Create vgahw_set_mode() that handles low-level vga setup in vgaio.c.
Move screen clearing to new function in vgafb.c.
Kevin O'Connor [Mon, 25 May 2009 04:12:18 +0000 (00:12 -0400)]
VGA: Minor - improve indentation of palette structs.
Kevin O'Connor [Mon, 25 May 2009 04:10:35 +0000 (00:10 -0400)]
VGA: Inline several functions in vga.c.
Move some functions directly into their only caller.
Also, fix bug in handle_101210 - don't set ax.
Kevin O'Connor [Sun, 24 May 2009 17:55:01 +0000 (13:55 -0400)]
Add delay when changing drive on ide.
Add ndelay(400) when changing drives.
Kevin O'Connor [Sat, 23 May 2009 22:21:18 +0000 (18:21 -0400)]
Eliminate "_code32_" prefix on 32bit symbols referenced from 16bit code.
Use linking magic to eliminate the need for the _code32_ prefix.
Kevin O'Connor [Sat, 23 May 2009 21:49:44 +0000 (17:49 -0400)]
Pack 16bit code into last part of f-segment.
Locate 16bit code into the top of the f-segment. (Before some of the
16bit code was located just after the 32bit code.)
Kevin O'Connor [Fri, 22 May 2009 03:06:08 +0000 (23:06 -0400)]
VGA: Define structs for save/restore state calls.
Define C structs for the state info.
Move hw specific code to vgahw.c.
Also, make sure to set 0x1c in regs->al on state save/restore calls.
Kevin O'Connor [Tue, 19 May 2009 03:34:00 +0000 (23:34 -0400)]
VGA: Move some ioport accesses from vga.c to vgaio.c.
Move more hardware port accesses to vgaio.c.
Kevin O'Connor [Mon, 18 May 2009 01:19:36 +0000 (21:19 -0400)]
VGA: Remove references to 'struct bregs' from vgaio.c code.
Move the bios interface control to vga.c.
Also, replace "biosfn_" prefix with "vgahw_".
Kevin O'Connor [Mon, 18 May 2009 01:14:46 +0000 (21:14 -0400)]
VGA: Commit missing change to Makefile.
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 20:16:29 +0000 (16:16 -0400)]
VGA: Fix DAC loading during mode switch.
The total dac size is stored - not the number of entries.
Kevin O'Connor [Sun, 17 May 2009 14:31:34 +0000 (10:31 -0400)]
Verify ebda segment looks sane before using during resume.
Kevin O'Connor [Sun, 17 May 2009 04:07:31 +0000 (00:07 -0400)]
VGA: Make use of regs->ebp - now that it is present in 'struct bregs'.
Kevin O'Connor [Sun, 17 May 2009 03:57:08 +0000 (23:57 -0400)]
Support %ebp register in 'struct bregs'.
Save/restore %ebp on irq entry.
Support saving and restoring %ebp on call16.
Enable display of %ebp in register dumps.
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 [Sun, 17 May 2009 01:32:27 +0000 (21:32 -0400)]
VGA: Use GET_IVT macro instead of raw GET_FARVAR.
Kevin O'Connor [Sun, 17 May 2009 01:30:10 +0000 (21:30 -0400)]
VGA: Add calling stubs for vbe functions.
Kevin O'Connor [Sun, 17 May 2009 01:05:02 +0000 (21:05 -0400)]
VGA: Use segment definitions.
Don't hardcode use of 0xc000.
Use definitions for 0xb000,0xb800,0xa000.
Kevin O'Connor [Sat, 16 May 2009 22:00:19 +0000 (18:00 -0400)]
VGA: Split biosfn_get_cursor_pos function.
Create biosfn_get_cursor_pos and biosfn_get_cursor_shape.
Kevin O'Connor [Sat, 16 May 2009 21:37:23 +0000 (17:37 -0400)]
VGA: Minor - use "_far" postfix on far pointers.
Kevin O'Connor [Sat, 16 May 2009 21:29:32 +0000 (17:29 -0400)]
VGA: Rework vga_modes[] array to have pointers to other structs.
Prefer using pointers instead of indexes into arrays.
Kevin O'Connor [Sat, 16 May 2009 19:41:23 +0000 (15:41 -0400)]
VGA: Misc syntax cleanups.
Use c99 variable declarations.
Postfix global pointers with "_g" and far pointers with "_far".
Other syntax cleanups.
Kevin O'Connor [Sat, 16 May 2009 18:55:01 +0000 (14:55 -0400)]
VGA: Minor - use "_g" suffix for global pointers.
Kevin O'Connor [Sat, 16 May 2009 02:22:12 +0000 (22:22 -0400)]
Flush debugging serial output after every line.
Wait for the serial port to be ready after every debug function.
This fixes an issue with serial port detection.
Kevin O'Connor [Thu, 14 May 2009 23:29:37 +0000 (19:29 -0400)]
VGA: Add header guard to vgasrc/vgatables.h
Kevin O'Connor [Thu, 14 May 2009 23:24:49 +0000 (19:24 -0400)]
VGA: Remove unused DEBUG ifdefs.
Kevin O'Connor [Thu, 14 May 2009 23:01:39 +0000 (19:01 -0400)]
Add missing tools/buildrom.py script.
Kevin O'Connor [Thu, 14 May 2009 02:25:24 +0000 (22:25 -0400)]
VGA: memset16_far and memcpy16_far take byte count (not word count).
Kevin O'Connor [Thu, 14 May 2009 02:06:16 +0000 (22:06 -0400)]
VGA - turn DEBUG printfs into dprintf calls.
Kevin O'Connor [Thu, 14 May 2009 00:55:31 +0000 (20:55 -0400)]
Add tools/checksum.py tool.
Kevin O'Connor [Wed, 13 May 2009 02:59:41 +0000 (22:59 -0400)]
Improve serial port detection.
Add port names for serial port registers.
When detecting serial port, ignore top two bits of IIR register.
Kevin O'Connor [Fri, 8 May 2009 02:00:25 +0000 (22:00 -0400)]
Cleanup vga inb/outb port usages.
Use symbolic names for ports.
Use VGAREG_ACTL_WRITE_DATA instead of VGAREG_ACTL_ADDRESS when writing
a value to the register.
Kevin O'Connor [Thu, 7 May 2009 03:40:07 +0000 (23:40 -0400)]
Minor - update vgasrc/vga.c todo list.
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:33:32 +0000 (23:33 -0400)]
Move assembler entry macros in romlayout.S into new file entryfuncs.S.
This allows the entry macros to be used in other assembler code.
Kevin O'Connor [Thu, 7 May 2009 03:25:40 +0000 (23:25 -0400)]
Minor - report found serial and lpt ports.
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 [Thu, 7 May 2009 03:21:13 +0000 (23:21 -0400)]
Minor - verify e820 request is large enough to hold response.
Kevin O'Connor [Thu, 7 May 2009 03:20:03 +0000 (23:20 -0400)]
Minor - add some additional vga definitions of bda.
Kevin O'Connor [Thu, 7 May 2009 03:18:48 +0000 (23:18 -0400)]
Detect ps2 nak response.
For now, just ignore the nak.
Kevin O'Connor [Wed, 6 May 2009 02:52:09 +0000 (22:52 -0400)]
Add support for field width argument to %x (eg, %08x).
Patch from Stefan Reinauer; modified by Kevin O'Connor.
Kevin O'Connor [Wed, 6 May 2009 01:47:20 +0000 (21:47 -0400)]
Don't send ATA error reports when cdrom not ready.
Based on patch from Stefan Reinauer.
Kevin O'Connor [Fri, 1 May 2009 01:50:35 +0000 (21:50 -0400)]
Add ability to run all option roms in CBFS directory "genroms/".
Kevin O'Connor [Thu, 30 Apr 2009 02:00:21 +0000 (22:00 -0400)]
Add config option to set boot menu delay time.
Add CONFIG_BOOTMENU_WAIT option with delay time (in milliseconds).
Kevin O'Connor [Tue, 28 Apr 2009 01:51:13 +0000 (21:51 -0400)]
Add support for compressed option roms.
Kevin O'Connor [Mon, 27 Apr 2009 03:17:49 +0000 (23:17 -0400)]
Add LZMA decompression support to CBFS.
Support payloads compressed with lzma.