search for: cs_bounc

Displaying 20 results from an estimated 31 matches for "cs_bounc".

Did you mean: cs_bounce
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
2008 Mar 25
3
Com32 api problem !
...d long cylinders,heads,sectors; unsigned long long int total; unsigned short bytes; } disk; void ExtDiskInfo(int n) { printf("ExtDiskInfo entry.\n"); com32sys_t regs; memset(&regs,0,sizeof(regs)); regs.eax.b[1] = 0x48; regs.edx.b[0] = 0x80 + n; regs.ds = SEG(__com32.cs_bounce); regs.esi.w[0] = OFFS(__com32.cs_bounce); __intcall(0x13,&regs,&regs); if (regs.eax.b[1] == 0) { memcpy(&disk,__com32.cs_bounce,sizeof(struct params)); size = disk.total * disk.bytes; printf("Total hard disk size : %lld Mb (%lld sectors)\n",size>>...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...e git repository at: git://git.zytor.com/users/mfleming/syslinux.git elflink Andre Ericson (1): ldlinux: fixes bug that happens when using fullpath for a COM32 module Matt Fleming (10): module: Actually use last component of DT_NEEDED pathname Delete all references to __com32.cs_bounce pxechn: Fix merge botch s/pxe_dns/pxe_dns_resolv/ com32: Add missing DHCP pack/unpack files elflink: Fix compiler warning fs: Add .copy_super to struct fs_ops com32: Per-object file LDFLAGS Revert "pxe: resolve names via DNS from protected-mode code"...
2007 Jan 06
6
PXE stack access via com32
...ES:DI PXE data buffer Output: AX PXE return status code or, in com32 terms (the PXE call argument struct has been copied into the bounce buffer and the buffer field of the PXE call argument struct is setup to point into the bounce buffer as well): inputRegs.es = SEG(__com32.cs_bounce); inputRegs.edi.w[0] = OFFS(__com32.cs_bounce); inputRegs.eax.w[0] = 0x0009; /* call PXE stack */ inputRegs.ebx.w[0] = 0x0071; /* PXENV_GET_CACHED_INFO opcode */ __intcall(0x22, &inputRegs, &outputRegs); However, when setup this way, 'outputRegs.eax.w[0]' cont...
2003 Sep 15
2
Can not use read file SYSLINUX API call
...file and read file SYSLINUX API. But it always make my PC104 freeze. My snip code : ================================================ int __start(void) { int ax,cx,dx,es,si,di,t; com32sys_t inreg,outreg; memset(&inreg, 0, sizeof inreg); memset(&outreg, 0, sizeof outreg); strcopy(__com32.cs_bounce, "test.txt"); inreg.eax.w[0] = 0x0006; // Open file inreg.esi.w[0] = OFFS(__com32.cs_bounce); inreg.es = SEG(__com32.cs_bounce); __com32.cs_intcall(0x22, &inreg, &outreg); si = outreg.esi.w[0]; cx = outreg.ecx.w[0]; ax = outreg.eax.w[0]; if ((ax % cx) == 0) t = ax / cx; else t...
2008 Jul 16
2
[PATCH 1/2] chain.c32: fix bounce buffer handling
...dules/chain.c index e6409b4..9ca118c 100644 --- a/com32/modules/chain.c +++ b/com32/modules/chain.c @@ -168,12 +168,13 @@ struct ebios_dapa { uint16_t off; uint16_t seg; uint64_t lba; -} *dapa; +}; static void *read_sector(unsigned int lba) { com32sys_t inreg; - void *buf = __com32.cs_bounce; + struct ebios_dapa *dapa = __com32.cs_bounce; + void *buf = (char *)__com32.cs_bounce + SECTOR; void *data; memset(&inreg, 0, sizeof inreg); @@ -227,11 +228,13 @@ static void *read_sector(unsigned int lba) return data; } -static int write_sector(unsigned int lba, const void *...
2009 May 24
1
Sending UDP packets from comboot
...rgs, 0, sizeof(args)); args.ip = inet_addr("255.255.255.255"); // inet_addr working here? args.gw = inet_addr("0.0.0.0"); args.src_port = 4711; args.dst_port = 4799; args.buffer_size = <some sizeof() code> args.buffer = <some stuff to put my data in> memcpy(__com32.cs_bounce, &args, sizeof(args); inputRegs.es = SEG(__com32.cs_bounce); inputRegs.edi.w[0] = OFFS(__com32.cs_bounce); inputRegs.eax.w[0] = 0x0009; /* call PXE stack */ inputRegs.ebx.w[0] = 0x0033; /* PXENV_UDP_WRITE opcode */ __intcall(0x22, &inputRegs, NULL); // code end Could anyone give me a h...
2010 Apr 27
2
gpllib write_sectors() patch
...y should be supplied in the driveinfo struct (for both read and write). /** * write_sectors - write several sectors from disk @@ -37,9 +55,14 @@ int write_sectors(const struct driveinfo *drive_info, const unsigned int lba, { com32sys_t inreg, outreg; struct ebios_dapa *dapa = __com32.cs_bounce; - void *buf = (char *)__com32.cs_bounce + size; + void *buf = (char *)__com32.cs_bounce + size*SECTOR; - memcpy(buf, data, size); + if (get_drive_parameters(drive_info) == -1) { + printf("ERR: Can't get drive params!\n"); + return -1; + } + + memcpy(buf,...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...nclude <dirent.h> +#include <stdio.h> +#include <errno.h> + +#include <com32.h> +#include <string.h> +#include <unistd.h> +#include <fcntl.h> + + +DIR *opendir(const char *pathname) +{ + DIR *newdir; + 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, &regs, &regs); + + if (!(regs.eflags.l & EFLAGS_CF)) { + /* Initialization: malloc() then zero */ + newdir = cal...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...nclude <dirent.h> +#include <stdio.h> +#include <errno.h> + +#include <com32.h> +#include <string.h> +#include <unistd.h> +#include <fcntl.h> + + +DIR *opendir(const char *pathname) +{ + DIR *newdir; + 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, &regs, &regs); + + if (!(regs.eflags.l & EFLAGS_CF)) { + /* Initialization: malloc() then zero */ + newdir = cal...
2007 Feb 12
4
Read disk not working in 3.35+
...ction which was launched in 3.35 isnt working. Did anyone test this on any hardware? I'm using it thru the com32 interface to read contents of the active partition of a USB boot key (syslinux). I did a sample test like: void scanAndPrint() { com32sys_t regs_in; char *sectorBuf = __com32.cs_bounce; int i; memset(sectorBuf, 0x0, 512); // XXX MARK 1 for (i=0; i< 10; i++) { int j; memset(&regs_in, 0, sizeof regs_in); regs_in.eax.l = 0x0019; regs_in.edx.l = i; // sector number regs_in.ecx.l = 1; // sector count regs_in.es = SEG(sectorBuf);...
2003 Apr 21
3
COM32 Question
Does the COMBOOT stuff with 2.04 work correctly with function calls? or does one need to write it as one huge function? If memory serves me correctly, there was some problem if hello.c was modified to include additional functions, in an earlier version. - Murali
2008 Jul 19
0
[PATCH] ethersel: use library functions
...( !filename ) - filename = get_config(); + filename = syslinux_config_file(); f = fopen(filename, "r"); if ( !f ) @@ -198,19 +189,6 @@ return list; } -static void __attribute__((noreturn)) -execute(const char *cmdline) -{ - static com32sys_t ireg; - - strcpy(__com32.cs_bounce, cmdline); - ireg.eax.w[0] = 0x0003; /* Run command */ - ireg.ebx.w[0] = OFFS(__com32.cs_bounce); - ireg.es = SEG(__com32.cs_bounce); - __intcall(0x22, &ireg, NULL); - exit(255); /* Shouldn't return */ -} - int main(int argc, char *argv[]) { struct match *list, *match; @@...
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...com32sys_t regs; + char *tpath; + int pathlen; newdir = NULL; + pathlen = strlen(pathname); + if (pathname[pathlen-1] != '/') { + tpath = calloc(1, pathlen + 2); + strcpy(tpath, pathname); + strcpy(tpath + pathlen, "/"); + } else { + tpath = pathname; + } - strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size); + strlcpy(__com32.cs_bounce, tpath, __com32.cs_bounce_size); regs.eax.w[0] = 0x0020; regs.esi.w[0] = OFFS(__com32.cs_bounce); @@ -34,6 +45,10 @@ DIR *opendir(const char *pathname) newdir->dd_fd = regs.esi.w[0]; newdir->dd_sect = regs.eax.l; n...
2009 Mar 06
0
[PATCH 2/3] COM32 API: restructure 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; - newde->d_ino = regs.ebx.l; - dir->dd_stat = 1; - } else { - dir->dd_stat = -2; - errno = ENOMEM; - } + newde = dir->dd_d...
2010 Sep 19
2
can't get write_sectors to work...
Hi, Hopefully you someone can tell me what I'm doing wrong. First, the code. I placed this at the bottom of the main loop in com32/modules/disk.c as a simple test of writing to the disk: printf(" Host bus: %s, Interface type: %s\n\n", d->edd_params.host_bus_type, d->edd_params.interface_type); zero_buf = calloc(1, d->edd_params.bytes_per_sector); for(int
2012 Dec 06
2
Syslinux 5.00 released
...LF object support. Now that we no longer need to go through the 16-bit interrupt mechanism we can make full use of the 32-bit execution environment. This change required reimplementing lots of the 16-bit assembly code from core/ in C. * com32: __com32.cs_bounce is gone now we always run in a 32-bit environment once we execute ldlinux.c32. * ldlinux: A new "PATH" directive was added to the ldlinux.c32 config parser that specifies a colon-separated list of directories to search when attempting to load modules...
2009 Jul 27
1
[PATCH] mboot using module path
...-3.82/com32/lib/chdir.c??? 2009-07-27 11:11:34.000000000 -0700 @@ -5,9 +5,25 @@ ?#include <dirent.h> ?#include <stdio.h> ?#include <errno.h> +#include <com32.h> ?int chdir(const char *path) ?{ -??? errno = ENOSYS; -??? return -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, &regs, &regs); + +??? if (!(regs.eflags.l & EFLAGS_CF)) { +??? ??? return -1; +??? } + +??? /* We're d...
2006 Mar 11
5
mboot.c32, weird e820 map on HP blade machine, possible memory corruption
...ne think of anything? Another thing is, the e820 buffer should be zeroed out since some bios'es are buggy and dont overwrite the high doubleword of Length field of the AddrRangeDesc. This is seen on the Dell Poweredge1800's. So it should look like: while(((void *)(e820 + 1)) < __com32.cs_bounce + __com32.cs_bounce_size) { memset(e820, 0, sizeof(*e820)); e820->size = sizeof(*e820) - sizeof(e820->size); .... hope Tim, the maintainer can take care of this. -- Ram
2010 Mar 01
0
[PATCH] com32: recognize gPXE's COMBOOT as gPXE
...ux_version(); - if (sv->filesystem != SYSLINUX_FS_PXELINUX) - return false; /* Not PXELINUX */ + if (sv->filesystem != SYSLINUX_FS_PXELINUX && sv->filesystem != SYSLINUX_FS_GPXE) + return false; /* Not PXELINUX or gPXE */ fca = __com32.cs_bounce; memset(fca, 0, sizeof *fca); -- 1.6.6.1