aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Note version 0.4.2.rel-0.4.2Kevin O'Connor2009-09-081-1/+1
|
* Ramdisk cleanups.Kevin O'Connor2009-08-301-12/+14
| | | | | | | Use malloc code to allocate space for floppy image instead of searching e820 map - this prevents a possible conflict with memory allocated by pmm. Check int 1587 return code.
* Cleanups for malloc code.Kevin O'Connor2009-08-305-30/+29
| | | | | | Fix bug where zones over 2gig may fail to allocate. Add memalign_high() and use for acpi facs allocation. Misc code cleanups.
* Add defines for floppy constants.Kevin O'Connor2009-08-231-35/+40
| | | | | | Add defines for several of the codes used in floppy.c. Also, actually send the gap length in the floppy commands. Also, adjust count in floppy_cmd instead of all callers.
* Add initial support for PMM allocations of permanent memory.Kevin O'Connor2009-08-221-10/+20
| | | | | Support PCIv3 PMM requests for permanent memory. Only support permanent high memory requests for now.
* Merge cdrom 13xx handlers with main disk 13xx handlers.Kevin O'Connor2009-08-183-188/+124
| | | | | | | | | | Most of the cdrom_13 code did the same thing as disk_13 - so merge them together. Add definitions for 0xe0 (EXTSTART_CD) and 0x80 (EXTSTART_HD). This changes the behavior for cdroms on 1315 and 1316 calls - previously 1315 returned an error and set ah=2, now it sets ah=1 and doesn't return an error; previously 1316 returned ok, not it returns EPARAM.
* Fix bug causing layoutrom.py to break if no rodata sections.Kevin O'Connor2009-08-181-1/+1
| | | | Handle case where there are no rodata sections.
* Update todo.Kevin O'Connor2009-08-181-4/+0
|
* Further simplify cbfs functions - don't pass iscomp to callers.Kevin O'Connor2009-08-184-36/+19
| | | | | The cbfs data copy function can determine if the file is compressed on its own - it doesn't need the iscomp parameter passed in.
* Work around qemu quirk - dh not reset on ata drive reset.Kevin O'Connor2009-08-181-0/+3
|
* Add support for using floppy images in CBFS.Kevin O'Connor2009-08-1612-29/+161
| | | | | | Add new "ramdisk" type for disk accesses. Extract out high-mem finding code from pmm into find_high_area(). Fix bug in GDB_BASE and GDT_LIMIT macros (wrong bit shifts).
* Rework coreboot cbfs interface for added flexibility.Kevin O'Connor2009-08-164-108/+134
| | | | | Allow callers to track the cbfs_file pointer. Also, remove obsolete code for brute-force flash scanning.
* Unify floppy and harddrive command routing.Kevin O'Connor2009-08-165-180/+224
| | | | | Implement low-level floppy commands using the disk_op structure. The requests can then be filled using the regular disk_13xx functions.
* Unify some floppy and disk functions.Kevin O'Connor2009-08-163-115/+89
| | | | | Merge floppy_1301/1308/1315/1316/_ret() functions with their disk equivalents. Store floppy type in drives structure.
* Change send_disk_op() to return the bios status code.Kevin O'Connor2009-08-162-29/+28
|
* Enhance boot menu to allow selection of floppy to boot from.Kevin O'Connor2009-08-161-4/+12
| | | | | | The bootmenu can now reorder the first floppy drive. Note - only the drive mapping is changed - floppy variables in the BDA are still set depending on the real floppy index.
* Add floppy controllers to "drives" list also.Kevin O'Connor2009-08-168-247/+196
| | | | | | | | | | | | The Drives.drives list now contains floppies, harddrives, and cdroms. Add mapping table for external/internal drive ids for floppies. Rename CONFIG_FLOPPY_SUPPORT to CONFIG_FLOPPY (for consistency). Be consistent with "driveid" and "floppyid" variable names. Replace switch statements of drive parameters into a global array. There are some externally visible changes with this patch: - Some calls will now return EPARAM instead of ETIMEOUT (or ECHANGED) - floppy_1301/1308 are now only available when regs->dl is valid - floppy_1308/1315 return EPARAM on invalid drives
* Store cdrom emulated driveid directly.Kevin O'Connor2009-08-114-16/+15
|
* Use variable name "driveid" consistently (instead of "device").Kevin O'Connor2009-08-113-158/+158
|
* Separate ATA code from generic disk code.Kevin O'Connor2009-08-1112-312/+366
| | | | | | | | Move generic code from ata.c to new file block.c. Rename atabits.h to ata.h and move ata header definitions from disk.h. Rename ATA.channels to ATA_channels. Rename ATA structure to Drives. Support both CONFIG_DRIVES and CONFIG_ATA options.
* Minor - remove ATA specific version field from ATA.devices[].Kevin O'Connor2009-08-112-11/+15
|
* Densely populate ATA.devices list.Kevin O'Connor2009-08-113-38/+55
| | | | | | Populate ATA.devices in order of drives found; the array index no longer correlates with the ATA.channels list. Add cntl_id to device struct for finding the channel info.
* Misc ATA cleanups.Kevin O'Connor2009-08-105-88/+80
| | | | | | | | | Remove some unused defines. Rename ATA_TYPE_* to DTYPE_* and move from atabits.h to disk.h. Rename ATA_TRANSLATION_* to TRANSLATION_* and move from atabits.h to disk.h. Convert bios is-drive-ready call to use send_disk_op(). Only add atapi devices to the cdmap if they are cd/dvd roms. Remove 'device' from struct ata_devices_s.
* Add helper macros for defining GDT descriptors.Kevin O'Connor2009-08-103-41/+31
|
* Route disk_op commands by drive type - not by command.Kevin O'Connor2009-08-094-42/+72
| | | | | | | Don't confuse op->command with low-level ata cmd->command. Modify __send_disk_op to route commands by drive type. Add commands for verify and seek operations. Do ata resets via disk_op also.
* Remove unused cdemu ATA code.Kevin O'Connor2009-08-094-141/+42
| | | | | | Remove the low-level ATA code for short reads on cdroms now that cd emulation is done at higher-level. Also, remove sector_count from ebda - ata code updates op->count now.
* Implement cdrom disk emulation at high-level instead of in low-level ATA.Kevin O'Connor2009-08-093-60/+104
| | | | | | | | | Add a 2K buffer to the ebda to allow for cdrom 512 byte vs 2048 byte sector emulation. For unaliagned cdemu reads, just make multiple cdrom reads instead of using ata specific code for short reads. Also, define cdemu virtual sectors using struct chs_s, and update legacy_lba() func to take pointer to a chs_s struct.
* Update tools/checkstack.py - new compilers set %ebp in preamble.Kevin O'Connor2009-08-091-0/+3
| | | | | A 'movl %esp,%ebp' can occur in the preamble - note for proper stack usage checking.
* Separate cdemu disk accesses from regular disk accesses.Kevin O'Connor2009-08-093-60/+89
| | | | | | | Breakup basic_access() into basic_access, cdemu_access, and legacy_lba. Also, check for verify and seek calls in __send_disk_op instead of all callers. Also, send_disk_op returns sector count in dop.count instead of via ebda.
* Use regular CD reading to load initial CDROM boot image.Kevin O'Connor2009-08-091-3/+3
| | | | | | | Use cdrom_read() instead of cdrom_read_512() for loading the initial image. The initial image will always start on a 2K block, and it should be okay to load extra sectors if the sector count doesn't end on a 2K boundary.
* Add option CONFIG_SCREEN_AND_DEBUG to control printf and debugging.Kevin O'Connor2009-08-022-3/+4
| | | | | New option controls whether or not printf content is also written to the debug ports.
* Fix some PMM corner-cases.Kevin O'Connor2009-08-021-13/+29
| | | | | | | | | | Make sure not to divide by zero when calculating usage percent in debug messages. Make sure high memory zones are aligned; make sure zone is big enough even after loss due to alignment. Be sure to reset ZoneTmpHigh and PMMAllocs on failure paths. Fix corner case in pmm_free() where an allocation might not get freed due to ordering of pmmalloc_s structs.
* Add Post Memory Manager (PMM) support.Kevin O'Connor2009-08-0114-128/+359
| | | | | | | | | | | | Complete the initial implementation of PMM. Default new PMM code to be enabled. Move malloc code from memmap.c to pmm.c. Define new malloc zones for PMM (ZoneTmpLow and ZoneTmpHigh). Change default READ/WRITE_SEG macros to use 32bit pointers (the 16bit PMM code use "big real" mode and requires 32bit accesses). Allow pmm allocations to occur during bcv executions also. Add low-memory clearing before boot. Also, align the default f-seg memory.
* Update TODO items.Kevin O'Connor2009-07-301-5/+1
|
* Add auto-generated version info to each build.Kevin O'Connor2009-07-295-7/+16
| | | | Add versioning info to initial debug and screen banner output.
* Minor - breakup mptable allocation into two calls.Kevin O'Connor2009-07-291-6/+4
|
* mptable and madt irq overrideKevin O'Connor2009-07-293-11/+37
| | | | | | | | | | Implement irq override support for timer interrupts. This matches what QEMU+BOCHS has been doing for the latest 8 months, and is also what real hardware does. Windows expects this according to Beth Kon. Based on patch by Jes Sorensen <jes@sgi.com>
* Fix coreboot bios table copying by delaying to after memory scan.Kevin O'Connor2009-07-284-104/+132
| | | | | | | | Delay coreboot bios table scan after memory scan and malloc setup is complete. Also, fix sign underflow in malloc memory available check. Add check to ensure high bios area is big enough for zone. Add more debug info to malloc setup/finalize.
* Add PMM stubs.Kevin O'Connor2009-07-266-3/+161
| | | | | Add initial code for Post Memory Manager - it's just the stubs for now. Also, fix PnP entry point not clearing irqs and direction flags.
* Add support for enabling ram in 0xc0000-0xf0000 area.Kevin O'Connor2009-07-264-34/+74
| | | | | | | | | | Enhance shadow ram support to enable read/write of option rom area. This enables support for option roms that modify themselves. Support copying the roms before enabling shadowing, to work around the qemu implementation of ram shadowing. Rename next_rom to RomEnd and export it. Support locking ram being used for optionroms before booting. Don't bother and'ing/or'ing 0x59 register - it's usage is well defined.
* Update TODO items.Kevin O'Connor2009-07-252-9/+1
|
* Add malloc_high/fseg() and rework bios table creation to use them.Kevin O'Connor2009-07-259-229/+307
| | | | | | | | 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).
* When enabling write access to 0xf0000, just copy from 0xffff0000.Kevin O'Connor2009-07-243-20/+17
| | | | | | 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.
* Only run the vga option rom of an enabled vga device.Kevin O'Connor2009-07-193-1/+58
| | | | | Find the vga device with legacy range decoding enabled. This should allow multiple vga cards in the same machine to work properly.
* Expand int155f "vgahook" detection.Kevin O'Connor2009-07-195-39/+122
| | | | | | 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.
* Update todo list.rel-0.4.1Kevin O'Connor2009-07-131-15/+35
|
* Minor - clarify intermediate object file names.Kevin O'Connor2009-07-131-11/+13
| | | | | Rename romlayout16.o to code16.o. Rename ccode32.o to code32.o.
* Cleanup serial and lpt timers.Kevin O'Connor2009-07-132-53/+85
| | | | | | | | 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.
* Delay fdpt pointer setting in ebda to drive map stage.Kevin O'Connor2009-07-122-2/+8
| | | | Can't set the fdpt pointers during init as the ebda might get moved.
* Add u64 cast to READ64_SEG() macro to fix vga compiling.Kevin O'Connor2009-07-121-1/+1
| | | | Cast is needed when pulling pointers or other non-int types.