Displaying 20 results from an estimated 20 matches for "eflags_cf".
2005 Sep 17
2
com16/com32 module for APM powerdown
...) 1999,2005 Luciano Rocha.\n");
/* clear input registers */
memset(&in, '\0', sizeof in);
/* check APM support and version */
in.eax.w[0] = 0x5300;
__intcall(0x15, &in, &out);
/* version in ax, bx must be equal to "PM" */
if (out.eflags.l & EFLAGS_CF || out.ebx.w[0] != 0x504d) {
printf("APM not detected.\n");
return 1;
}
printf("APM BIOS Version %x.%x found.\n", out.eax.b[1], out.eax.b[0]);
flags = out.ecx.w[0];
version = out.eax.w[0];
/* establish connection to APM */
in.eax.b[0] = 1;
__intcall(0x15...
2013 Feb 10
4
[PATCH] poweroff COM32 module
...;
+#include <com32.h>
+
+int main()
+{
+ com32sys_t inregs, outregs;
+
+ memset(&inregs, 0, sizeof inregs);
+
+ inregs.eax.l = 0x5300; /* APM Installation Check (00h) */
+ inregs.ebx.l = 0; /* APM BIOS (0000h) */
+ __intcall(0x15, &inregs, &outregs);
+
+ if (outregs.eflags.l & EFLAGS_CF) {
+ printf("APM not present.\n");
+ return 1;
+ }
+
+ if ((outregs.ebx.l & 0xffff) != 0x504d) { /* signature 'PM' */
+ printf("APM not present.\n");
+ return 1;
+ }
+
+ if ((outregs.eax.l & 0xffff) < 0x101) { /* Need version 1.1+ */
+ printf("APM 1....
2007 Jan 25
5
Custom com32
Hi all
I've written a basic COM32 module that checks (using the DMI example
code) the product and BIOS and if the BIOS is not at the required level,
is supposed to exit and boot using a DOS floppy image to flash the BIOS.
The problem is that I can't work out how to call the DOS floppy image.
Looking at the website, I see "Run Command" AX=0003H via int 22. The
image name will
2014 Feb 23
1
[PATCH] core: Incorrect detection of EDD in /core/fs/diskio_bios.c
I agree. This line was removed during testing because it didn't make big
sense (EFLAGS_CF, ebx, and ecx are checked after int 0x13).
But it's better to leave it in code to make sure that BIOS conforms
standards and clears CF flag on successful call.
Adjusted patch is given below.
Andy Alex
Signed-off-by: Andy Alex <andy at r-tt.com>
---
diff -uprN syslinux-6.02.orig/core/fs...
2012 Jul 16
5
[PATCH 0/5] Deleting __intcall() from Syslinux
From: Matt Fleming <matt.fleming at intel.com>
Since we can't use __intcall() for EFI, and since we can now have the
ELF module code resolve all our symbols at runtime, we should delete
as many references to __intcall() as possible and just access the
symbols directly.
The most interesting patch is the support for weak symbols. We need to
be able to reference derivative-specific
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...ens to be the LBA.
*/
inregs.eax.w[0] = 0x0006;
- inregs.esi.w[0] = OFFS(__com32.cs_bounce);
- inregs.es = SEG(__com32.cs_bounce);
+ inregs.esi.w[0] = OFFS(buf);
+ inregs.es = SEG(buf);
__com32.cs_intcall(0x22, &inregs, &inregs);
if ((inregs.eflags.l & EFLAGS_CF) || inregs.esi.w[0] == 0) {
- return 0; /* Filename not found */
+ goto fail; /* Filename not found */
}
/* Since the first member is the LBA, we simply cast */
@@ -121,14 +127,16 @@ uint32_t get_file_lba(const char *filename)
memset(&inregs, 0, sizeof(com32sys_t));
/*...
2012 Aug 14
1
[GIT PULL] elflink fixes
...() which returns a structure pointer in SI
- * to a structure whose first member happens to be the LBA.
- */
- inregs.eax.w[0] = 0x0006;
- inregs.esi.w[0] = OFFS(buf);
- inregs.es = SEG(buf);
- __com32.cs_intcall(0x22, &inregs, &inregs);
-
- if ((inregs.eflags.l & EFLAGS_CF) || inregs.esi.w[0] == 0) {
+ if (open_file(buf, &fd) <= 0) {
goto fail; /* Filename not found */
}
/* Since the first member is the LBA, we simply cast */
- lba = *((uint32_t *) MK_PTR(inregs.ds, inregs.esi.w[0]));
-
- /* Clean the registers for the next call */
-...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...ewdir;
+ com32sys_t regs;
+
+ newdir = NULL;
+
+ strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size);
+
+ regs.eax.w[0] = 0x0020;
+ regs.esi.w[0] = OFFS(__com32.cs_bounce);
+ regs.es = SEG(__com32.cs_bounce);
+
+ __com32.cs_intcall(0x22, ®s, ®s);
+
+ if (!(regs.eflags.l & EFLAGS_CF)) {
+ /* Initialization: malloc() then zero */
+ newdir = calloc(1, sizeof(DIR));
+ strcpy(newdir->dd_name, pathname);
+ newdir->dd_fd = regs.esi.w[0];
+ newdir->dd_sect = regs.eax.l;
+ newdir->dd_stat = 0;
+ }
+
+ /* We're done */
+ return newdir;
+}
diff --git a/com32/lib/re...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...ewdir;
+ com32sys_t regs;
+
+ newdir = NULL;
+
+ strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size);
+
+ regs.eax.w[0] = 0x001F;
+ regs.esi.w[0] = OFFS(__com32.cs_bounce);
+ regs.es = SEG(__com32.cs_bounce);
+
+ __com32.cs_intcall(0x22, ®s, ®s);
+
+ if (!(regs.eflags.l & EFLAGS_CF)) {
+ /* Initialization: malloc() then zero */
+ newdir = calloc(1, sizeof(DIR));
+ strcpy(newdir->dd_name, pathname);
+ newdir->dd_fd = regs.esi.w[0];
+ newdir->dd_sect = regs.eax.l;
+ newdir->dd_stat = 0;
+ }
+
+ /* We're done */
+ return newdir;
+}
diff --git a/com32/lib/re...
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...1 upon failure
- */
-int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg)
-{
- int retry = 6; /* Number of retries */
- com32sys_t tmpregs;
-
- if (!outreg)
- outreg = &tmpregs;
-
- while (retry--) {
- __intcall(0x13, inreg, outreg);
- if (!(outreg->eflags.l & EFLAGS_CF))
- return 0; /* CF=0, OK */
- }
-
- return -1; /* Error */
-}
-
-/**
- * Query disk parameters and EBIOS availability for a particular disk.
- *
- * @v disk The INT 0x13 disk drive number to process
- * @v diskinfo The structure to save the queried params to
- * @ret (int) 0 upo...
2009 Mar 06
0
[PATCH 2/3] COM32 API: restructure DIR
.../readdir.c
index 353b61b..c6d991c 100644
--- a/com32/lib/readdir.c
+++ b/com32/lib/readdir.c
@@ -33,21 +33,16 @@ struct dirent *readdir(DIR *dir)
/* Don't do this as we won't be able to rewind.
dir->dd_fd = regs.esi.w[0]; /* Shouldn't be needed? */
if ((!(regs.eflags.l & EFLAGS_CF)) && (regs.esi.w[0] != 0)) {
- newde = calloc(1, sizeof(newde));
- if (newde != NULL) {
- strcpy(newde->d_name, __com32.cs_bounce);
- newde->d_mode = regs.edx.w[0];
- newde->d_type = (newde->d_mode & S_IFMT) >> 12;
- newde->d_size = regs.eax.l;
-...
2014 Feb 20
2
[PATCH] core: Incorrect detection of EDD in /core/fs/diskio_bios.c
DL register is not set to drive number when detecting EDD for drive, so detection may fail.
Signed-off-by: Andy Alex<andy at r-tt.com>
---
diff -uprN syslinux-6.02.orig/core/fs/diskio_bios.c syslinux-6.02/core/fs/diskio_bios.c
--- syslinux-6.02.orig/core/fs/diskio_bios.c 2013-10-13 21:59:03.000000000 +0400
+++ syslinux-6.02/core/fs/diskio_bios.c 2014-02-20 12:15:08.000000000 +0400
@@ -337,7
2013 Sep 06
1
[PATCH 2/2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...+ * Copyright (C) 2013 Raphael S. Carvalho
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -92,6 +93,13 @@ int disk_get_params(int disk, struct disk_info *const diskinfo)
if (!(outreg.eflags.l & EFLAGS_CF) &&
outreg.ebx.w[0] == 0xaa55 && (outreg.ecx.b[0] & 1)) {
diskinfo->ebios = 1;
+ diskinfo->ops.disk_op = &ebios_disk_op;
+ diskinfo->ops.read_code = EBIOS_READ_CODE;
+ diskinfo->ops.write_code = EBIOS_WRITE_CODE;
+ } else {
+ diskinfo->ops.disk_op = &am...
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...- disk.h = bsHeads;
- disk.s = bsSecPerTrack;
+ disk->h = bsHeads;
+ disk->s = bsSecPerTrack;
if ((int8_t)devno < 0) {
/* Get hard disk geometry from BIOS */
-
+
ireg.eax.b[1] = 0x08;
__intcall(0x13, &ireg, &oreg);
-
+
if (!(oreg.eflags.l & EFLAGS_CF)) {
- disk.h = oreg.edx.b[1] + 1;
- disk.s = oreg.ecx.b[0] & 63;
+ disk->h = oreg.edx.b[1] + 1;
+ disk->s = oreg.ecx.b[0] & 63;
}
}
@@ -370,24 +374,24 @@ struct disk *bios_disk_init(void *private)
}
- disk.disk_number = devno;
- disk.sector_size = sector_...
2009 Jul 27
1
[PATCH] mboot using module path
...turn -1;
+??? com32sys_t regs;
+
+??? strlcpy(__com32.cs_bounce, path, __com32.cs_bounce_size);
+
+??? regs.eax.w[0] = 0x0025;
+??? regs.esi.w[0] = OFFS(__com32.cs_bounce);
+??? regs.es = SEG(__com32.cs_bounce);
+
+??? __com32.cs_intcall(0x22, ®s, ®s);
+
+??? if (!(regs.eflags.l & EFLAGS_CF)) {
+??? ??? return -1;
+??? }
+
+??? /* We're done */
+??? return 0;
?}
+
diff -u -r -X nodiff syslinux-3.82-orig/core/comboot.inc
syslinux-3.82/core/comboot.inc
--- syslinux-3.82-orig/core/comboot.inc 2009-06-09 10:19:25.000000000 -0700
+++ syslinux-3.82/core/comboot.inc 2009-07-27 11:2...
2012 Aug 20
13
[PATCH 00/12] Multidisk support
Hello,
the following patches should get multidisk access working.
The syntax accepted is the following:
(hdx,y)/path/to/file
where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk.
the other accepted syntax is using MBR's 32 bits disk signature so for example:
(mbr:0x12345678,2)/foo/bar
would address
2012 Mar 23
19
[PATCH 00/19][elflink] Improve compatibility with 4.x
From: Matt Fleming <matt.fleming at intel.com>
The following patch series is available at,
git://git.zytor.com/users/mfleming/syslinux.git elflink
All patches are against the 'elflink' branch.
This series fixes a few serious bugs and some behavioural
incompatibilities with the 4.x series.
Matt Fleming (19):
ldlinux: Initialise 'p' before using it.
ldlinux: Parse
2007 Jan 06
6
PXE stack access via com32
Hi,
I've checked the archives for my issue, and while there is relevant discussion, the problem the original poster was asking about didn't seem to have been resolved then either (~2 years ago). At any rate, basically what I'm trying to do is send (possibly receive) UDP packets via the PXE stack using the com32 API (using version 3.11 of syslinux). I have followed both the comboot
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com>
This series fixes some bugs and switches the elflink branch to be
entirely ELF modules. It applies on top of,
http://syslinux.zytor.com/archives/2011-April/016369.html
The deletions in the diff stat below are mainly from deleting
com32/elflink/modules (finally!). Now there should be no duplicate
code because we don't need COM32 and
2015 Jul 22
13
[PULL 0/8] MultiFS suppport for BIOS and EFI
So last week I was wondering if XFS was still working -- even with its
last on-disk structure changes -- and it _suprisingly_ worked as
expected. Right, now I can finally get rid of GRUB and use Syslinux to
boot my Linux on EFI from a rootfs with xfs. Shit, I have two
partitions (the first one being the required ESP) so there is no way to
access the other partitions since because Syslinux does not