search for: ebios_dapa

Displaying 5 results from an estimated 5 matches for "ebios_dapa".

2008 Jul 16
2
[PATCH 1/2] chain.c32: fix bounce buffer handling
...v <vsu at altlinux.ru> --- com32/modules/chain.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/com32/modules/chain.c b/com32/modules/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(&a...
2010 Apr 27
2
gpllib write_sectors() patch
...arameters every time so they 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;...
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 Jun 26
2
[GIT PULL] elflink bug fixes
...k/read.c b/com32/gpllib/disk/read.c index 7a6cc43..541957f 100644 --- a/com32/gpllib/disk/read.c +++ b/com32/gpllib/disk/read.c @@ -76,13 +76,22 @@ int read_sectors(struct driveinfo *drive_info, void *data, const unsigned int lba, const int sectors) { com32sys_t inreg, outreg; - struct ebios_dapa *dapa = __com32.cs_bounce; - void *buf = (char *)__com32.cs_bounce + sectors * SECTOR; + struct ebios_dapa *dapa; + void *buf; char *bufp = data; + int rv = -1; if (get_drive_parameters(drive_info) == -1) return -1; + buf = lmalloc(sectors * SECTOR); + if (!buf) +...
2007 Oct 17
3
Adding a "boot from local hard disk" option to syslinux menu, booted from USB
...ve %d\n", drivename, whichpart, drive); printf(logs); strcat(logrc, logs); /* Divvy up the bounce buffer. To keep things sector- aligned, give the EBIOS DAPA the first sector, then the MBR next, and the rest is used for the partition- chasing stack. */ dapa = (struct ebios_dapa *)__com32.cs_bounce; mbr = (char *)__com32.cs_bounce + SECTOR; /* Get the disk geometry (not needed for MBR) */ sprintf(logs, "Get the disk geometry - Calling get_disk_params\n"); printf(logs); strcat(logrc, logs); if ( get_disk_params(drive) && whichpart...