summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/transitions/librm.S
Commit message (Collapse)AuthorAgeFilesLines
* [misc] Fix source files erroneously marked as executableMichael Brown2009-06-021-0/+0
|
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [i386] Add explicit flags and type on all .section declarationsMichael Brown2009-02-151-23/+20Star
| | | | | | | | | | | | | | | | | | | | | | | Try to avoid future problems caused by implicit section flags and/or type information by instituting a policy that all .section declarations must explicitly state the flags and type. Most of this change was achieved using perl -pi \ -e 's/".text"$/".text", "ax", \@progbits/ ; ' \ -e 's/".text16"$/".text16", "ax", \@progbits/ ; ' \ -e 's/".text16.null"$/".text16.null", "ax", \@progbits/ ; ' \ -e 's/".text16.data"$/".text16.data", "aw", \@progbits/ ; ' \ -e 's/".data"$/".data", "aw", \@progbits/ ; ' \ -e 's/".data16"$/".data16", "aw", \@progbits/ ; ' \ -e 's/".bss"$/".bss", "aw", \@nobits/ ; ' \ -e 's/".bss16"$/".bss16", "aw", \@nobits/ ; ' \ -e 's/".prefix"$/".prefix", "ax", \@progbits/ ; ' \ -e 's/".prefix.lib"$/".prefix.lib", "awx", \@progbits/ ; ' \ -e 's/".prefix.data"$/".prefix.data", "aw", \@progbits/ ; ' \ -e 's/".weak"$/".weak", "a", \@nobits/ ; ' \ `git grep -l '\.section'`
* [i386] Add data32 prefixes to all lgdt/lidt instructionsMichael Brown2008-11-071-5/+5
| | | | | | | | | | | | With a 16-bit operand, lgdt/lidt will load only a 24-bit base address, ignoring the high-order bits. This meant that we could fail to fully restore the GDT across a call into gPXE, if the GDT happened to be located above the 16MB mark. Not all of our lgdt/lidt instructions require a data32 prefix (for example, reloading the real-mode IDT can never require a 32-bit base address), but by adding them everywhere we will hopefully not forget the necessary ones in future.
* [librm] Make rm_sp and rm_ss globals againDaniel Verkamp2008-08-281-0/+2
|
* [GDB] Add GDB stub for remote debuggingStefan Hajnoczi2008-06-051-11/+32
| | | | See http://etherboot.org/wiki/dev/gdbstub for documentation.
* Fix compiler warnings that appear only on OpenBSD.Michael Brown2007-12-061-1/+1
|
* Switch rm_ss and rm_sp back to being words; it'll make it lessMichael Brown2007-09-251-7/+7
| | | | confusing to read the code.
* Don't use the "rep ss movsb" trick to copy the RM stack to the PMMichael Brown2007-09-251-31/+34
| | | | stack; it breaks vmxassist.
* rm_ss, rm_sp, and pm_esp don't need to be accessed from anywhereMichael Brown2007-09-251-3/+0Star
| | | | outside of librm.S.
* Real-mode code might set the direction flag, which would cause carnage.Michael Brown2007-07-171-0/+3
|
* Leave protected-mode return address on PM stack when issuing aMichael Brown2007-01-091-11/+10Star
| | | | | | real_call(), rather than moving it to the RM stack and back again. This allows the real-mode function to completely destroy the stack contents, provided that it manages to return to real_call().
* Don't automatically call gateA20_set() when returning from a real-modeMichael Brown2007-01-041-5/+7
| | | | call.
* Tidy up commentMichael Brown2006-05-281-4/+5
|
* Fixed assembly on old versions of gasMichael Brown2006-05-281-3/+3
|
* Documented the fact that the prefix can prot_call(main) withoutMichael Brown2006-05-261-0/+9
| | | | worrying about its stack being destroyed during the Etherboot run.
* init_librm() and prot_call() are now real-mode far calls.Michael Brown2006-05-251-4/+4
| | | | | install() now calls relocate(), moves the protected-mode code to the new location, and calls hide_etherboot().
* Removed REAL_EXEC(); there is no longer any code using it.Michael Brown2006-05-241-1/+1
|
* Remove references to obsoleted REAL_CALL from documentation.Michael Brown2006-05-241-3/+2Star
|
* Provide access to rm_cs and rm_ds from protected-mode code.Michael Brown2006-05-131-0/+2
|
* (Redoing check-in lost by SourceForge's failure.)Michael Brown2006-05-131-3/+5
| | | | | | | Use .text16.data section with "aw" attributes, to avoid section type conflicts when placing both code and data into .text16. Add __from_{text16,data16}.
* 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.
* 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-051-74/+122
| | | | | | | | | 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.
* Create two easy-to-use entry points in libprefix: install andMichael Brown2006-05-021-1/+1
| | | | | install_prealloc. I *think* these will suffice for all the 16-bit prefixes.
* Towards a(nother) new real-mode infrastructure, in which we takeMichael Brown2006-05-021-559/+283Star
| | | | | advantage of the fact that we have to have a permanently-resident block in base memory.
* (librm_base-1b) is already an offset; no need to apply OFFSET().Michael Brown2006-04-241-1/+1
| | | | | Doing so, in fact, seems to expose an assembler bug; (a-b-0) is apparently not the same as (a-b). Go figure.
* Update to cope with changes in registers.hMichael Brown2005-05-201-17/+17
|
* Make prot_call() able to transparently return via the newly installed copyMichael Brown2005-04-101-16/+54
| | | | of librm.
* lgdt needs data32 prefix, otherwise it loads only 24 bits. (sgdtMichael Brown2005-04-091-1/+1
| | | | always saves 32 bits).
* Allow ourselves to be freed by basemem.c without being damaged.Michael Brown2005-04-091-0/+16
|
* PM function called by prot_call() should be allowed to modifyingMichael Brown2005-04-091-2/+15
| | | | registers returned to RM code.
* Merged mcb30-realmode-redesign back to HEADMichael Brown2005-04-081-0/+691