summaryrefslogtreecommitdiff
path: root/core/pm.inc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
| * thread: thread-switch the real-mode stack, tooH. Peter Anvin2011-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When this code was originally written, we didn't have lmalloc(). Now when lmalloc() is implemented, let each real-mode task have its own stack. Note that this means we absolutely have to continue to support the SS != CS, DS model in the real-mode code, which should already be the case, but... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: pxe: Improve the situation with installing and uninstalling irq handlersEric W. Biederman2011-04-121-0/+1
| | | | | | | | Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
| * core: add a way to invoke a function on return to protmodeH. Peter Anvin2011-04-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Add a hook so we can invoke a protmode function immediately before enabling interrupts on the way back from protected mode. This will *not* be invoked if we are more than one level deep (i.e. [RM(0) ->] PM(0) -> RM(1) -> PM(1) -> RM(2) will not invoke the hook when returning to PM(1).) This is intended to provide a hook for taking an action after a real-mode interrupt did something, i.e. the PXE receive ISR or the timer tick. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: Reimplement lots asm code in CMatt Fleming2011-12-011-1/+2
|/ | | | | | | | | | | | | | | | | | | | There is an awful lot of code currently implemented in assembly when it could just as easily be implemented in C. Having it in C makes it much easier to share code between the BIOS and forthcoming EFI firmware backend. The following code fragments have been rewritten, - timer initialisation - adjust_screen() - check_esapes() and mem_init() - conio.inc - plaincon.inc - cleanup.inc - serirq.inc - font.inc - graphics - writehex Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* core: move the generated IDT stubs to a separate .gentext16 sectionH. Peter Anvin2009-09-021-2/+3
| | | | | | | | Move the generated IDT stubs to a separate section, .gentext16, so that they aren't immediately adjacent to a piece of highly mutable data. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: fix mismerges with the master branchH. Peter Anvin2009-05-231-10/+0
| | | | | | | Fix a couple of minor issues caused by mismerge with the master branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move real-mode callback code to callback.incH. Peter Anvin2009-05-171-0/+2
| | | | | | | | The real-mode callbacks are not specific to the comboot API, nor are they com32-specific anymore. Move them to a separate file, and let com32.inc be only the items related to comboot files proper. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move 32-bit code out of the .text16 segmentH. Peter Anvin2009-05-171-6/+14
| | | | | | | | | Move all 32-bit code out of the .text16 segment. The code that is used during the relocation of the .text segment (i.e. anywhere on the bcopy path) is moved to .textnr (other than the code already in .bcopyxx) for "no relocate", the rest of the code to .text. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: add pm_call convenience macroH. Peter Anvin2009-05-151-2/+4
| | | | | | | | | Add a pm_call convenience macro, instead of using stub routines everywhere. Stubs would still make sense if we have a routine which gets invoked from a lot of places, though, since the pm_call expands to 9 bytes as opposed to 3 bytes per call site plus a 10-byte stub. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* First cut of doing 32-bit C code in the coreH. Peter Anvin2009-05-141-25/+16
| | | | | | | | | A very preliminary implementation of 32-bit C code in the core. This currently breaks ADV, because the installer assumes the ADV is the last two sectors in extlinux.sys -- need to figure out a way to deal with this hopefully without breaking the migration protocol. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: rename .text, .data and .bss to .text16, .data16, .bss16unify-pmH. Peter Anvin2009-05-131-11/+11
| | | | | | | | Rename the .text, .data and .bss sections to .text16, .data16 and .bss16, in anticipation of being linked with compiler-generated 32-bit code, which presumably would like to use the standard section names. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: simplify pm_call usageH. Peter Anvin2009-05-131-18/+16
| | | | | | | | | | | | | | Simplify the pm_call usage: - pm_call now saves and restores all registers callees that want to return values in registers can mess with the frame on the stack - the PM function now enters with EAX = EBP = RM stack (EAX for the use of C code, EBP for assembly) - the RM stack frame matches com32sys_t - pmcall.inc defined macros for the stack frame based on EBP Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/pm.inc: shorten the time until we have a valid stackH. Peter Anvin2009-05-131-6/+6
| | | | | | Cut the time until we have a valid RM stack as much as possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pm_call: only enable interrupts in PM if interrupts on in RMH. Peter Anvin2009-05-131-0/+4
| | | | | | | When executing pm_call, only enable interrupts in PM if we were called with interrupts enabled in RM. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* New attempt at unify protected mode entry/exitH. Peter Anvin2009-05-131-0/+454
Another attempt at unify protected mode entry/exit, based on the previous bcopyint branch. This should, among other things, give a "full service" PM environment including BIOS upcalls and interrupt service to the core-internal code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>