[syslinux:master] bios: Remove comapi calls related to the ADV
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Thu Feb 13 15:42:06 PST 2014
Commit-ID: 636504f7bb6f9e86cc65addbfb36aed14dc1ecb4
Gitweb: http://www.syslinux.org/commit/636504f7bb6f9e86cc65addbfb36aed14dc1ecb4
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Thu, 13 Feb 2014 09:32:39 -0800
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Thu, 13 Feb 2014 15:40:13 -0800
bios: Remove comapi calls related to the ADV
The only comapi calls left are the ones related to the ADV and to
shuffle and boot. Remove the ADV-related ones as part of getting rid
of the comapi framework completely.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
core/adv.inc | 9 +++++++++
core/bios.c | 16 +++-------------
core/comboot.inc | 29 ++++-------------------------
core/include/core.h | 4 ++++
4 files changed, 20 insertions(+), 38 deletions(-)
diff --git a/core/adv.inc b/core/adv.inc
index 0b45a6c..288bf03 100644
--- a/core/adv.inc
+++ b/core/adv.inc
@@ -43,6 +43,13 @@ ADV_LEN equ 500 ; Data bytes
adv_retries equ 6 ; Disk retries
+ section .data
+ global __syslinux_adv_ptr, __syslinux_adv_size
+__syslinux_adv_ptr:
+ dd adv0.data
+__syslinux_adv_size:
+ dd ADV_LEN
+
section .adv
; Introduce the ADVs to valid but blank
adv0:
@@ -63,6 +70,7 @@ adv1:
; This is called after config file parsing, so we know
; the intended location of the ADV
;
+ global adv_init
adv_init:
cmp byte [ADVDrive],-1
jne adv_read
@@ -293,6 +301,7 @@ adv_cleanup:
;
; Returns CF=1 if the ADV cannot be written.
;
+ global adv_write
adv_write:
push eax
mov eax,[ADVSec0]
diff --git a/core/bios.c b/core/bios.c
index 7ad10bb..ac1f48b 100644
--- a/core/bios.c
+++ b/core/bios.c
@@ -12,6 +12,7 @@
#include <sys/vesa/video.h>
#include <sys/vesa/debug.h>
#include <minmax.h>
+#include "core.h"
__export struct firmware *firmware = NULL;
@@ -165,22 +166,12 @@ static void bios_get_serial_console_info(uint16_t *iobase, uint16_t *divisor,
*flowctl |= (0x80 << 8);
}
-void *__syslinux_adv_ptr;
-size_t __syslinux_adv_size;
-
void bios_adv_init(void)
{
static com32sys_t reg;
memset(®, 0, sizeof(reg));
- reg.eax.w[0] = 0x0025;
- __intcall(0x22, ®, ®);
-
- memset(®, 0, sizeof(reg));
- reg.eax.w[0] = 0x001c;
- __intcall(0x22, ®, ®);
- __syslinux_adv_ptr = MK_PTR(reg.es, reg.ebx.w[0]);
- __syslinux_adv_size = reg.ecx.w[0];
+ call16(adv_init, ®, NULL);
}
int bios_adv_write(void)
@@ -188,8 +179,7 @@ int bios_adv_write(void)
static com32sys_t reg;
memset(®, 0, sizeof(reg));
- reg.eax.w[0] = 0x001d;
- __intcall(0x22, ®, ®);
+ call16(adv_write, ®, ®);
return (reg.eflags.l & EFLAGS_CF) ? -1 : 0;
}
diff --git a/core/comboot.inc b/core/comboot.inc
index 6339435..c651483 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -1,7 +1,7 @@
;; -----------------------------------------------------------------------
;;
;; Copyright 1994-2009 H. Peter Anvin - All Rights Reserved
-;; Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
+;; Copyright 2009-2014 Intel Corporation; author: H. Peter Anvin
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -343,20 +343,6 @@ comapi_err:
ret
;
-; INT 22h AX=001Ch Get pointer to auxillary data vector
-;
-comapi_getadv:
- mov P_ES,ds
- mov P_BX,adv0.data
- mov P_CX,ADV_LEN
- ret
-
-;
-; INT 22h AX=001Dh Write auxillary data vector
-;
-comapi_writeadv equ adv_write
-
-;
; INT 22h AX=0024h Cleanup, shuffle and boot raw
;
comapi_shufraw:
@@ -378,13 +364,6 @@ comapi_shufraw:
mov ecx,P_ECX
jmp shuffle_and_boot_raw
-;
-; INT 22h AX=0025h Initialize the ADV structure
-;
-comapi_initadv:
- call adv_init
- ret
-
section .data16
alignz 2
@@ -417,8 +396,8 @@ int22_table:
dw comapi_err ; 0019 read disk
dw comapi_err ; 001A cleanup, shuffle and boot to pm
dw comapi_err ; 001B cleanup, shuffle and boot to rm
- dw comapi_getadv ; 001C get pointer to ADV
- dw comapi_writeadv ; 001D write ADV to disk
+ dw comapi_err ; 001C get pointer to ADV
+ dw comapi_err ; 001D write ADV to disk
dw comapi_err ; 001E keyboard remapping table
dw comapi_err ; 001F get current working directory
dw comapi_err ; 0020 open directory
@@ -426,7 +405,7 @@ int22_table:
dw comapi_err ; 0022 close directory
dw comapi_err ; 0023 query shuffler size
dw comapi_shufraw ; 0024 cleanup, shuffle and boot raw
- dw comapi_initadv ; 0025 initialize adv structure
+ dw comapi_err ; 0025 initialize adv structure
int22_count equ ($-int22_table)/2
APIKeyWait db 0
diff --git a/core/include/core.h b/core/include/core.h
index 1fd283e..f8d6cac 100644
--- a/core/include/core.h
+++ b/core/include/core.h
@@ -61,6 +61,10 @@ extern void (*core_pm_hook)(void);
/* getc.inc */
extern void core_open(void);
+/* adv.inc */
+extern void adv_init(void);
+extern void adv_write(void);
+
/* hello.c */
extern void myputs(const char*);
More information about the Syslinux-commits
mailing list