summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* thread: mbox: fix return value for mbox_fetch()threadH. Peter Anvin2009-09-101-2/+6
| | | | | | Make mbox_fetch() actually return the time spent waiting. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: thread: add a "timeouts" pointer to the thread structureH. Peter Anvin2009-09-091-0/+3
| | | | | | | | Add a "timeouts" pointer to the thread structure; this is a private per-thread pointer for the benefit of lwIP. This is ad hoc, but a lot easier than implementing TLS. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: thread: move most thread state to stack; task switch errnoH. Peter Anvin2009-09-094-24/+39
| | | | | | | Move most our thread state to the stack. Task switch the errno variable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: thread: merge mbox_post() and mbox_trypost()H. Peter Anvin2009-09-092-14/+7
| | | | | | | Merge mbox_post() and mbox_trypost() into a single function with a timeout parameter. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: add simple mailbox libraryH. Peter Anvin2009-09-092-0/+88
| | | | | | A very simple mailbox library, designed for lwIP porting. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: thread: add option to not wait on a semaphore at allH. Peter Anvin2009-09-091-26/+33
| | | | | | | Implement a "trywait" option... if timeout is set to -1, then timeout immediately if the semaphore isn't available. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: thread: have start_thread() allocate memory dynamicallyH. Peter Anvin2009-09-094-12/+18
| | | | | | | | Have start_thread() allocate memory dynamically, using malloc(). XXX: should probably free that memory in __exit_thread()... could be "interesting". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: simple thread libraryH. Peter Anvin2009-09-0811-0/+416
| | | | | | Simple thread library with the intent of making lwIP easier to port. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: declare jiffies_t, MS_PER_JIFFYH. Peter Anvin2009-09-081-3/+7
| | | | | | Create a specific type for jiffies, and an MS_PER_JIFFY macro. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* stddef.h: add container_of()H. Peter Anvin2009-09-081-0/+8
| | | | | | Add the container_of() macro. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-043-0/+82
|\
| * core: pxe: need to save/restore es around EFI CSM hacksyslinux-4.00-pre6H. Peter Anvin2009-09-041-0/+2
| | | | | | | | | | | | | | | | Unlike in the Syslinux 3.x branch, we need to save/restore es around the PXE EFI CSM localboot hack. This really should be moved to C, anyway, at the same time USE_PXE_PROVIDED_STACK is finally killed off. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'master' into fscH. Peter Anvin2009-09-043-0/+6
| |\
| | * core: add missing calls to cleanup_hardwaresyslinux-3.83-pre10H. Peter Anvin2009-09-043-0/+6
| | | | | | | | | | | | | | | | | | | | | As we're starting to rely more and more on a modified hardware state, it is really important to clean up on all exit paths. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | Merge branch 'master' into fscH. Peter Anvin2009-09-041-0/+74
| |\ \ | | |/ | | | | | | | | | | | | | | | Resolved Conflicts: core/pxelinux.asm Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * pxelinux: workaround for EFI CSM bug - BEV stack overwrite on localbootH. Peter Anvin2009-09-041-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | On at least some machines with an EFI-based BIOS, the Compatibility Service Module (CSM) puts the BEV stack at an address where the boot loader is likely to overwrite it. Implement a workaround which forces INT 18h instead if an EFI signature is detected in memory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-031-5/+6
|\ \ \ | |/ /
| * | core: pxe: don't confuse index and data when searching...H. Peter Anvin2009-09-031-5/+6
| | | | | | | | | | | | | | | | | | | | | Don't confuse the index and data when searching the PCI ID table for special idle handling. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-023-3/+17
|\ \ \ | |/ /
| * | core: move the generated IDT stubs to a separate .gentext16 sectionH. Peter Anvin2009-09-023-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | Move the generated IDT stubs to a separate section, .gentext16, so that they aren't immediately adjacent to a piece of highly mutable data. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-021-0/+1
|\ \ \ | |/ /
| * | core: make sure __jiffies is alignedH. Peter Anvin2009-09-021-0/+1
| | | | | | | | | | | | | | | | | | | | | __jiffies really wants to be aligned. We're not SMP, so technically it will be atomic anyway. Still... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Use jiffies() to implement times(); create <core/*.h> namespaceH. Peter Anvin2009-09-025-57/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the core function jiffies() to implement times(), instead of poking at the BIOS variable. This creates a new need for a include file namespace for items exported from the core for the purpose of the library (not intended for direct use by applications). Use the <core/*.h> namespace for that. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-0215-110/+181
|\ \ \ | |/ /
| * | core: pxe: create a single tftp_error() function, send ERROR on closeH. Peter Anvin2009-09-021-18/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a single function to generate a TFTP error. We really should be better about distinguishing different error conditions. Send an ERROR packet if we're closing a file which still has an open connection. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: use jiffies instead of BIOS_timerH. Peter Anvin2009-09-026-32/+29
| | | | | | | | | | | | | | | | | | | | | | | | Use jiffies instead of BIOS_timer. In 16-bit code we can use the low 16 bits of __jiffies when appropriate, since we have proper 2's complement wraparound at all times. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: hook INT 1Ch for a simple monotonic timerH. Peter Anvin2009-09-026-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BIOS_timer variable at 4C6h is somewhat unreliable... it is documented to wrap at "midnight", norminally after 1627419 ticks (0x18d51b), which is a rather awkward number to deal with modulo. Instead, hook the INT 1Ch secondary timer interrupt and just count a simple incrementing variable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: merge cpuinit.inc into init.incH. Peter Anvin2009-09-025-60/+38
| | | | | | | | | | | | | | | | | | | | | The separation between cpuinit.inc and init.inc has never been very clear, and it just made the code harder to read. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: pxe: fix the behavior on non-received RRQ replyH. Peter Anvin2009-09-021-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the behavior when we don't immediately get a valid reply to an RRQ packet. In particular, we would interpret what was previously in the buffer as the requested data, whereas in general it hadn't even been written to. Reported-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | elflink: clean up formatting in com32/elflinkH. Peter Anvin2009-09-0221-298/+295
| | | | | | | | | | | | | | | | | | Clean up the formatting in com32/elflink, mostly by using Nindent. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | core: elflink: clean up formattingH. Peter Anvin2009-09-028-254/+233
| | | | | | | | | | | | | | | | | | Clean up formatting of the core/elflink code, mostly using Nindent. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-02143-11069/+12829
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: MCONFIG.embedded com32/MCONFIG com32/lib/Makefile core/Makefile core/extern.inc core/extlinux.asm core/isolinux.asm core/syslinux.ld Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: pxe: use FAR_PTR() macro where appropriateH. Peter Anvin2009-09-013-12/+6
| | | | | | | | | | | | | | | | | | | | | Use the FAR_PTR() macro to convert a pointer in lowmem to SEG:OFFS format as unit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: pxe: remove vestigial dnsresolv.incH. Peter Anvin2009-09-015-34/+10
| | | | | | | | | | | | | | | | | | | | | Remove dnsresolv.inc, which was already unused except for a couple of buffer declarations. Move those buffers to regular C variables. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: pxe: port the PXE idle function to CH. Peter Anvin2009-09-017-141/+133
| | | | | | | | | | | | | | | | | | | | | Port the PXE idle function to C; make the idle hook a protected-mode call. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: drop any .eh_frame sectionssyslinux-4.00-pre5H. Peter Anvin2009-08-311-0/+5
| | | | | | | | | | | | | | | | | | We have no use of .eh_frames... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | Merge branch 'master' into fscH. Peter Anvin2009-08-3175-4519/+5647
| |\ \ | | |/
| | * NEWS: update for 3.83H. Peter Anvin2009-08-252-0/+12
| | |
| | * hdt: enhance error reporting in the CLI (disk)syslinux-3.83-pre9Pierre-Alexandre Meyer2009-08-241-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_partition_table can fail for two reasons: disk I/O error or unrecognized partition layout (non msdos, corrupt, ...). In the latter case, we were displaying Error parsing disk 0x80 parse_partition_table: error 0 which is confusing. We now display Disk 0x80: unrecognized partition layout or the errno_disk in case of I/O errors. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| | * hdt: make get_error behaves like perrorPierre-Alexandre Meyer2009-08-245-31/+9
| | | | | | | | | | | | | | | | | | | | | | | | This simplifies buffer handling. Misc.: clean some old error code handling. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| | * hdt: fix CLI crash when parsing unsupported geometriesPierre-Alexandre Meyer2009-08-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove extra free() calls: these were needed before the introduction of the disklib errno. We apparently forgot to remove them. Reported-by: Gert Hulselmans <hulselmansgert@gmail.com> Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| | * hdt: 0.3.4syslinux-3.83-pre8hdt-0.3.4erwan2009-08-201-1/+1
| | | | | | | | | | | | | | | | | | Impact: New release 0.3.4 is now out !
| | * hdt: fix disklib displayPierre-Alexandre Meyer2009-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | We currently display the first sector after the end of an extended. Fix it (-1). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| | * disklib: fix extended partition codePierre-Alexandre Meyer2009-08-201-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gert1 reported some issues using disklib with HDT. As it turned out, the code that iterated through ebrs in an extended partition was broken: ebr offsets need to be relative to the start of that partition. Misc.: fix memory leak. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org> Signed-off-by: Erwan Velu <erwan.velu@free.fr>
| | * hdt: Fixing memory corruptionerwan2009-08-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: Improve stability In some case, sectors_to_size can return a 8 char long string like "1000 MiB". In such case, some buffer were corrupted. This is now fixed by a size[9] instead of size[8].
| | * Merge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux ↵erwan2009-08-1911-3591/+1387
| | |\ | | | | | | | | | | | | into origin/master
| | | * MEMDISK: generate map filessyslinux-3.83-pre7H. Peter Anvin2009-08-173-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Generate map files to make debugging less painful. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | | * memdisk: make the stack size configurableH. Peter Anvin2009-08-171-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to configure the stack size on the command line, so that we can rule that out in case of problems. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | | * menu: initialize cm (current menu) before empty checkH. Peter Anvin2009-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The empty check in the menu system used "cm", but before "cm" had actually been initialized. Move the "cm" initialization earlier so we do the right thing here. Reported-by: CKSoon <cksoon79@yahoo.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | | * Merge commit 'origin/master'H. Peter Anvin2009-08-142-1676/+1351
| | | |\