search for: smt_free

Displaying 11 results from an estimated 11 matches for "smt_free".

Did you mean: out_free
2013 Jul 26
3
[syslinux:firmware] load_linux: dynamically calculate the cmdline region
...{ > - if (hdr->version < 0x0202 || !(hdr->loadflags & 0x01)) > + if (hdr->version < 0x0202 || !(hdr->loadflags & 0x01)) { > + struct syslinux_memmap *mmap; > + > + mmap = syslinux_memory_map(); > + if (mmap && !syslinux_memmap_highest(mmap, SMT_FREE, &start, > + cmdline_size, 0xa0000, 16)) { > + syslinux_free_memmap(mmap); > + return start - base; > + } > + > + if (mmap && !syslinux_memmap_highest(mmap, SMT_TERMINAL, &start, > + cmdline_size, 0xa0000, 16)) { > + syslinux_fre...
2013 Jul 29
1
[syslinux:firmware] load_linux: dynamically calculate the cmdline region
On 07/29/2013 06:28 AM, Matt Fleming wrote: > On Fri, 26 Jul, at 09:49:28AM, H. Peter Anvin wrote: >> Hmm... this might constrain the heap excessively if the SMT_TERMINAL >> cutoff is at the wrong place (because there will be just enough SMT_FREE >> to fit.) I'm wondering if we shouldn't use the highest of these two >> regions. > > Could you give an example memory map where this would be a problem? I > not sure I understand what you mean. Perhaps something like, > > start end type >...
2013 Jul 29
0
[syslinux:firmware] load_linux: dynamically calculate the cmdline region
On Fri, 26 Jul, at 09:49:28AM, H. Peter Anvin wrote: > Hmm... this might constrain the heap excessively if the SMT_TERMINAL > cutoff is at the wrong place (because there will be just enough SMT_FREE > to fit.) I'm wondering if we shouldn't use the highest of these two > regions. Could you give an example memory map where this would be a problem? I not sure I understand what you mean. Perhaps something like, start end type ----------------------------- 0x09...
2013 Dec 04
0
Boot iPXE from syslinux/isolinux
..., + const struct linux_header *hdr, size_t cmdline_size, addr_t base, addr_t start) { - if (hdr->version < 0x0202 || !(hdr->loadflags & 0x01)) { - struct syslinux_memmap *mmap; - - mmap = syslinux_memory_map(); - if (mmap && !syslinux_memmap_highest(mmap, SMT_FREE, &start, - cmdline_size, 0xa0000, 16)) { - syslinux_free_memmap(mmap); - return start - base; - } + size_t max_offset; - if (mmap && !syslinux_memmap_highest(mmap, SMT_TERMINAL, &start, - cmdline_size, 0xa0000, 16)) { - syslinux_free_memmap(mmap);...
2013 Dec 04
2
Boot iPXE from syslinux/isolinux
"H. Peter Anvin" <hpa at zytor.com> on Tue, 2013/12/03 20:26: > On 10/24/2013 01:09 AM, Christian Hesse wrote: > >>> > >>> version 6.02-pre5 works, 6.02-pre6 does not. > >> > >> Struggled with git bisect, but finally succeeded: > >> > >> 8f470e7bfe75f6401f6c5432988c620b863ad274 is the first bad commit > >>
2014 Nov 22
3
Use z size specifier for printf-ing size_t variable
...t where, char **argv) dprintf("Initial memory map:\n"); syslinux_dump_memmap(mmap); - dprintf("Segment at 0x%08x len 0x%08x\n", where, len); + dprintf("Segment at 0x%08x len 0x%08zx\n", where, len); if (syslinux_memmap_type(amap, where, len) != SMT_FREE) { - printf("Memory segment at 0x%08x (len 0x%08x) is unavailable\n", + printf("Memory segment at 0x%08x (len 0x%08zx) is unavailable\n", where, len); goto bail; /* Memory region unavailable */ } diff --git a/com32/sysdump/dmi.c b/com32/sysdump/dmi.c index ce25e...
2008 Jun 16
0
Com32/PXELINUX issues when booting on certain hardware
...9:01.000000000 -0700 @@ -42,6 +42,9 @@ #include <com32.h> #include <syslinux/movebits.h> +#define PAGE_SIZE 4096 +#define PAGE_MASK (PAGE_SIZE - 1) + struct e820_entry { uint64_t start; uint64_t len; @@ -87,8 +90,22 @@ break; type = e820buf->type == 1 ? SMT_FREE : SMT_RESERVED; - start = e820buf->start; - len = e820buf->len; + + /* + * If the start and length of a usable region in the BIOS + * memory map are not page-aligned, we may end up passing + * an initrd to the kernel that shares a page with a reserved + * region of me...
2009 Mar 12
0
[PATCH 1/1] linux.c32: Fix initrd alignment
...ib/syslinux/load_linux.c index b772056..d09a2cb 100644 --- a/com32/lib/syslinux/load_linux.c +++ b/com32/lib/syslinux/load_linux.c @@ -292,7 +292,7 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size, addr_t adj_start = (ml->start+align_mask) & ~align_mask; if (ml->type == SMT_FREE && ml->next->start - adj_start >= irf_size) - best_addr = (ml->next->start - irf_size) & ~align_mask; + best_addr = ((ml->next->start & ~align_mask) - irf_size) & ~align_mask; } if (!best_addr) -- 1.5.4.3
2015 Oct 10
3
[PATCH] Extend Multiboot1 with support for ELF64 file format
...>p_vaddr + && eh64->e_entry < ph64->p_vaddr + msize) + regs.eip = eh64->e_entry + (ph64->p_paddr - ph64->p_vaddr); + + dprintf("Segment at 0x%08x data 0x%08x len 0x%08x\n", + addr, dsize, msize); + + if (syslinux_memmap_type(amap, addr, msize) != SMT_FREE) { + printf + ("Memory segment at 0x%08x (len 0x%08x) is unavailable\n", + addr, msize); + return NULL; /* Memory region unavailable */ + } + + /* Mark this region as allocated in the available map */ + if (syslinux_add_memmap(&amap, addr, msize, SMT_ALLOC)) { +...
2013 Mar 27
1
[PATCH] Fix support for Linux kernel images with no protected mode code
...f, size_t kernel_size, /* Place the kernel in memory */ /* First, find a suitable place for the protected-mode code */ - if (syslinux_memmap_type(amap, prot_mode_base, prot_mode_size) + if (prot_mode_size && + syslinux_memmap_type(amap, prot_mode_base, prot_mode_size) != SMT_FREE) { const struct syslinux_memmap *mp; if (!hdr.relocatable_kernel) @@ -423,12 +424,15 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size, } /* Protected-mode code */ - if (syslinux_add_movelist(&fraglist, prot_mode_base, - (addr_t) kernel_buf + real_mode_s...
2015 Jan 25
0
Use z size specifier for printf-ing size_t variable
...dprintf("Initial memory map:\n"); > syslinux_dump_memmap(mmap); > > - dprintf("Segment at 0x%08x len 0x%08x\n", where, len); > + dprintf("Segment at 0x%08x len 0x%08zx\n", where, len); > > if (syslinux_memmap_type(amap, where, len) != SMT_FREE) { > - printf("Memory segment at 0x%08x (len 0x%08x) is unavailable\n", > + printf("Memory segment at 0x%08x (len 0x%08zx) is unavailable\n", > where, len); > goto bail; /* Memory region unavailable */ > } >...