Displaying 20 results from an estimated 22 matches for "mk_ptr".
Did you mean:
mk_pte
2011 Aug 06
4
[PATCH] ifmemdsk.c32: Allow boot options based on presence of MEMDISK
...found = (
+ /* '!M' 'EM' 'DI' 'SK' */
+ results.eax.w[1] == 0x4D21 &&
+ results.ecx.w[1] == 0x4D45 &&
+ results.edx.w[1] == 0x4944 &&
+ results.ebx.w[1] == 0x4B53
+ );
+
+ if (found)
+ return MK_PTR(results.es, results.edi.w[0]);
+
+ return NULL;
+ }
+
+static int scan_drives(void) {
+ int found, drive;
+ const s_mdi * mdi;
+
+ for (found = drive = 0; drive <= 0xFF; ++drive) {
+ mdi = installation_check(drive);
+ if (!mdi)
+ continue;
+
+ memdisk_i...
2005 Apr 25
1
COM32 question
...ming in DOS. So this might be a stupid question.
How do I access an absolute memory location in my COM32 code. If I
understand it correctly, all the memory addresses use virtual addresses.
I need to write code to read an absolute location in memory
Is it as simple as
answer = *(unsigned char *)MK_PTR(seg,ofs)
or does the fact that the COM32 code is runing using virtual addresses
complicate matters.
- Murali
2009 May 31
2
Calling between real mode and protected mode on the core32 branch
...*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 = MK_PTR(seg, off);
for example:
ptr = MK_PTR(regs->es, regs->ebx.w[0]); /* ES:BX */
*** Calls from protected mode (32-bit) to real mode (16-bit):
This is done via the core_intcall(), core_farcall() and core_cfarcall()
functions, which are the direct versions of the analogous instructions
in the...
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
...om32.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 */
- memset(&inregs, 0, sizeof(com32sys_t));
-
- /* Put the filename in the bounce buffer */
- strlcpy(buf, filename, size);
+ lba = *((uint32_t *) MK_PTR(0, fd.handle));
/* Call comapi_close() to f...
2008 Jul 19
0
[PATCH] ethersel: use library functions
...;syslinux/boot.h>
+#include <syslinux/config.h>
#ifdef DEBUG
# define dprintf printf
@@ -42,17 +44,6 @@
# define dprintf(...) ((void)0)
#endif
-static const char *
-get_config(void)
-{
- static com32sys_t r;
-
- r.eax.w[0] = 0x000E;
- __intcall(0x22, &r, &r);
-
- return MK_PTR(r.es, r.ebx.w[0]);
-}
-
static char *
skipspace(char *p)
{
@@ -139,7 +130,7 @@
struct match *m;
if ( !filename )
- filename = get_config();
+ filename = syslinux_config_file();
f = fopen(filename, "r");
if ( !f )
@@ -198,19 +189,6 @@
return list;
}
-static v...
2004 Jan 25
1
syslinux for opteron
I am trying to build syslinux under gentoo on in 64 bit mode on an opteron. I get output like this
../com32/include/com32.h: In function `MK_PTR':
../com32/include/com32.h:77: warning: cast to pointer from integer of different size
gcc -I../com32/include -g -Wall -O2 -fomit-frame-pointer -march=i386 -malign-functions=0 -malign-jumps=0 -malign-loops=0 -DVERSION='"2.06"' -DDATE='""' -S -o e820test.s e82...
2005 Apr 21
2
ethersel.c32 issues
...ethersel.c 2005-04-21 01:55:22.903371800 -0400
+++ ethersel.c.biosfix 2005-04-21 01:55:59.905746584 -0400
@@ -43,6 +43,8 @@
# define dprintf(...) ((void)0)
#endif
+extern enum pci_config_type __pci_cfg_type;
+
struct match {
struct match *next;
uint32_t did;
@@ -64,6 +66,35 @@
return MK_PTR(r.es, r.ebx.w[0]);
}
+static int
+get_bios(void)
+{
+ static com32sys_t r;
+ int lastbus = -1;
+ uint8_t bioscfg;
+
+ r.eax.w[0] = 0xb101;
+ __intcall(0x1a, &r, &r);
+
+ if (r.eax.b[1] == 0x00) {
+ lastbus = r.ecx.b[0];
+
+ if(__pci_cfg_type == PCI_CFG_AUTO) {
+ bioscfg...
2008 Jan 02
3
inconsistent Int 22h local boot
I have a Dell 1435 system that will not respond correctly to a com32 call
to Local boot
Int 22h
AX=14h
DX = 0
This call should not return. It should unload the PXE+UNDI stacks and
continue the boot process with the next boot device.
This call is working fine for me on an HP DL360G2 and on a Dell PE 850.
But, on this Dell 1435 the call is returning from the Int 22h.
I am using syslinux 3.51
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...<klibc/compiler.h>
+#include <com32.h>
+
+#include <dirent.h>
+#include <stdio.h>
+#include <errno.h>
+
+char *getcwd(char *buf, size_t size)
+{
+ static com32sys_t reg;
+ char *pwdstr, *ret;
+
+ reg.eax.w[0] = 0x001f;
+ __intcall(0x22, ®, ®);
+ pwdstr = MK_PTR(reg.es, reg.ebx.w[0]);
+ if ((strlen(pwdstr) < size) && (buf != NULL)) {
+ strcpy(buf, pwdstr);
+ ret = buf;
+ } else {
+ ret = NULL;
+ errno = ERANGE;
+ }
+ return ret;
+}
diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c
new file mode 100644
index 0000000..aa2ba5b
--- /dev/nul...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...<klibc/compiler.h>
+#include <com32.h>
+
+#include <dirent.h>
+#include <stdio.h>
+#include <errno.h>
+
+char *getcwd(char *buf, size_t size)
+{
+ static com32sys_t reg;
+ char *pwdstr, *ret;
+
+ reg.eax.w[0] = 0x001e;
+ __intcall(0x22, ®, ®);
+ pwdstr = MK_PTR(reg.es, reg.ebx.w[0]);
+ if ((strlen(pwdstr) < size) && (buf != NULL)) {
+ strcpy(buf, pwdstr);
+ ret = buf;
+ } else {
+ ret = NULL;
+ errno = ERANGE;
+ }
+ return ret;
+}
diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c
new file mode 100644
index 0000000..9c036a3
--- /dev/nul...
2012 Nov 09
1
Syslinux-6.00-pre1
...irmware object directory support
efi: Delete unused variables
efi: Add support for UGA devices
efi: Forward declare 'struct screen_info'
Makefile: Only provide one make rule for each directory
efi: Fix warning about discarding const qualifier
com32.h: Fix MK_PTR() for 64-bit
initvesa.c: Delete unused variables (set but not used) and cleanup
screencpy.c: Delete unused variables and cleanup
i915resolution.c: cast to 64-bit sized ptr
vesa: Change the prototype of __vesacon_init()
Merge branch 'cleanup' into for-hpa/elflin...
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
2011 May 25
1
[GIT PULL] elflink ldlinux
...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/ldlinux/advwrite.c
similarity index 100%
rename from com32/lib/syslinux/advwrite.c
rename to com32/elflink/ldlinux/advwrite.c
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index a00a5b...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...tb(i, (uint16_t)addr);
+ outb(i, (uint32_t)addr);
for (j = 0; j < (640 / 32); j++)
*(out + j) = *(in + j);
@@ -300,7 +301,8 @@ void vgadisplayfile(FILE *_fd)
rledecode(VGARowBuffer, GraphXSize);
packedpixel2vga(VGARowBuffer, VGAPlaneBuffer, 640);
- outputvga(VGAPlaneBuffer, MK_PTR(0x0A000, VGAPos));
+ outputvga((uint32_t *)VGAPlaneBuffer,
+ MK_PTR(0x0A000, VGAPos));
VGAPos += 640/8;
}
}
diff --git a/core/hello.c b/core/hello.c
index 45bdf57..5b22478 100644
--- a/core/hello.c
+++ b/core/hello.c
@@ -7,8 +7,6 @@
#include <console.h>
-static int consol...
2012 Nov 02
10
[PATCH 0/9] elflink fixes
From: Matt Fleming <matt.fleming at intel.com>
Here are the patches that I've got queued up based on the very helpful
feedback I received from people testing Syslinux 5.00-pre9. Unless
anyone has any concerns these will make it into Syslinux 5.00-pre10.
Matt Fleming (9):
pxe: Don't call open_config() from the pxe core
ldlinux: Print a warning if no config file is found
2013 Jun 20
9
Syslinux 6.00 released
...irmware object directory support
efi: Delete unused variables
efi: Add support for UGA devices
efi: Forward declare 'struct screen_info'
Makefile: Only provide one make rule for each directory
efi: Fix warning about discarding const qualifier
com32.h: Fix MK_PTR() for 64-bit
initvesa.c: Delete unused variables (set but not used) and cleanup
screencpy.c: Delete unused variables and cleanup
i915resolution.c: cast to 64-bit sized ptr
vesa: Change the prototype of __vesacon_init()
Merge branch 'cleanup' into for-hpa/elflin...
2013 Oct 18
0
[RFC/PATCH 1/3] Move partiter from com32/chain to com32/lib/syslinux
...if (!buf)
- return 0;
-
- /* Put the filename in the bounce buffer */
- strlcpy(buf, filename, size);
-
- if (open_file(buf, O_RDONLY, &fd) <= 0) {
- goto fail; /* Filename not found */
- }
-
- /* Since the first member is the LBA, we simply cast */
- lba = *((uint32_t *) MK_PTR(0, fd.handle));
-
- /* Call comapi_close() to free the structure */
- close_file(fd.handle);
-
-fail:
- lfree(buf);
- return lba;
-}
-
-/* drive offset detection */
-int drvoff_detect(int type)
-{
- if (bpbV40 <= type && type <= bpbVNT) {
- return 0x24;
- } else if (...
2015 Jul 22
0
[PULL 1/8] Move partiter from com32/chain to com32/lib/syslinux
...if (!buf)
- return 0;
-
- /* Put the filename in the bounce buffer */
- strlcpy(buf, filename, size);
-
- if (open_file(buf, O_RDONLY, &fd) <= 0) {
- goto fail; /* Filename not found */
- }
-
- /* Since the first member is the LBA, we simply cast */
- lba = *((uint32_t *) MK_PTR(0, fd.handle));
-
- /* Call comapi_close() to free the structure */
- close_file(fd.handle);
-
-fail:
- lfree(buf);
- return lba;
-}
-
-/* drive offset detection */
-int drvoff_detect(int type)
-{
- if (bpbV40 <= type && type <= bpbVNT) {
- return 0x24;
- } else if (...
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