2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>

All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
	and grub_, respectively. Because the conversion is trivial and
	mechanical, I omit the details here. Please refer to the CVS
	if you need more information.
This commit is contained in:
okuji 2004-04-04 13:46:03 +00:00
parent 6a1425510d
commit 4b13b216f4
125 changed files with 6198 additions and 6181 deletions

View file

@ -1,8 +1,8 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* PUPA is free software; you can redistribute it and/or modify
* GRUB 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.
@ -13,16 +13,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PUPA; if not, write to the Free Software
* along with GRUB; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_BIOSDISK_MACHINE_HEADER
#define PUPA_BIOSDISK_MACHINE_HEADER 1
#ifndef GRUB_BIOSDISK_MACHINE_HEADER
#define GRUB_BIOSDISK_MACHINE_HEADER 1
#define PUPA_BIOSDISK_FLAG_LBA 1
#define GRUB_BIOSDISK_FLAG_LBA 1
struct pupa_biosdisk_data
struct grub_biosdisk_data
{
int drive;
unsigned long cylinders;
@ -31,17 +31,17 @@ struct pupa_biosdisk_data
unsigned long flags;
};
int pupa_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
int pupa_biosdisk_rw_standard (int ah, int drive, int coff, int hoff,
int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
int grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff,
int soff, int nsec, int segment);
int pupa_biosdisk_check_int13_extensions (int drive);
int pupa_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp);
int pupa_biosdisk_get_diskinfo_standard (int drive,
int grub_biosdisk_check_int13_extensions (int drive);
int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp);
int grub_biosdisk_get_diskinfo_standard (int drive,
unsigned long *cylinders,
unsigned long *heads,
unsigned long *sectors);
int pupa_biosdisk_get_num_floppies (void);
int grub_biosdisk_get_num_floppies (void);
void pupa_biosdisk_init (void);
void grub_biosdisk_init (void);
#endif /* ! PUPA_BIOSDISK_MACHINE_HEADER */
#endif /* ! GRUB_BIOSDISK_MACHINE_HEADER */

View file

@ -1,5 +1,5 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@ -17,40 +17,40 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_CONSOLE_MACHINE_HEADER
#define PUPA_CONSOLE_MACHINE_HEADER 1
#ifndef GRUB_CONSOLE_MACHINE_HEADER
#define GRUB_CONSOLE_MACHINE_HEADER 1
/* Define scan codes. */
#define PUPA_CONSOLE_KEY_LEFT 0x4B00
#define PUPA_CONSOLE_KEY_RIGHT 0x4D00
#define PUPA_CONSOLE_KEY_UP 0x4800
#define PUPA_CONSOLE_KEY_DOWN 0x5000
#define PUPA_CONSOLE_KEY_IC 0x5200
#define PUPA_CONSOLE_KEY_DC 0x5300
#define PUPA_CONSOLE_KEY_BACKSPACE 0x0008
#define PUPA_CONSOLE_KEY_HOME 0x4700
#define PUPA_CONSOLE_KEY_END 0x4F00
#define PUPA_CONSOLE_KEY_NPAGE 0x4900
#define PUPA_CONSOLE_KEY_PPAGE 0x5100
#define GRUB_CONSOLE_KEY_LEFT 0x4B00
#define GRUB_CONSOLE_KEY_RIGHT 0x4D00
#define GRUB_CONSOLE_KEY_UP 0x4800
#define GRUB_CONSOLE_KEY_DOWN 0x5000
#define GRUB_CONSOLE_KEY_IC 0x5200
#define GRUB_CONSOLE_KEY_DC 0x5300
#define GRUB_CONSOLE_KEY_BACKSPACE 0x0008
#define GRUB_CONSOLE_KEY_HOME 0x4700
#define GRUB_CONSOLE_KEY_END 0x4F00
#define GRUB_CONSOLE_KEY_NPAGE 0x4900
#define GRUB_CONSOLE_KEY_PPAGE 0x5100
#ifndef ASM_FILE
#include <pupa/types.h>
#include <pupa/symbol.h>
#include <grub/types.h>
#include <grub/symbol.h>
/* These are global to share code between C and asm. */
extern pupa_uint8_t pupa_console_cur_color;
void pupa_console_real_putchar (int c);
int EXPORT_FUNC(pupa_console_checkkey) (void);
int EXPORT_FUNC(pupa_console_getkey) (void);
pupa_uint16_t pupa_console_getxy (void);
void pupa_console_gotoxy (pupa_uint8_t x, pupa_uint8_t y);
void pupa_console_cls (void);
void pupa_console_setcursor (int on);
extern grub_uint8_t grub_console_cur_color;
void grub_console_real_putchar (int c);
int EXPORT_FUNC(grub_console_checkkey) (void);
int EXPORT_FUNC(grub_console_getkey) (void);
grub_uint16_t grub_console_getxy (void);
void grub_console_gotoxy (grub_uint8_t x, grub_uint8_t y);
void grub_console_cls (void);
void grub_console_setcursor (int on);
/* Initialize the console system. */
void pupa_console_init (void);
void grub_console_init (void);
#endif
#endif /* ! PUPA_CONSOLE_MACHINE_HEADER */
#endif /* ! GRUB_CONSOLE_MACHINE_HEADER */

View file

@ -1,6 +1,6 @@
/* ieee1275.h - Access the Open Firmware client interface. */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@ -18,82 +18,82 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_IEEE1275_MACHINE_HEADER
#define PUPA_IEEE1275_MACHINE_HEADER 1
#ifndef GRUB_IEEE1275_MACHINE_HEADER
#define GRUB_IEEE1275_MACHINE_HEADER 1
#include <stdint.h>
#include <pupa/err.h>
#include <pupa/types.h>
#include <grub/err.h>
#include <grub/types.h>
/* Maps a device alias to a pathname. */
struct pupa_ieee1275_devalias
struct grub_ieee1275_devalias
{
char *name;
char *path;
char *type;
};
struct pupa_ieee1275_mem_region
struct grub_ieee1275_mem_region
{
unsigned int start;
unsigned int size;
};
/* FIXME jrydberg: is this correct cell types? */
typedef intptr_t pupa_ieee1275_ihandle_t;
typedef intptr_t pupa_ieee1275_phandle_t;
typedef intptr_t grub_ieee1275_ihandle_t;
typedef intptr_t grub_ieee1275_phandle_t;
extern intptr_t (*pupa_ieee1275_entry_fn) (void *);
extern intptr_t (*grub_ieee1275_entry_fn) (void *);
uint32_t EXPORT_FUNC(pupa_ieee1275_decode_int_4) (unsigned char *p);
int EXPORT_FUNC(pupa_ieee1275_finddevice) (char *name,
pupa_ieee1275_phandle_t *phandlep);
int EXPORT_FUNC(pupa_ieee1275_get_property) (int handle, const char *property,
void *buf, pupa_size_t size,
pupa_size_t *actual);
int EXPORT_FUNC(pupa_ieee1275_next_property) (int handle, char *prev_prop,
uint32_t EXPORT_FUNC(grub_ieee1275_decode_int_4) (unsigned char *p);
int EXPORT_FUNC(grub_ieee1275_finddevice) (char *name,
grub_ieee1275_phandle_t *phandlep);
int EXPORT_FUNC(grub_ieee1275_get_property) (int handle, const char *property,
void *buf, grub_size_t size,
grub_size_t *actual);
int EXPORT_FUNC(grub_ieee1275_next_property) (int handle, char *prev_prop,
char *prop, int *flags);
int EXPORT_FUNC(pupa_ieee1275_get_property_length)
(pupa_ieee1275_phandle_t handle, const char *prop, pupa_size_t *length);
int EXPORT_FUNC(pupa_ieee1275_instance_to_package)
(pupa_ieee1275_ihandle_t ihandle, pupa_ieee1275_phandle_t *phandlep);
int EXPORT_FUNC(pupa_ieee1275_package_to_path) (pupa_ieee1275_phandle_t phandle,
char *path, pupa_size_t len,
pupa_size_t *actual);
int EXPORT_FUNC(pupa_ieee1275_instance_to_path)
(pupa_ieee1275_ihandle_t ihandle, char *path, pupa_size_t len,
pupa_size_t *actual);
int EXPORT_FUNC(pupa_ieee1275_write) (pupa_ieee1275_ihandle_t ihandle,
void *buffer, pupa_size_t len,
pupa_size_t *actualp);
int EXPORT_FUNC(pupa_ieee1275_read) (pupa_ieee1275_ihandle_t ihandle,
void *buffer, pupa_size_t len,
pupa_size_t *actualp);
int EXPORT_FUNC(pupa_ieee1275_seek) (pupa_ieee1275_ihandle_t ihandle,
int EXPORT_FUNC(grub_ieee1275_get_property_length)
(grub_ieee1275_phandle_t handle, const char *prop, grub_size_t *length);
int EXPORT_FUNC(grub_ieee1275_instance_to_package)
(grub_ieee1275_ihandle_t ihandle, grub_ieee1275_phandle_t *phandlep);
int EXPORT_FUNC(grub_ieee1275_package_to_path) (grub_ieee1275_phandle_t phandle,
char *path, grub_size_t len,
grub_size_t *actual);
int EXPORT_FUNC(grub_ieee1275_instance_to_path)
(grub_ieee1275_ihandle_t ihandle, char *path, grub_size_t len,
grub_size_t *actual);
int EXPORT_FUNC(grub_ieee1275_write) (grub_ieee1275_ihandle_t ihandle,
void *buffer, grub_size_t len,
grub_size_t *actualp);
int EXPORT_FUNC(grub_ieee1275_read) (grub_ieee1275_ihandle_t ihandle,
void *buffer, grub_size_t len,
grub_size_t *actualp);
int EXPORT_FUNC(grub_ieee1275_seek) (grub_ieee1275_ihandle_t ihandle,
int pos_hi, int pos_lo, int *result);
int EXPORT_FUNC(pupa_ieee1275_peer) (pupa_ieee1275_phandle_t node,
pupa_ieee1275_phandle_t *result);
int EXPORT_FUNC(pupa_ieee1275_child) (pupa_ieee1275_phandle_t node,
pupa_ieee1275_phandle_t *result);
int EXPORT_FUNC(pupa_ieee1275_parent) (pupa_ieee1275_phandle_t node,
pupa_ieee1275_phandle_t *result);
int EXPORT_FUNC(pupa_ieee1275_exit) (void);
int EXPORT_FUNC(pupa_ieee1275_open) (char *node,
pupa_ieee1275_ihandle_t *result);
int EXPORT_FUNC(pupa_ieee1275_close) (pupa_ieee1275_ihandle_t ihandle);
int EXPORT_FUNC(pupa_ieee1275_claim) (void *p, pupa_size_t size, unsigned int align,
int EXPORT_FUNC(grub_ieee1275_peer) (grub_ieee1275_phandle_t node,
grub_ieee1275_phandle_t *result);
int EXPORT_FUNC(grub_ieee1275_child) (grub_ieee1275_phandle_t node,
grub_ieee1275_phandle_t *result);
int EXPORT_FUNC(grub_ieee1275_parent) (grub_ieee1275_phandle_t node,
grub_ieee1275_phandle_t *result);
int EXPORT_FUNC(grub_ieee1275_exit) (void);
int EXPORT_FUNC(grub_ieee1275_open) (char *node,
grub_ieee1275_ihandle_t *result);
int EXPORT_FUNC(grub_ieee1275_close) (grub_ieee1275_ihandle_t ihandle);
int EXPORT_FUNC(grub_ieee1275_claim) (void *p, grub_size_t size, unsigned int align,
void **result);
int EXPORT_FUNC(pupa_ieee1275_set_property) (pupa_ieee1275_phandle_t phandle,
int EXPORT_FUNC(grub_ieee1275_set_property) (grub_ieee1275_phandle_t phandle,
const char *propname, void *buf,
pupa_size_t size,
pupa_size_t *actual);
int EXPORT_FUNC(pupa_ieee1275_set_color) (pupa_ieee1275_ihandle_t ihandle,
grub_size_t size,
grub_size_t *actual);
int EXPORT_FUNC(grub_ieee1275_set_color) (grub_ieee1275_ihandle_t ihandle,
int index, int r, int g, int b);
pupa_err_t EXPORT_FUNC(pupa_devalias_iterate)
(int (*hook) (struct pupa_ieee1275_devalias *alias));
grub_err_t EXPORT_FUNC(grub_devalias_iterate)
(int (*hook) (struct grub_ieee1275_devalias *alias));
#endif /* ! PUPA_IEEE1275_MACHINE_HEADER */
#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */

View file

@ -1,5 +1,5 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
* Copyright (C) 2003 Jeroen Dekkers <jeroen@dekkers.cx>
*
@ -18,34 +18,34 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_LOADER_MACHINE_HEADER
#define PUPA_LOADER_MACHINE_HEADER 1
#ifndef GRUB_LOADER_MACHINE_HEADER
#define GRUB_LOADER_MACHINE_HEADER 1
#include <pupa/types.h>
#include <pupa/symbol.h>
#include <pupa/machine/multiboot.h>
#include <grub/types.h>
#include <grub/symbol.h>
#include <grub/machine/multiboot.h>
extern pupa_uint32_t EXPORT_VAR(pupa_linux_prot_size);
extern char *EXPORT_VAR(pupa_linux_tmp_addr);
extern char *EXPORT_VAR(pupa_linux_real_addr);
extern grub_uint32_t EXPORT_VAR(grub_linux_prot_size);
extern char *EXPORT_VAR(grub_linux_tmp_addr);
extern char *EXPORT_VAR(grub_linux_real_addr);
void EXPORT_FUNC(pupa_linux_boot_zimage) (void) __attribute__ ((noreturn));
void EXPORT_FUNC(pupa_linux_boot_bzimage) (void) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_linux_boot_zimage) (void) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_linux_boot_bzimage) (void) __attribute__ ((noreturn));
/* This is an asm part of the chainloader. */
void EXPORT_FUNC(pupa_chainloader_real_boot) (int drive, void *part_addr) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_chainloader_real_boot) (int drive, void *part_addr) __attribute__ ((noreturn));
/* The asm part of the multiboot loader. */
void EXPORT_FUNC(pupa_multiboot_real_boot) (pupa_addr_t entry,
struct pupa_multiboot_info *mbi)
void EXPORT_FUNC(grub_multiboot_real_boot) (grub_addr_t entry,
struct grub_multiboot_info *mbi)
__attribute__ ((noreturn));
/* It is necessary to export these functions, because normal mode commands
reuse rescue mode commands. */
void pupa_rescue_cmd_chainloader (int argc, char *argv[]);
void pupa_rescue_cmd_linux (int argc, char *argv[]);
void pupa_rescue_cmd_initrd (int argc, char *argv[]);
void pupa_rescue_cmd_multiboot (int argc, char *argv[]);
void pupa_rescue_cmd_module (int argc, char *argv[]);
void grub_rescue_cmd_chainloader (int argc, char *argv[]);
void grub_rescue_cmd_linux (int argc, char *argv[]);
void grub_rescue_cmd_initrd (int argc, char *argv[]);
void grub_rescue_cmd_multiboot (int argc, char *argv[]);
void grub_rescue_cmd_module (int argc, char *argv[]);
#endif /* ! PUPA_LOADER_MACHINE_HEADER */
#endif /* ! GRUB_LOADER_MACHINE_HEADER */

View file

@ -1,6 +1,6 @@
/* multiboot.h - multiboot header file. */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@ -18,167 +18,167 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_MULTIBOOT_MACHINE_HEADER
#define PUPA_MULTIBOOT_MACHINE_HEADER 1
#ifndef GRUB_MULTIBOOT_MACHINE_HEADER
#define GRUB_MULTIBOOT_MACHINE_HEADER 1
/* How many bytes from the start of the file we search for the header. */
#define PUPA_MB_SEARCH 8192
#define GRUB_MB_SEARCH 8192
/* The magic field should contain this. */
#define PUPA_MB_MAGIC 0x1BADB002
#define GRUB_MB_MAGIC 0x1BADB002
/* This should be in %eax. */
#define PUPA_MB_MAGIC2 0x2BADB002
#define GRUB_MB_MAGIC2 0x2BADB002
/* The bits in the required part of flags field we don't support. */
#define PUPA_MB_UNSUPPORTED 0x0000fffc
#define GRUB_MB_UNSUPPORTED 0x0000fffc
/* Alignment of multiboot modules. */
#define PUPA_MB_MOD_ALIGN 0x00001000
#define GRUB_MB_MOD_ALIGN 0x00001000
/*
* Flags set in the 'flags' member of the multiboot header.
*/
/* Align all boot modules on i386 page (4KB) boundaries. */
#define PUPA_MB_PAGE_ALIGN 0x00000001
#define GRUB_MB_PAGE_ALIGN 0x00000001
/* Must pass memory information to OS. */
#define PUPA_MB_MEMORY_INFO 0x00000002
#define GRUB_MB_MEMORY_INFO 0x00000002
/* Must pass video information to OS. */
#define PUPA_MB_VIDEO_MODE 0x00000004
#define GRUB_MB_VIDEO_MODE 0x00000004
/* This flag indicates the use of the address fields in the header. */
#define PUPA_MB_AOUT_KLUDGE 0x00010000
#define GRUB_MB_AOUT_KLUDGE 0x00010000
/*
* Flags to be set in the 'flags' member of the multiboot info structure.
*/
/* is there basic lower/upper memory information? */
#define PUPA_MB_INFO_MEMORY 0x00000001
#define GRUB_MB_INFO_MEMORY 0x00000001
/* is there a boot device set? */
#define PUPA_MB_INFO_BOOTDEV 0x00000002
#define GRUB_MB_INFO_BOOTDEV 0x00000002
/* is the command-line defined? */
#define PUPA_MB_INFO_CMDLINE 0x00000004
#define GRUB_MB_INFO_CMDLINE 0x00000004
/* are there modules to do something with? */
#define PUPA_MB_INFO_MODS 0x00000008
#define GRUB_MB_INFO_MODS 0x00000008
/* These next two are mutually exclusive */
/* is there a symbol table loaded? */
#define PUPA_MB_INFO_AOUT_SYMS 0x00000010
#define GRUB_MB_INFO_AOUT_SYMS 0x00000010
/* is there an ELF section header table? */
#define PUPA_MB_INFO_ELF_SHDR 0x00000020
#define GRUB_MB_INFO_ELF_SHDR 0x00000020
/* is there a full memory map? */
#define PUPA_MB_INFO_MEM_MAP 0x00000040
#define GRUB_MB_INFO_MEM_MAP 0x00000040
/* Is there drive info? */
#define PUPA_MB_INFO_DRIVE_INFO 0x00000080
#define GRUB_MB_INFO_DRIVE_INFO 0x00000080
/* Is there a config table? */
#define PUPA_MB_INFO_CONFIG_TABLE 0x00000100
#define GRUB_MB_INFO_CONFIG_TABLE 0x00000100
/* Is there a boot loader name? */
#define PUPA_MB_INFO_BOOT_LOADER_NAME 0x00000200
#define GRUB_MB_INFO_BOOT_LOADER_NAME 0x00000200
/* Is there a APM table? */
#define PUPA_MB_INFO_APM_TABLE 0x00000400
#define GRUB_MB_INFO_APM_TABLE 0x00000400
/* Is there video information? */
#define PUPA_MB_INFO_VIDEO_INFO 0x00000800
#define GRUB_MB_INFO_VIDEO_INFO 0x00000800
#ifndef ASM_FILE
#include <pupa/types.h>
#include <grub/types.h>
struct pupa_multiboot_header
struct grub_multiboot_header
{
/* Must be PUPA_MB_MAGIC - see above. */
pupa_uint32_t magic;
/* Must be GRUB_MB_MAGIC - see above. */
grub_uint32_t magic;
/* Feature flags. */
pupa_uint32_t flags;
grub_uint32_t flags;
/* The above fields plus this one must equal 0 mod 2^32. */
pupa_uint32_t checksum;
grub_uint32_t checksum;
/* These are only valid if PUPA_MB_AOUT_KLUDGE is set. */
pupa_uint32_t header_addr;
pupa_uint32_t load_addr;
pupa_uint32_t load_end_addr;
pupa_uint32_t bss_end_addr;
pupa_uint32_t entry_addr;
/* These are only valid if GRUB_MB_AOUT_KLUDGE is set. */
grub_uint32_t header_addr;
grub_uint32_t load_addr;
grub_uint32_t load_end_addr;
grub_uint32_t bss_end_addr;
grub_uint32_t entry_addr;
/* These are only valid if PUPA_MB_VIDEO_MODE is set. */
pupa_uint32_t mode_type;
pupa_uint32_t width;
pupa_uint32_t height;
pupa_uint32_t depth;
/* These are only valid if GRUB_MB_VIDEO_MODE is set. */
grub_uint32_t mode_type;
grub_uint32_t width;
grub_uint32_t height;
grub_uint32_t depth;
};
struct pupa_multiboot_info
struct grub_multiboot_info
{
/* MultiBoot info version number */
pupa_uint32_t flags;
grub_uint32_t flags;
/* Available memory from BIOS */
pupa_uint32_t mem_lower;
pupa_uint32_t mem_upper;
grub_uint32_t mem_lower;
grub_uint32_t mem_upper;
/* "root" partition */
pupa_uint32_t boot_device;
grub_uint32_t boot_device;
/* Kernel command line */
pupa_uint32_t cmdline;
grub_uint32_t cmdline;
/* Boot-Module list */
pupa_uint32_t mods_count;
pupa_uint32_t mods_addr;
grub_uint32_t mods_count;
grub_uint32_t mods_addr;
pupa_uint32_t syms[4];
grub_uint32_t syms[4];
/* Memory Mapping buffer */
pupa_uint32_t mmap_length;
pupa_uint32_t mmap_addr;
grub_uint32_t mmap_length;
grub_uint32_t mmap_addr;
/* Drive Info buffer */
pupa_uint32_t drives_length;
pupa_uint32_t drives_addr;
grub_uint32_t drives_length;
grub_uint32_t drives_addr;
/* ROM configuration table */
pupa_uint32_t config_table;
grub_uint32_t config_table;
/* Boot Loader Name */
pupa_uint32_t boot_loader_name;
grub_uint32_t boot_loader_name;
/* APM table */
pupa_uint32_t apm_table;
grub_uint32_t apm_table;
/* Video */
pupa_uint32_t vbe_control_info;
pupa_uint32_t vbe_mode_info;
pupa_uint16_t vbe_mode;
pupa_uint16_t vbe_interface_seg;
pupa_uint16_t vbe_interface_off;
pupa_uint16_t vbe_interface_len;
grub_uint32_t vbe_control_info;
grub_uint32_t vbe_mode_info;
grub_uint16_t vbe_mode;
grub_uint16_t vbe_interface_seg;
grub_uint16_t vbe_interface_off;
grub_uint16_t vbe_interface_len;
};
struct pupa_mod_list
struct grub_mod_list
{
/* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
pupa_uint32_t mod_start;
pupa_uint32_t mod_end;
grub_uint32_t mod_start;
grub_uint32_t mod_end;
/* Module command line */
pupa_uint32_t cmdline;
grub_uint32_t cmdline;
/* padding to take it to 16 bytes (must be zero) */
pupa_uint32_t pad;
grub_uint32_t pad;
};
#endif /* ! ASM_FILE */
#endif /* ! PUPA_MULTIBOOT_MACHINE_HEADER */
#endif /* ! GRUB_MULTIBOOT_MACHINE_HEADER */

View file

@ -1,8 +1,8 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
*
* PUPA is free software; you can redistribute it and/or modify
* GRUB 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.
@ -13,36 +13,36 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PUPA; if not, write to the Free Software
* along with GRUB; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_PARTITION_HEADER
#define PUPA_PARTITION_HEADER 1
#ifndef GRUB_PARTITION_HEADER
#define GRUB_PARTITION_HEADER 1
#include <pupa/symbol.h>
#include <pupa/types.h>
#include <pupa/err.h>
#include <grub/symbol.h>
#include <grub/types.h>
#include <grub/err.h>
#define PUPA_APPLE_PART_MAGIC 0x504D
#define GRUB_APPLE_PART_MAGIC 0x504D
struct pupa_apple_part
struct grub_apple_part
{
/* The magic number to idenify this as a partition, it should have
the value `0x504D'. */
pupa_uint16_t magic;
grub_uint16_t magic;
/* Reserved. */
pupa_uint16_t reserved;
grub_uint16_t reserved;
/* The size of the partition map in blocks. */
pupa_uint32_t partmap_size;
grub_uint32_t partmap_size;
/* The first physical block of the partition. */
pupa_uint32_t first_phys_block;
grub_uint32_t first_phys_block;
/* The amount of blocks. */
pupa_uint32_t blockcnt;
grub_uint32_t blockcnt;
/* The partition name. */
char partname[32];
@ -51,44 +51,44 @@ struct pupa_apple_part
char parttype[32];
/* The first datablock of the partition. */
pupa_uint32_t datablocks_first;
grub_uint32_t datablocks_first;
/* The amount datablocks. */
pupa_uint32_t datablocks_count;
grub_uint32_t datablocks_count;
/* The status of the partition. (???) */
pupa_uint32_t status;
grub_uint32_t status;
/* The first block on which the bootcode can be found. */
pupa_uint32_t bootcode_pos;
grub_uint32_t bootcode_pos;
/* The size of the bootcode in bytes. */
pupa_uint32_t bootcode_size;
grub_uint32_t bootcode_size;
/* The load address of the bootcode. */
pupa_uint32_t bootcode_loadaddr;
grub_uint32_t bootcode_loadaddr;
/* Reserved. */
pupa_uint32_t reserved2;
grub_uint32_t reserved2;
/* The entrypoint of the bootcode. */
pupa_uint32_t bootcode_entrypoint;
grub_uint32_t bootcode_entrypoint;
/* Reserved. */
pupa_uint32_t reserved3;
grub_uint32_t reserved3;
/* A checksum of the bootcode. */
pupa_uint32_t bootcode_checksum;
grub_uint32_t bootcode_checksum;
/* The processor type. */
char processor[16];
/* Padding. */
pupa_uint16_t pad[187];
grub_uint16_t pad[187];
};
/* Partition description. */
struct pupa_partition
struct grub_partition
{
/* The start sector. */
unsigned long start;
@ -114,27 +114,27 @@ struct pupa_partition
/* The BSD partition type. */
int bsd_type;
};
typedef struct pupa_partition *pupa_partition_t;
typedef struct grub_partition *grub_partition_t;
struct pupa_disk;
struct grub_disk;
pupa_partition_t EXPORT_FUNC(pupa_partition_probe) (struct pupa_disk *disk,
grub_partition_t EXPORT_FUNC(grub_partition_probe) (struct grub_disk *disk,
const char *str);
pupa_err_t EXPORT_FUNC(pupa_partition_iterate) (struct pupa_disk *disk,
int (*hook) (const pupa_partition_t partition));
char *EXPORT_FUNC(pupa_partition_get_name) (const pupa_partition_t partition);
grub_err_t EXPORT_FUNC(grub_partition_iterate) (struct grub_disk *disk,
int (*hook) (const grub_partition_t partition));
char *EXPORT_FUNC(grub_partition_get_name) (const grub_partition_t partition);
static inline unsigned long
pupa_partition_get_start (const pupa_partition_t p)
grub_partition_get_start (const grub_partition_t p)
{
return p->start;
}
static inline unsigned long
pupa_partition_get_len (const pupa_partition_t p)
grub_partition_get_len (const grub_partition_t p)
{
return p->len;
}
#endif /* ! PUPA_PARTITION_HEADER */
#endif /* ! GRUB_PARTITION_HEADER */

View file

@ -1,5 +1,5 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003 Marco Gerards <metgerards@student.han.nl>
*
* This program is free software; you can redistribute it and/or modify
@ -20,14 +20,14 @@
#ifndef KERNEL_TIME_HEADER
#define KERNEL_TIME_HEADER 1
#ifdef PUPA_UTIL
#ifdef GRUB_UTIL
# include <time.h>
# define PUPA_TICKS_PER_SECOND CLOCKS_PER_SEC
# define GRUB_TICKS_PER_SECOND CLOCKS_PER_SEC
#else
# define PUPA_TICKS_PER_SECOND 18
# define GRUB_TICKS_PER_SECOND 18
#endif
/* Return the real time in ticks. */
pupa_uint32_t pupa_get_rtc (void);
grub_uint32_t grub_get_rtc (void);
#endif /* ! KERNEL_TIME_HEADER */

View file

@ -1,9 +1,9 @@
/* biosdisk.h - emulate biosdisk */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* PUPA is free software; you can redistribute it and/or modify
* GRUB 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.
@ -14,15 +14,15 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PUPA; if not, write to the Free Software
* along with GRUB; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_BIOSDISK_MACHINE_UTIL_HEADER
#define PUPA_BIOSDISK_MACHINE_UTIL_HEADER 1
#ifndef GRUB_BIOSDISK_MACHINE_UTIL_HEADER
#define GRUB_BIOSDISK_MACHINE_UTIL_HEADER 1
void pupa_util_biosdisk_init (const char *dev_map);
void pupa_util_biosdisk_fini (void);
char *pupa_util_biosdisk_get_pupa_dev (const char *os_dev);
void grub_util_biosdisk_init (const char *dev_map);
void grub_util_biosdisk_fini (void);
char *grub_util_biosdisk_get_grub_dev (const char *os_dev);
#endif /* ! PUPA_BIOSDISK_MACHINE_UTIL_HEADER */
#endif /* ! GRUB_BIOSDISK_MACHINE_UTIL_HEADER */

View file

@ -1,5 +1,5 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@ -17,9 +17,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_SETJMP_CPU_HEADER
#define PUPA_SETJMP_CPU_HEADER 1
#ifndef GRUB_SETJMP_CPU_HEADER
#define GRUB_SETJMP_CPU_HEADER 1
typedef unsigned long pupa_jmp_buf[6];
typedef unsigned long grub_jmp_buf[6];
#endif /* ! PUPA_SETJMP_CPU_HEADER */
#endif /* ! GRUB_SETJMP_CPU_HEADER */

View file

@ -1,8 +1,8 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* PUPA is free software; you can redistribute it and/or modify
* GRUB 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.
@ -13,20 +13,20 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PUPA; if not, write to the Free Software
* along with GRUB; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PUPA_TYPES_CPU_HEADER
#define PUPA_TYPES_CPU_HEADER 1
#ifndef GRUB_TYPES_CPU_HEADER
#define GRUB_TYPES_CPU_HEADER 1
/* The size of void *. */
#define PUPA_HOST_SIZEOF_VOID_P 4
#define GRUB_HOST_SIZEOF_VOID_P 4
/* The size of long. */
#define PUPA_HOST_SIZEOF_LONG 4
#define GRUB_HOST_SIZEOF_LONG 4
/* powerpc is little-endian. */
#undef PUPA_HOST_WORDS_LITTLEENDIAN
#undef GRUB_HOST_WORDS_LITTLEENDIAN
#endif /* ! PUPA_TYPES_CPU_HEADER */
#endif /* ! GRUB_TYPES_CPU_HEADER */