diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-07-03 08:50:13 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-07-20 10:20:19 +0100 |
commit | 8486142cf30499e1d53d7faf3a168c8ed3163ab2 (patch) | |
tree | d8e4e835da8f577d28f847fdd4a25090cdbf340e /core | |
parent | 373a42433c4bea38d4d93ee749bd4d7f19bded51 (diff) | |
download | syslinux-8486142cf30499e1d53d7faf3a168c8ed3163ab2.tar.gz |
elflink: Replace __intcall() with direct function calls
There's no reason to use the COMBOOT API at all now that we can have
any undefined symbols resolved at runtime - we can just access
functions directly.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/comboot.inc | 1 | ||||
-rw-r--r-- | core/console.c | 7 | ||||
-rw-r--r-- | core/diskfs.inc | 2 | ||||
-rw-r--r-- | core/font.c | 4 | ||||
-rw-r--r-- | core/fs/pxe/pxe.c | 3 | ||||
-rw-r--r-- | core/hello.c | 6 | ||||
-rw-r--r-- | core/include/bios.h | 1 | ||||
-rw-r--r-- | core/include/core.h | 14 | ||||
-rw-r--r-- | core/include/graphics.h | 5 | ||||
-rw-r--r-- | core/isolinux.asm | 2 |
10 files changed, 26 insertions, 19 deletions
diff --git a/core/comboot.inc b/core/comboot.inc index 1e19d288..175c50c9 100644 --- a/core/comboot.inc +++ b/core/comboot.inc @@ -842,6 +842,7 @@ zero_string db 0 ; Empty, null-terminated string ; Note: PXELINUX clears the idle is noop flag if appropriate ; in pxe_detect_nic_type ; + global feature_flags, feature_flags_len feature_flags: db 1 ; Have local boot, idle is not noop feature_flags_len equ ($-feature_flags) diff --git a/core/console.c b/core/console.c index 282c57f5..3b545bbd 100644 --- a/core/console.c +++ b/core/console.c @@ -1,18 +1,15 @@ #include <stddef.h> #include <com32.h> +#include <core.h> #include <stdio.h> #include <string.h> void myputchar(int c) { - static com32sys_t ireg; - if (c == '\n') myputchar('\r'); - ireg.eax.b[1] = 0x02; - ireg.edx.b[0] = c; - __intcall(0x21, &ireg, NULL); + writechr(c); } void myputs(const char *str) diff --git a/core/diskfs.inc b/core/diskfs.inc index 02382cc6..dcbc924a 100644 --- a/core/diskfs.inc +++ b/core/diskfs.inc @@ -109,9 +109,9 @@ PXERetry dw 0 ; Extra PXE retries section .data16 global SerialNotice SerialNotice db 1 ; Only print this once + global IPAppends, numIPAppends %if IS_PXELINUX extern IPOption - global IPAppends, numIPAppends alignz 2 IPAppends dw IPOption numIPAppends equ ($-IPAppends)/2 diff --git a/core/font.c b/core/font.c index 31fb29e7..9e7aa8f2 100644 --- a/core/font.c +++ b/core/font.c @@ -26,9 +26,7 @@ #include "graphics.h" #include "core.h" -static __lowmem char fontbuf[8192]; - -extern uint8_t UserFont; +__lowmem char fontbuf[8192]; uint16_t GXPixCols = 1; /* Graphics mode pixel columns */ uint16_t GXPixRows = 1; /* Graphics mode pixel rows */ diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index 8c956235..1e64b583 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -1187,9 +1187,6 @@ static void ip_init(void) /* * Print the IPAPPEND strings, in order */ -extern const uint16_t IPAppends[]; -extern const char numIPAppends[]; - static void print_ipappend(void) { size_t i; diff --git a/core/hello.c b/core/hello.c index 5b224784..d30fc3b9 100644 --- a/core/hello.c +++ b/core/hello.c @@ -9,14 +9,10 @@ void myputchar(int c) { - static com32sys_t ireg; - if (c == '\n') myputchar('\r'); - ireg.eax.b[1] = 0x02; - ireg.edx.b[0] = c; - __intcall(0x21, &ireg, NULL); + writechr(c); } void myputs(const char *str) diff --git a/core/include/bios.h b/core/include/bios.h index 4bf6bc43..42a9768c 100644 --- a/core/include/bios.h +++ b/core/include/bios.h @@ -74,7 +74,6 @@ extern union screen _screensize; #define VidRows _screensize.b.row /* font.c */ -extern uint16_t VGAFontSize; extern void use_font(void); extern void bios_adjust_screen(void); diff --git a/core/include/core.h b/core/include/core.h index 6604a5bc..da94dbf4 100644 --- a/core/include/core.h +++ b/core/include/core.h @@ -25,9 +25,19 @@ extern char ConfigFile[]; extern char syslinux_banner[]; extern char copyright_str[]; extern char StackBuf[]; +extern unsigned int __bcopyxx_len; extern uint8_t KbdMap[256]; +extern const uint16_t IPAppends[]; +extern const char numIPAppends[]; + +extern uint16_t SerialPort; +extern uint16_t BaudDivisor; +extern uint8_t FlowOutput; +extern uint8_t FlowInput; +extern uint8_t FlowIgnore; + /* diskstart.inc isolinux.asm*/ extern void getlinsec(void); @@ -101,16 +111,20 @@ static inline void set_flags(com32sys_t *regs, uint32_t flags) } extern int start_ldlinux(char **argv); +extern int create_args_and_load(char *); extern void write_serial(char data); extern void writestr(char *str); extern void writechr(char data); extern void crlf(void); +extern int pollchar(void); +extern char getchar(char *hi); extern void cleanup_hardware(void); extern void sirq_cleanup(void); extern void adjust_screen(void); extern void execute(const char *cmdline, uint32_t type); +extern void load_kernel(const char *cmdline); #endif /* CORE_H */ diff --git a/core/include/graphics.h b/core/include/graphics.h index 897103e5..814ffe7d 100644 --- a/core/include/graphics.h +++ b/core/include/graphics.h @@ -44,6 +44,11 @@ extern uint16_t VGAPos; extern uint16_t *VGAFilePtr; extern char VGAFileBuf[VGA_FILE_BUF_SIZE]; extern char VGAFileMBuf[]; +extern uint16_t VGAFontSize; + +extern uint8_t UserFont; + +extern __lowmem char fontbuf[8192]; extern void syslinux_force_text_mode(void); extern void vgadisplayfile(FILE *_fd); diff --git a/core/isolinux.asm b/core/isolinux.asm index 4790887c..5930a1ee 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -1219,9 +1219,9 @@ PXERetry dw 0 ; Extra PXE retries section .data16 global SerialNotice SerialNotice db 1 ; Only print this once + global IPAppends, numIPAppends %if IS_PXELINUX extern IPOption - global IPAppends, numIPAppends alignz 2 IPAppends dw IPOption numIPAppends equ ($-IPAppends)/2 |