Displaying 20 results from an estimated 74 matches for "com32sys_t".
2009 May 31
2
Calling between real mode and protected mode on the core32 branch
...ile; it
has the effect of being a prototype. I have started collecting the
external symbols into the header file extern.inc just to avoid
cluttering things up too badly, although there are still quite a few of
them just out in the code still.
The pm_func routine gets called as such:
void pm_func(com32sys_t *regs)
{
/* ... */
}
... where *regs is the real-mode register state. This is an
input/output structure: it both reflects the incoming registers and can
be changed to affect the registers on return to real mode.
16-bit pointers in a seg:off pair can be converted to a 32-bit pointer via:
ptr =...
2013 Sep 17
2
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...om32/lib/syslinux/disk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c
index 093751a..d96acbf 100644
--- a/com32/lib/syslinux/disk.c
+++ b/com32/lib/syslinux/disk.c
@@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg)
int disk_get_params(int disk, struct disk_info *const diskinfo)
{
static com32sys_t inreg, outreg;
- struct disk_ebios_eparam *eparam;
+ struct disk_ebios_eparam *eparam = NULL;
int rv = 0;
memset(diskinfo, 0, sizeof *diskinfo);
@@ -94,12 +94,12...
2013 Sep 06
1
[PATCH 2/2 v2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...de/syslinux/disk.h b/com32/include/syslinux/disk.h
index f96ca68..348d1ae 100644
--- a/com32/include/syslinux/disk.h
+++ b/com32/include/syslinux/disk.h
@@ -52,6 +52,19 @@ struct disk_info {
uint32_t spt;
};
+struct disk_ops {
+ uint8_t ah;
+ void *(*op)(const struct disk_info *const, com32sys_t *,
+ uint64_t, uint8_t);
+};
+
+enum disk_op_codes {
+ EBIOS_READ_CODE = 0x42, /* Extended read */
+ EBIOS_WRITE_CODE = 0x43, /* Extended write */
+ CHS_READ_CODE = 0x02,
+ CHS_WRITE_CODE = 0x03,
+};
+
struct disk_ebios_dapa {
uint16_t len;
uint16_t count;
@@ -177,4 +190,9...
2013 Sep 06
2
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...2/lib/syslinux/disk.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c
index 093751a..554bed3 100644
--- a/com32/lib/syslinux/disk.c
+++ b/com32/lib/syslinux/disk.c
@@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg)
int disk_get_params(int disk, struct disk_info *const diskinfo)
{
static com32sys_t inreg, outreg;
- struct disk_ebios_eparam *eparam;
+ struct disk_ebios_eparam *eparam = NULL;
int rv = 0;
memset(diskinfo, 0, sizeof *diskinfo);
@@ -94,12 +94,1...
2013 Sep 06
1
[PATCH 2/2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...nux/disk.h b/com32/include/syslinux/disk.h
index f96ca68..e793514 100644
--- a/com32/include/syslinux/disk.h
+++ b/com32/include/syslinux/disk.h
@@ -41,6 +41,14 @@
#define SECTOR 512u /* bytes/sector */
+struct disk_info;
+struct disk_ops {
+ void *(*disk_op)(const struct disk_info *const, com32sys_t *,
+ uint64_t, uint8_t);
+ uint32_t read_code;
+ uint32_t write_code;
+};
+
struct disk_info {
int disk;
int ebios; /* EBIOS supported on this disk */
@@ -50,6 +58,14 @@ struct disk_info {
uint32_t cyl;
uint32_t head;
uint32_t spt;
+ struct disk_ops ops;...
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 Aug 14
1
[GIT PULL] elflink fixes
...h>
#include <syslinux/disk.h>
+#include <syslinux/pmapi.h>
#include "utility.h"
static const char *bpbtypes[] = {
@@ -93,14 +95,11 @@ void lba2chs(disk_chs *dst, const struct disk_info *di, uint64_t lba, uint32_t m
uint32_t get_file_lba(const char *filename)
{
- com32sys_t inregs;
+ struct com32_filedata fd;
uint32_t lba = 0;
int size = 65536;
char *buf;
- /* Start with clean registers */
- memset(&inregs, 0, sizeof(com32sys_t));
-
buf = lmalloc(size);
if (!buf)
return 0;
@@ -108,32 +107,15 @@ uint32_t get_file_lba(const char...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...dlinux/adv.c
index 7869547..b81361f 100644
--- a/com32/elflink/ldlinux/adv.c
+++ b/com32/elflink/ldlinux/adv.c
@@ -40,7 +40,7 @@ void *__syslinux_adv_ptr;
size_t __syslinux_adv_size;
extern void adv_init(void);
-void __syslinux_init(void)
+void __constructor __syslinux_init(void)
{
static com32sys_t reg;
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index fb041ae..498644e 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -99,7 +99,7 @@ static const char * cmd_reverse_search(int *cursor)
break;
}
- while (last_found != &cli_hi...
2006 Oct 29
1
The simple menu system doesn't work with serial console
...x 0.2x, but it doesn't seem to work in 0.3x and 0.4x.
I confirmed that this patch fixed the bug.
*** com32/lib/sys/xserial_write.c~ 2006-10-30 08:30:35.000000000 +0900
--- com32/lib/sys/xserial_write.c 2006-10-30 08:31:30.000000000 +0900
***************
*** 43,49 ****
{
static com32sys_t ireg; /* Zeroed with the BSS */
! ireg.eax.w[0] = 0x0400 | (unsigned char)ch;
__intcall(0x21, &ireg, NULL);
}
--- 43,50 ----
{
static com32sys_t ireg; /* Zeroed with the BSS */
! ireg.eax.b[1] = 0x04;
! ireg.edx.b[0] = ch;
__intcall(0x21, &ireg, NULL);
}...
2013 Nov 19
2
[PATCH] Add filesystem UUID to SYSAPPEND for FAT
...+ b/core/include/core.h
@@ -81,6 +81,7 @@ extern void print_sysappend(void);
extern const char *sysappend_strings[SYSAPPEND_MAX];
extern uint32_t SysAppends;
extern void sysappend_set_uuid(const uint8_t *uuid);
+extern void sysappend_set_fs_uuid(void);
void __cdecl core_intcall(uint8_t, const com32sys_t *, com32sys_t *);
void __cdecl core_farcall(uint32_t, const com32sys_t *, com32sys_t *);
diff --git a/core/include/fs.h b/core/include/fs.h
index 31ef315..22fd6bf 100644
--- a/core/include/fs.h
+++ b/core/include/fs.h
@@ -73,6 +73,9 @@ struct fs_ops {
int (*next_extent)(struct inode *, u...
2015 Oct 07
2
Hyper-V Gen 2 waiting for ldlinux.e64
On Wed, Oct 07, 2015 at 05:58:51PM -0500, Clements, James wrote:
> James Clement
> > Geert Stappers
> > > On Wed, Oct 07, 2015 at 05:06:41PM -0500, Clements, James wrote:
> > > > The screen displays the following:
> > > >
> > > > PXE Network Boot using IPv4
> > > > ....
> > > > Station IP address is 192.168.205.50
2013 Sep 17
0
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...+------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c
> index 093751a..554bed3 100644
> --- a/com32/lib/syslinux/disk.c
> +++ b/com32/lib/syslinux/disk.c
> @@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg)
> int disk_get_params(int disk, struct disk_info *const diskinfo)
> {
> static com32sys_t inreg, outreg;
> - struct disk_ebios_eparam *eparam;
> + struct disk_ebios_eparam *eparam = NULL;
> int rv = 0;
>
> memset(diskinf...
2013 Sep 30
0
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c
> index 093751a..d96acbf 100644
> --- a/com32/lib/syslinux/disk.c
> +++ b/com32/lib/syslinux/disk.c
> @@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg)
> int disk_get_params(int disk, struct disk_info *const diskinfo)
> {
> static com32sys_t inreg, outreg;
> - struct disk_ebios_eparam *eparam;
> + struct disk_ebios_eparam *eparam = NULL;
> int rv = 0;
>
> memset(diskinfo...
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...o_str(char *buf, const struct guid *const id);
+extern int str_to_guid(const char *buf, struct guid *const id);
+extern void disk_gpt_part_dump(const struct disk_gpt_part_entry *const
+ gpt_part);
+
+/* disk.c */
+#ifndef SYSLINUX_EFI
extern int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg);
+#endif
+
extern int disk_get_params(int disk, struct disk_info *const diskinfo);
extern void *disk_read_sectors(const struct disk_info *const diskinfo,
- uint64_t lba, uint8_t count);
+ uint64_t lba, uint8_t count);
extern in...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...diff --git a/com32/chain/utility.c b/com32/chain/utility.c
index fb59551..b54e0cd 100644
--- a/com32/chain/utility.c
+++ b/com32/chain/utility.c
@@ -94,24 +94,30 @@ void lba2chs(disk_chs *dst, const struct disk_info *di, uint64_t lba, uint32_t m
uint32_t get_file_lba(const char *filename)
{
com32sys_t inregs;
- uint32_t lba;
+ uint32_t lba = 0;
+ int size = 65536;
+ char *buf;
/* Start with clean registers */
memset(&inregs, 0, sizeof(com32sys_t));
+ buf = lmalloc(size);
+ if (!buf)
+ return 0;
+
/* Put the filename in the bounce buffer */
- strlcpy(__...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...l
+++ b/com32/lib/closedir.c
@@ -0,0 +1,29 @@
+/*
+ * closedir.c
+ */
+
+#include <dirent.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include <com32.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int closedir(DIR *dir)
+{
+ int rv;
+ com32sys_t regs;
+ if (dir == NULL) {
+ rv = 0;
+ } else {
+ memset(®s, 0, sizeof regs); /* ?Needed? */
+ regs.eax.w[0] = 0x0022;
+ regs.esi.w[0] = dir->dd_fd;
+ __com32.cs_intcall(0x22, ®s, ®s);
+ free(dir); /* garbage collection? */
+ rv = 0;
+ }
+ return rv;
+}
diff --git a/c...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...l
+++ b/com32/lib/closedir.c
@@ -0,0 +1,29 @@
+/*
+ * closedir.c
+ */
+
+#include <dirent.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include <com32.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int closedir(DIR *dir)
+{
+ int rv;
+ com32sys_t regs;
+ if (dir == NULL) {
+ rv = 0;
+ } else {
+ memset(®s, 0, sizeof regs); /* ?Needed? */
+ regs.eax.w[0] = 0x0021;
+ regs.esi.w[0] = dir->dd_fd;
+ __com32.cs_intcall(0x22, ®s, ®s);
+ free(dir); /* garbage collection? */
+ rv = 0;
+ }
+ return rv;
+}
diff --git a/c...
2013 Sep 17
1
[PATCH 2/4 v3] com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.
...re to be filled.
+ * @v lba The logical block address to begin reading at
+ * @v count The number of sectors to read
+ * @v op_code Code to write/read operation
+ * @ret lmalloc'd buf upon success, NULL upon failure
+ */
+static void *ebios_setup(const struct disk_info *const diskinfo, com32sys_t *inreg,
+ uint64_t lba, uint8_t count, uint8_t op_code)
+{
+ static __lowmem struct disk_ebios_dapa dapa;
+ void *buf;
+
+ buf = lmalloc(count * diskinfo->bps);
+ if (!buf)
+ return NULL;
+
+ dapa.len = sizeof(dapa);
+ dapa.count = count;
+ dapa.off = OFFS(buf);
+ dapa...
2007 Feb 12
4
Read disk not working in 3.35+
Hey,
Looks like read disk function 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(®s_in, 0, sizeof regs_in);
regs_in.eax.l = 0x0019;
regs_in.edx.l = i; // sector number
regs_in.ecx.l = 1; // se...
2011 May 25
1
[GIT PULL] elflink ldlinux
...#include <syslinux/adv.h>
#include <klibc/compiler.h>
+#include <inttypes.h>
#include <com32.h>
void *__syslinux_adv_ptr;
size_t __syslinux_adv_size;
-void __constructor __syslinux_get_adv(void)
+extern void adv_init(void);
+void __syslinux_init(void)
{
static com32sys_t reg;
+ /* Initialize the ADV structure */
+ reg.eax.w[0] = 0x0025;
+ __intcall(0x22, ®, NULL);
+
reg.eax.w[0] = 0x001c;
__intcall(0x22, ®, ®);
__syslinux_adv_ptr = MK_PTR(reg.es, reg.ebx.w[0]);
diff --git a/com32/lib/syslinux/advwrite.c b/com32/elflink...