diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-03-15 11:38:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-03-15 11:38:16 -0700 |
commit | 77481cdf403e4170785fada5a44a0efcd2a357e4 (patch) | |
tree | 0e17964a9f051fe5d2911cd6ee32eaee87fad887 /com32/include/syslinux/linux.h | |
parent | 200e00ab1afbfac847c48eb608110c4726a582c4 (diff) | |
download | syslinux-77481cdf403e4170785fada5a44a0efcd2a357e4.tar.gz |
Initial library support for booting a Linux kernel
Diffstat (limited to 'com32/include/syslinux/linux.h')
-rw-r--r-- | com32/include/syslinux/linux.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/com32/include/syslinux/linux.h b/com32/include/syslinux/linux.h new file mode 100644 index 00000000..821ef0a6 --- /dev/null +++ b/com32/include/syslinux/linux.h @@ -0,0 +1,58 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2007 H. Peter Anvin - All Rights Reserved + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall + * be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * ----------------------------------------------------------------------- */ + +/* + * syslinux/linux.h + * + * Definitions used to boot a Linux kernel + */ + +#ifndef _SYSLINUX_LINUX_H +#define _SYSLINUX_LINUX_H + +#include <stddef.h> +#include <stdint.h> + +/* A chunk of an initramfs. These are kept as a doubly-linked + circular list with headnode; the headnode is distinguished by + having len == 0. The data pointer can be NULL if data_len is zero; + if data_len < len then the balance of the region is zeroed. */ + +struct initramfs { + struct initramfs *prev, *next; + size_t len; + void *data; + size_t data_len; +}; + +int syslinux_boot_linux(void *kernel_buf, size_t kernel_size, + struct initramfs *initramfs, + char *cmdline, + uint16_t video_mode, + uint32_t mem_limit); + +#endif /* _SYSLINUX_LINUX_H */ |