grub2/include/grub/kernel.h
okuji a13f92373c 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/pupa-setup.c (setup): Convert the endianness of
		the length of a blocklist correctly.

			* util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
				Use ioctl only if the OS file is a block device.
					(pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
						not very useful for normal files.

							* kern/main.c (pupa_set_root_dev): New function.
								(pupa_load_normal_mode): Likewise.
									(pupa_main): Call those above.

										* include/pupa/types.h (pupa_swap_bytes16): Cast the result to
											pupa_uint16_t.

												* include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
2003-01-07 07:54:07 +00:00

59 lines
1.8 KiB
C

/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_KERNEL_HEADER
#define PUPA_KERNEL_HEADER 1
#include <pupa/types.h>
/* The module header. */
struct pupa_module_header
{
/* The offset of object code. */
pupa_off_t offset;
/* The size of object code plus this header. */
pupa_size_t size;
};
/* The start address of the kernel. */
extern pupa_addr_t pupa_start_addr;
/* The end address of the kernel. */
extern pupa_addr_t pupa_end_addr;
/* The total size of modules including their headers. */
extern pupa_size_t pupa_total_module_size;
/* The size of the kernel image. */
extern pupa_size_t pupa_kernel_image_size;
/* The start point of the C code. */
void pupa_main (void);
/* The machine-specific initialization. This must initialize memory. */
void pupa_machine_init (void);
/* Return the end address of the core image. */
pupa_addr_t pupa_get_end_addr (void);
/* Register all the exported symbols. This is automatically generated. */
void pupa_register_exported_symbols (void);
#endif /* ! PUPA_KERNEL_HEADER */