aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-06-21Remove 0x09 as a normal post code (forward port from bochs).Kevin O'Connor1-1/+0
2009-06-21Forward port bochs pci changes.Kevin O'Connor1-10/+3
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.
2009-06-21Forward port bochs smp changes; rename smpdetect.c to smp.c.Kevin O'Connor9-56/+97
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.
2009-06-17Support running non-pci specific vga option roms from CBFS.Kevin O'Connor3-8/+26
Load option roms from the "vgaroms/" CBFS directory during VGA scan.
2009-06-17Avoid makefile "else ifeq" syntax - old versions don't support it.Kevin O'Connor1-1/+3
2009-06-15Make sure memcpy() works in 16bit mode also.Kevin O'Connor2-0/+6
Make sure %es is set before doing a "rep movs" call.
2009-06-15Fix compile of smpdetect - last commit missed an include.Kevin O'Connor1-0/+1
2009-06-15Unify mode16/32 compiler checks.Kevin O'Connor6-18/+15
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.
2009-06-15Minor - clarify disabling "-combine" warning.Kevin O'Connor1-2/+1
2009-06-15Avoid -fwhole-program on broken gcc instead of stopping build.Kevin O'Connor6-68/+44
Enhance build to detect and avoid gcc with broken -fwhole-program Also, remove workaround for older gcc that mess up global exports.
2009-06-10Add support for gcc v3.x compilers.Kevin O'Connor7-34/+53
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.
2009-06-10Do garbage collection of unused sections.Kevin O'Connor12-51/+192
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.
2009-06-10checkstack.py should not match pushaw on stack usage check.Kevin O'Connor1-1/+1
Tighten regex so that pushaw doesn't confuse parser.
2009-06-10Try to check for IDE drive 0 responding to drive 1 commands.Kevin O'Connor1-21/+31
If the IDE primary drive is responding to secondary drive, it's hard to detect if the secondary drive is really present - skip test.
2009-05-31VGA: Move direct in/out calls out of vgafb.c.Kevin O'Connor3-27/+38
Implement wrapper calls in vgaio.c and use them instead.
2009-05-31VGA: Comment and name update.Kevin O'Connor3-77/+87
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)
2009-05-31VGA: Arrange screen writing functions to minimize stack.Kevin O'Connor1-21/+50
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.
2009-05-31VGA: Reduce stack usage.Kevin O'Connor2-7/+6
Make 'struct carattr' 3 bytes in size - gcc does better with this. Add 'noinline' directives to some funcs to reduce handle_10 stack usage.
2009-05-31VGA: No need to scroll multiple times when writing a tab.Kevin O'Connor1-35/+21
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.
2009-05-31VGA: Further simplify scrolling code.Kevin O'Connor2-169/+86
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.
2009-05-31VGA: Simplify scrolling implementation.Kevin O'Connor2-54/+18
Check for nblines==0 in calling function. Eliminate full screen clearing optimization.
2009-05-31VGA: Fix bad commit to vgafb.c - missing '}'.Kevin O'Connor1-0/+1
2009-05-31VGA: Define clear_screen in terms of memmodel.Kevin O'Connor1-10/+12
Use vmode_g->memmodel instead of memmodel and svgamode.
2009-05-31VGA: Breakup biosfn_scroll.Kevin O'Connor3-165/+217
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.
2009-05-30Fix typo in irqentryarg declaration.Kevin O'Connor1-1/+1
2009-05-27In register dump, show %esp - not address of regs.Kevin O'Connor1-2/+2
The address of the callers stack can be inferred from the address of 'regs' - do the math in the dump function.
2009-05-27Keep relocated 16bit code so checkstack can use it.Kevin O'Connor2-3/+3
Make was stripping the relocated 16bit code - keep the unstripped 16bit code so that checkstack can parse it.
2009-05-26VGA: Move cursor setting out of biosfn_write_teletype.Kevin O'Connor1-24/+14
Call set_cursor_pos in callers that need it.
2009-05-26VGA: Remove recursion from biosfn_write_teletype().Kevin O'Connor1-28/+37
2009-05-26VGA: Simplify vgafb_write/read_char.Kevin O'Connor3-68/+87
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.
2009-05-25VGA: Remove vmode_g->class - store info in vmode_g->memmodel.Kevin O'Connor4-37/+30
2009-05-25VGA: Use struct for car/attr/WITH_ATTR.Kevin O'Connor3-99/+66
The three parameters are used frequently together - define a struct to hold them. Alos, merge biosfn_write_char_attr/_only into one function.
2009-05-25VGA: Combine x/y/page into one parameter.Kevin O'Connor3-108/+90
These three values are frequently used together - put them in a struct and pass the struct around.
2009-05-25VGA: Inline biosfn_set_video_mode() into its only caller.Kevin O'Connor1-133/+107
2009-05-25VGA: Replace biosfn_load_text_* with vgafb_load_font().Kevin O'Connor3-65/+30
The functions font loading functions are nearly identical - replace with one common function.
2009-05-25VGA: Factor out hardware accesses from biosfn_set_video_mode.Kevin O'Connor4-96/+113
Create vgahw_set_mode() that handles low-level vga setup in vgaio.c. Move screen clearing to new function in vgafb.c.
2009-05-25VGA: Minor - improve indentation of palette structs.Kevin O'Connor1-57/+113
2009-05-25VGA: Inline several functions in vga.c.Kevin O'Connor1-181/+109
Move some functions directly into their only caller. Also, fix bug in handle_101210 - don't set ax.
2009-05-24Add delay when changing drive on ide.Kevin O'Connor1-2/+3
Add ndelay(400) when changing drives.
2009-05-23Eliminate "_code32_" prefix on 32bit symbols referenced from 16bit code.Kevin O'Connor5-24/+42
Use linking magic to eliminate the need for the _code32_ prefix.
2009-05-23Pack 16bit code into last part of f-segment.Kevin O'Connor4-28/+45
Locate 16bit code into the top of the f-segment. (Before some of the 16bit code was located just after the 32bit code.)
2009-05-21VGA: Define structs for save/restore state calls.Kevin O'Connor3-289/+285
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.
2009-05-18VGA: Move some ioport accesses from vga.c to vgaio.c.Kevin O'Connor3-47/+97
Move more hardware port accesses to vgaio.c.
2009-05-17VGA: Remove references to 'struct bregs' from vgaio.c code.Kevin O'Connor4-149/+109
Move the bios interface control to vga.c. Also, replace "biosfn_" prefix with "vgahw_".
2009-05-17VGA: Commit missing change to Makefile.Kevin O'Connor1-2/+2
2009-05-17VGA: Extract code from vga.c into new files vgaio.c and vgafb.c.Kevin O'Connor4-975/+1010
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.
2009-05-17VGA: Fix DAC loading during mode switch.Kevin O'Connor1-6/+4
The total dac size is stored - not the number of entries.
2009-05-17Verify ebda segment looks sane before using during resume.Kevin O'Connor4-4/+16
2009-05-17VGA: Make use of regs->ebp - now that it is present in 'struct bregs'.Kevin O'Connor1-10/+6
2009-05-16Support %ebp register in 'struct bregs'.Kevin O'Connor5-6/+17
Save/restore %ebp on irq entry. Support saving and restoring %ebp on call16. Enable display of %ebp in register dumps.