summaryrefslogtreecommitdiffstats
path: root/src/arch
Commit message (Collapse)AuthorAgeFilesLines
...
* Will be replaced with a block-device implementation.Michael Brown2006-05-241-0/+5
|
* Updated to REAL_CODE()Michael Brown2006-05-241-17/+7Star
|
* Updated to REAL_CODE().Michael Brown2006-05-241-31/+38
| | | | | | int13_boot() now does its own segment register save and restore, ready for the removal of segment register restoration from the libkir generic code.
* Updated to REAL_CODE()Michael Brown2006-05-241-14/+11Star
|
* Updated to REAL_CODE().Michael Brown2006-05-241-53/+55
|
* Update to REAL_CODE()Michael Brown2006-05-241-38/+29Star
|
* Updated to REAL_CODE().Michael Brown2006-05-241-41/+36Star
|
* Set carry flag before calling INT 15,e801 and INT 15,e820.Michael Brown2006-05-241-4/+4
| | | | | Ignore carry flag for INT 15,88; the Ralf Brown interrupt list says that CF is unreliable for this call.
* Split out REAL_CODE() from REAL_EXEC(), preparatory to removing REAL_EXECMichael Brown2006-05-242-31/+35
| | | | completely.
* Remove references to obsoleted REAL_CALL from documentation.Michael Brown2006-05-242-10/+2Star
|
* Removed REAL_FRAGMENT and REAL_CALL, and left just REAL_EXEC (which isMichael Brown2006-05-242-100/+94Star
| | | | | | | | | | | | | | | | | | the only one we actually use). This allows REAL_EXEC fragments to contain proper references to constraints (e.g. "%w0"), rather than having to force the use of specific registers. Note that the "num_constraints" parameter is now completely obsolete, and that we can probably reduce the syntax to something like __asm__ __volatile__ ( REAL_CODE ( "asm statements" ) : output constraints : input constraints : clobber ); which would look much more natural, and avoid the need to always specify a clobber list. Add userptr_t to libkir.h, to allow it to at least compile.
* Replaced memsizes.c with smaller memmap.c, taking advantage of __data16,Michael Brown2006-05-244-235/+239
| | | | and creating a memory map that's easier to work with than the E820 map.
* Code to install the new E820 mangler (which doesn't require copyingMichael Brown2006-05-241-80/+78Star
| | | | | down to base memory, since it is now in the base-memory-resident .text16 section).
* Add __{text,data}16_array, since there's no way I can see to make theMichael Brown2006-05-242-4/+14
| | | | | | usual __{text,data}16 trick work with arrays. gcc seems to accept the __asm__ ( asmlabel ) only after the [] of the array declaration, not before.
* Cope with regions bigger than 4GB.Michael Brown2006-05-241-243/+370
| | | | | | | | | | We now split e820 regions around ourselves, rather than just truncating the e820 region. This avoids the worst-case scenario of losing all memory over 4GB. It's more important to get the memory map right now that we're expecting to still be loaded when the OS starts in several situations (e.g. Linux with UNDI driver, any OS with iSCSI/AoE boot, etc.).
* Refactored to reduce code size; now down from 1304 to 1105 bytes.Michael Brown2006-05-201-120/+98Star
| | | | | | | | Tidied up debug messages; the log now contains one line per INT 13 operation, looking like INT 13,08 (80): Get drive parameters INT 13,02 (80): Read: C/H/S 0/47/14 = LBA 0xb9e <-> 1084:0000 (count 106)
* Add the concept of a "user pointer" (similar to the void __user * inMichael Brown2006-05-196-41/+105
| | | | | | | | | | | | | | | | | | | | the kernel), which encapsulates the information needed to refer to an external buffer. Under normal operation, this can just be a void * equivalent, but under -DKEEP_IT_REAL it would be a segoff_t equivalent. Use this concept to avoid the need for bounce buffers in int13.c, which reduces memory usage and opens up the possibility of using multi-sector reads. Extend the block-device API and the SCSI block device implementation to support multi-sector reads. Update iscsi.c to use user buffers. Move the obsolete portions of realmode.h to old_realmode.h. MS-DOS now boots an order of magnitude faster over iSCSI (~10 seconds from power-up to C:> prompt in bochs).
* Use typeof(sizeof(...)) to define a size_t. This stops gcc complainingMichael Brown2006-05-191-1/+1
| | | | about format errors for %zX arguments.
* Strip down i386 PCI configuration space I/O to the bare minimum. AMichael Brown2006-05-176-469/+430Star
| | | | | | | | | | typical build will now include 880 bytes of PCI support code, compared to 2327 bytes in Etherboot 5.4. (There is a slight cost of around 5 extra bytes per access to a non-constant config space address; this should be an overall win. Driver-specific accesses will usually be to constant addresses, for which there is no additional cost.)
* Restructured PCI subsystem to fit the new device model.Michael Brown2006-05-162-32/+6Star
| | | | | | | | | | | | | | Generic PCI code now handles 64-bit BARs correctly when setting "membase"; drivers should need to call pci_bar_start() only if they want to use BARs other than the first memory or I/O BAR. Split rarely-used PCI functions out into pciextra.c. Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4). 284 bytes of this saving comes from the pci/pciextra split. Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to match the names used in Linux).
* Missed a reference to heap.h.Michael Brown2006-05-161-1/+0Star
|
* Add INT 13,41 (extensions installation check). LILO's MBR now usesMichael Brown2006-05-152-0/+40
| | | | linear calls to load the MS-DOS boot sector in my test setup.
* Fix a couple of minor typos.Michael Brown2006-05-141-2/+2
|
* Also capture INT 19 as a failure path, to allow for boot sectors thatMichael Brown2006-05-141-3/+14
| | | | don't conform to BBS (e.g. the one created by mkdosfs).
* Add int13_boot(), to allow booting from INT 13 emulated drives.Michael Brown2006-05-142-0/+89
|
* Specify attributes on .text16.Michael Brown2006-05-141-1/+1
|
* Rewrote printf and friends to better support standard C semantics.Michael Brown2006-05-141-0/+1
|
* Provide access to rm_cs and rm_ds from protected-mode code.Michael Brown2006-05-132-1/+6
|
* Provide a global counter for the number of interrupts hooked.Michael Brown2006-05-131-0/+1
|
* Allow re-entrancy and provide a global counter of the number ofMichael Brown2006-05-131-0/+20
| | | | interrupts hooked.
* Define BIOS data segment in bios.hMichael Brown2006-05-132-7/+9
|
* Add flag definitions.Michael Brown2006-05-131-0/+8
|
* Add INT 13 emulation layer (which provides an interface to gPXE blockMichael Brown2006-05-132-0/+632
| | | | devices).
* Add 64-bit byte-swapping operations.Michael Brown2006-05-131-7/+38
|
* Add drivers/block and arch/i386/interface/pcbiosMichael Brown2006-05-131-0/+1
|
* (Redoing check-in lost by SourceForge's failure.)Michael Brown2006-05-133-64/+0Star
|
* (Redoing check-in lost by SourceForge's failure.)Michael Brown2006-05-132-0/+74
| | | | Add method for hooking real-mode interrupt vectors.
* (Redoing check-in lost by SourceForge's failure.)Michael Brown2006-05-134-13/+34
| | | | | | | Use .text16.data section with "aw" attributes, to avoid section type conflicts when placing both code and data into .text16. Add __from_{text16,data16}.
* (Redoing check-in lost by SourceForge's failure.)Michael Brown2006-05-131-11/+21
| | | | Avoid optimisation errors under -fstrict-aliasing.
* Preserve the whole of %esp across prot_call(). We have to split thisMichael Brown2006-05-061-7/+14
| | | | | | | | | | | | | between the low half stored in the static variable rm_sp, and the high half stored on the prot_call() stack, because: Just using the stack would screw up when a prot_call()ed routine executes a real_call(); it would have no way to find the current top of the RM stack. Extending rm_sp to rm_esp would not be safe, because the guarantee that rm_sp must return to the correct value by the time an external real-mode call returns applies only to %sp, not to %esp.
* Allow access to variables in .text16 as well as .data16. ChainedMichael Brown2006-05-063-2/+16
| | | | | interrupt vectors, for example, will be easiest to handle if placed in .text16.
* Preserve GDT across prot_call().Michael Brown2006-05-061-6/+12
|
* This line should not have been checked inMichael Brown2006-05-051-1/+0Star
|
* Add infrastructure to support access to .data16 (and .text16) variablesMichael Brown2006-05-052-76/+125
| | | | | | | | | from protected-mode code. Set up %ds to point to .data16 in prot_to_real, so that code specified via REAL_EXEC() and friends can access variables in .data16. Move most real-mode librm variables from .text16 to .data16.
* Added methods for efficiently declaring and accessing variables inMichael Brown2006-05-043-0/+59
| | | | | .data16. librm will need to supply "char *data16", i.e. the virtual address of the start of .data16.
* BSS is now zeroed by libprefix (along with the otherwise non-zeroableMichael Brown2006-05-021-3/+0Star
| | | | | | | portions such as the stack) during the installation process. init_fns() are called from main(). We need to think about initial control flow some more.
* TypoMichael Brown2006-05-021-2/+2
|
* Create two easy-to-use entry points in libprefix: install andMichael Brown2006-05-024-35/+122
| | | | | install_prealloc. I *think* these will suffice for all the 16-bit prefixes.
* <name>_size variable is no longer needed, since we don't copy the code.Michael Brown2006-05-021-3/+1Star
| | | | | However, it's worth adding a .size directive so that objdump reports the correct sizes for the code fragments.
* Towards a(nother) new real-mode infrastructure, in which we takeMichael Brown2006-05-029-1177/+460Star
| | | | | advantage of the fact that we have to have a permanently-resident block in base memory.