#include <stdint.h>
#include <setjmp.h>
#include <gpxe/in.h>
Go to the source code of this file.
Data Structures | |
| union | com32_reg32_t |
| struct | com32sys_t |
| struct | syslinux_pm_regs |
| struct | syslinux_rm_regs |
| struct | comboot_shuffle_descriptor |
Defines | |
| #define | COMBOOT_PSP_SEG 0x07C0 |
| Segment used for COMBOOT PSP and image. | |
| #define | COM32_START_PHYS 0x101000 |
| Entry point address of COM32 images. | |
| #define | COM32_BOUNCE_SEG 0x07C0 |
| COM32 bounce buffer segment. | |
| #define | COMBOOT_FILE_BLOCKSZ 512 |
| Size of SYSLINUX file block in bytes. | |
| #define | COMBOOT_FEATURE_LOCAL_BOOT (1 << 0) |
| COMBOOT feature flags (INT 22h AX=15h). | |
| #define | COMBOOT_FEATURE_IDLE_LOOP (1 << 1) |
| #define | COMBOOT_MAX_SHUFFLE_DESCRIPTORS 682 |
| Maximum number of shuffle descriptors for shuffle and boot functions (INT 22h AX=0012h, 001Ah, 001Bh). | |
| #define | COMBOOT_EXIT 1 |
| #define | COMBOOT_EXIT_RUN_KERNEL 2 |
| #define | COMBOOT_EXIT_COMMAND 3 |
| #define | COMBOOT_VIDEO_GRAPHICS 0x01 |
| #define | COMBOOT_VIDEO_NONSTANDARD 0x02 |
| #define | COMBOOT_VIDEO_VESA 0x04 |
| #define | COMBOOT_VIDEO_NOTEXT 0x08 |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| void | hook_comboot_interrupts () |
| Hook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h). | |
| void | unhook_comboot_interrupts () |
| Unhook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h). | |
| void | com32_intcall_wrapper () |
| void | com32_farcall_wrapper () |
| void | com32_cfarcall_wrapper () |
| int | comboot_resolv (const char *name, struct in_addr *address) |
| void | comboot_force_text_mode (void) |
| Set default text mode. | |
Variables | |
| rmjmp_buf | comboot_return |
| struct image * | comboot_replacement_image |
| void * | com32_external_esp |
Definition in file comboot.h.
| #define COMBOOT_PSP_SEG 0x07C0 |
Segment used for COMBOOT PSP and image.
Definition at line 17 of file comboot.h.
Referenced by comboot_exec(), and comboot_prepare_segment().
| #define COM32_START_PHYS 0x101000 |
Entry point address of COM32 images.
Definition at line 20 of file comboot.h.
Referenced by com32_exec(), and comboot_load_image().
| #define COM32_BOUNCE_SEG 0x07C0 |
COM32 bounce buffer segment.
Definition at line 23 of file comboot.h.
Referenced by com32_exec(), and comboot_prepare_bounce_buffer().
| #define COMBOOT_FILE_BLOCKSZ 512 |
| #define COMBOOT_FEATURE_LOCAL_BOOT (1 << 0) |
| #define COMBOOT_MAX_SHUFFLE_DESCRIPTORS 682 |
| #define COMBOOT_EXIT 1 |
Definition at line 124 of file comboot.h.
Referenced by com32_exec(), comboot_exec(), int20(), and int21().
| #define COMBOOT_EXIT_RUN_KERNEL 2 |
| #define COMBOOT_EXIT_COMMAND 3 |
| #define COMBOOT_VIDEO_GRAPHICS 0x01 |
| #define COMBOOT_VIDEO_VESA 0x04 |
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| void hook_comboot_interrupts | ( | ) |
Hook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h).
Definition at line 664 of file comboot_call.c.
References __asm__(), hook_bios_interrupt(), int20(), int20_vector, int20_wrapper(), int21(), int21_vector, int21_wrapper(), int22(), int22_vector, int22_wrapper(), and TEXT16_CODE.
Referenced by com32_exec(), and comboot_exec().
00664 { 00665 00666 __asm__ __volatile__ ( 00667 TEXT16_CODE ( "\nint20_wrapper:\n\t" 00668 "pushl %0\n\t" 00669 "pushw %%cs\n\t" 00670 "call prot_call\n\t" 00671 "addw $4, %%sp\n\t" 00672 "iret\n\t" ) 00673 : : "i" ( int20 ) ); 00674 00675 hook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper, 00676 &int20_vector ); 00677 00678 __asm__ __volatile__ ( 00679 TEXT16_CODE ( "\nint21_wrapper:\n\t" 00680 "pushl %0\n\t" 00681 "pushw %%cs\n\t" 00682 "call prot_call\n\t" 00683 "addw $4, %%sp\n\t" 00684 "iret\n\t" ) 00685 : : "i" ( int21 ) ); 00686 00687 hook_bios_interrupt ( 0x21, ( unsigned int ) int21_wrapper, 00688 &int21_vector ); 00689 00690 __asm__ __volatile__ ( 00691 TEXT16_CODE ( "\nint22_wrapper:\n\t" 00692 "pushl %0\n\t" 00693 "pushw %%cs\n\t" 00694 "call prot_call\n\t" 00695 "addw $4, %%sp\n\t" 00696 "iret\n\t" ) 00697 : : "i" ( int22) ); 00698 00699 hook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper, 00700 &int22_vector ); 00701 }
| void unhook_comboot_interrupts | ( | ) |
Unhook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h).
Definition at line 706 of file comboot_call.c.
References int20_vector, int20_wrapper(), int21_vector, int21_wrapper(), int22_vector, int22_wrapper(), and unhook_bios_interrupt().
Referenced by com32_exec(), and comboot_exec().
00706 { 00707 00708 unhook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper, 00709 &int20_vector ); 00710 00711 unhook_bios_interrupt ( 0x21, ( unsigned int ) int21_wrapper, 00712 &int21_vector ); 00713 00714 unhook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper, 00715 &int22_vector ); 00716 }
| void com32_intcall_wrapper | ( | ) |
Referenced by com32_exec().
| void com32_farcall_wrapper | ( | ) |
Referenced by com32_exec().
| void com32_cfarcall_wrapper | ( | ) |
Referenced by com32_exec().
| int comboot_resolv | ( | const char * | name, | |
| struct in_addr * | address | |||
| ) |
Definition at line 47 of file comboot_resolv.c.
References comboot_resolv_addr, comboot_resolv_rc, EINPROGRESS, NULL, resolv(), and step().
Referenced by int22().
00047 { 00048 int rc; 00049 00050 comboot_resolv_rc = -EINPROGRESS; 00051 00052 if ( ( rc = resolv ( &comboot_resolver, name, NULL ) ) != 0 ) 00053 return rc; 00054 00055 while ( comboot_resolv_rc == -EINPROGRESS ) 00056 step(); 00057 00058 *address = comboot_resolv_addr; 00059 return comboot_resolv_rc; 00060 }
| void comboot_force_text_mode | ( | void | ) |
Set default text mode.
Definition at line 144 of file comboot_call.c.
References __asm__(), comboot_graphics_mode, COMBOOT_VIDEO_GRAPHICS, COMBOOT_VIDEO_VESA, and REAL_CODE.
Referenced by com32_exec(), comboot_exec(), and int22().
00144 { 00145 if ( comboot_graphics_mode & COMBOOT_VIDEO_VESA ) { 00146 /* Set VGA mode 3 via VESA VBE mode set */ 00147 __asm__ __volatile__ ( 00148 REAL_CODE ( 00149 "mov $0x4F02, %%ax\n\t" 00150 "mov $0x03, %%bx\n\t" 00151 "int $0x10\n\t" 00152 ) 00153 : : ); 00154 } else if ( comboot_graphics_mode & COMBOOT_VIDEO_GRAPHICS ) { 00155 /* Set VGA mode 3 via standard VGA mode set */ 00156 __asm__ __volatile__ ( 00157 REAL_CODE ( 00158 "mov $0x03, %%ax\n\t" 00159 "int $0x10\n\t" 00160 ) 00161 : : ); 00162 } 00163 00164 comboot_graphics_mode = 0; 00165 }
| struct image* comboot_replacement_image |
| void* com32_external_esp |
Referenced by com32_exec().
1.5.7.1