2004-03-29 Marco Gerards <metgerards@student.han.nl>

Add support for the newworld apple macintosh (PPC).  This has been
	tested on the powerbook 2000 only.  It only adds support for
	generic ieee1275 functions, console and disk support.  This should
	be easy to port to other architectures with support for Open
	Firmware.

	* configure.ac: Accept the powerpc as host_cpu.  In the case of
	the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
	specific tests are only executed while building for the i386.
	Inverse test for crosscompile.
	* genmk.rb (Utility): Allow assembler files.
	* normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
	* conf/powerpc-ieee1275.rmk: New file.
	* disk/powerpc/ieee1275/ofdisk.c: Likewise.
	* disk/powerpc/ieee1275/partition.c: Likewise.
	* include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
	* include/pupa/powerpc/ieee1275/console.h: Likewise.
	* include/pupa/powerpc/ieee1275/partition.h: Likewise.
	* include/pupa/powerpc/ieee1275/time.h: Likewise.
	* include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
	* include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
	* include/pupa/powerpc/ieee1275/loader.h
	* include/pupa/powerpc/setjmp.h: Likewise.
	* include/pupa/powerpc/types.h: Likewise.
	* kern/powerpc/ieee1275/init.c: Likewise.
	* kern/powerpc/ieee1275/openfw.c: Likewise.
	* term/powerpc/ieee1275/ofconsole.c: Likewise.

	These files were written by Johan Rydberg
	(jrydberg@night.trouble.net) and I only modified them slightly.

	* boot/powerpc/ieee1275/cmain.c: New file.
	* boot/powerpc/ieee1275/crt0.S: Likewise.
	* boot/powerpc/ieee1275/ieee1275.c: Likewise.
	* include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
This commit is contained in:
marco_g 2004-03-28 21:52:02 +00:00
parent 8c8cc20511
commit e56cdf2111
25 changed files with 2768 additions and 22 deletions

View file

@ -0,0 +1,47 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* PUPA 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 PUPA; 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
#define PUPA_BIOSDISK_FLAG_LBA 1
struct pupa_biosdisk_data
{
int drive;
unsigned long cylinders;
unsigned long heads;
unsigned long sectors;
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 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,
unsigned long *cylinders,
unsigned long *heads,
unsigned long *sectors);
int pupa_biosdisk_get_num_floppies (void);
void pupa_biosdisk_init (void);
#endif /* ! PUPA_BIOSDISK_MACHINE_HEADER */

View file

@ -0,0 +1,56 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* 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_CONSOLE_MACHINE_HEADER
#define PUPA_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
#ifndef ASM_FILE
#include <pupa/types.h>
#include <pupa/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);
/* Initialize the console system. */
void pupa_console_init (void);
#endif
#endif /* ! PUPA_CONSOLE_MACHINE_HEADER */

View file

@ -0,0 +1,99 @@
/* ieee1275.h - Access the Open Firmware client interface. */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
*
* 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_IEEE1275_MACHINE_HEADER
#define PUPA_IEEE1275_MACHINE_HEADER 1
#include <stdint.h>
#include <pupa/err.h>
#include <pupa/types.h>
/* Maps a device alias to a pathname. */
struct pupa_ieee1275_devalias
{
char *name;
char *path;
char *type;
};
struct pupa_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;
extern intptr_t (*pupa_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,
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 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,
void **result);
int EXPORT_FUNC(pupa_ieee1275_set_property) (pupa_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,
int index, int r, int g, int b);
pupa_err_t EXPORT_FUNC(pupa_devalias_iterate)
(int (*hook) (struct pupa_ieee1275_devalias *alias));
#endif /* ! PUPA_IEEE1275_MACHINE_HEADER */

View file

@ -0,0 +1,51 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
* Copyright (C) 2003 Jeroen Dekkers <jeroen@dekkers.cx>
*
* 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_LOADER_MACHINE_HEADER
#define PUPA_LOADER_MACHINE_HEADER 1
#include <pupa/types.h>
#include <pupa/symbol.h>
#include <pupa/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);
void EXPORT_FUNC(pupa_linux_boot_zimage) (void) __attribute__ ((noreturn));
void EXPORT_FUNC(pupa_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));
/* The asm part of the multiboot loader. */
void EXPORT_FUNC(pupa_multiboot_real_boot) (pupa_addr_t entry,
struct pupa_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[]);
#endif /* ! PUPA_LOADER_MACHINE_HEADER */

View file

@ -0,0 +1,184 @@
/* multiboot.h - multiboot header file. */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
*
* 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_MULTIBOOT_MACHINE_HEADER
#define PUPA_MULTIBOOT_MACHINE_HEADER 1
/* How many bytes from the start of the file we search for the header. */
#define PUPA_MB_SEARCH 8192
/* The magic field should contain this. */
#define PUPA_MB_MAGIC 0x1BADB002
/* This should be in %eax. */
#define PUPA_MB_MAGIC2 0x2BADB002
/* The bits in the required part of flags field we don't support. */
#define PUPA_MB_UNSUPPORTED 0x0000fffc
/* Alignment of multiboot modules. */
#define PUPA_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
/* Must pass memory information to OS. */
#define PUPA_MB_MEMORY_INFO 0x00000002
/* Must pass video information to OS. */
#define PUPA_MB_VIDEO_MODE 0x00000004
/* This flag indicates the use of the address fields in the header. */
#define PUPA_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
/* is there a boot device set? */
#define PUPA_MB_INFO_BOOTDEV 0x00000002
/* is the command-line defined? */
#define PUPA_MB_INFO_CMDLINE 0x00000004
/* are there modules to do something with? */
#define PUPA_MB_INFO_MODS 0x00000008
/* These next two are mutually exclusive */
/* is there a symbol table loaded? */
#define PUPA_MB_INFO_AOUT_SYMS 0x00000010
/* is there an ELF section header table? */
#define PUPA_MB_INFO_ELF_SHDR 0x00000020
/* is there a full memory map? */
#define PUPA_MB_INFO_MEM_MAP 0x00000040
/* Is there drive info? */
#define PUPA_MB_INFO_DRIVE_INFO 0x00000080
/* Is there a config table? */
#define PUPA_MB_INFO_CONFIG_TABLE 0x00000100
/* Is there a boot loader name? */
#define PUPA_MB_INFO_BOOT_LOADER_NAME 0x00000200
/* Is there a APM table? */
#define PUPA_MB_INFO_APM_TABLE 0x00000400
/* Is there video information? */
#define PUPA_MB_INFO_VIDEO_INFO 0x00000800
#ifndef ASM_FILE
#include <pupa/types.h>
struct pupa_multiboot_header
{
/* Must be PUPA_MB_MAGIC - see above. */
pupa_uint32_t magic;
/* Feature flags. */
pupa_uint32_t flags;
/* The above fields plus this one must equal 0 mod 2^32. */
pupa_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 PUPA_MB_VIDEO_MODE is set. */
pupa_uint32_t mode_type;
pupa_uint32_t width;
pupa_uint32_t height;
pupa_uint32_t depth;
};
struct pupa_multiboot_info
{
/* MultiBoot info version number */
pupa_uint32_t flags;
/* Available memory from BIOS */
pupa_uint32_t mem_lower;
pupa_uint32_t mem_upper;
/* "root" partition */
pupa_uint32_t boot_device;
/* Kernel command line */
pupa_uint32_t cmdline;
/* Boot-Module list */
pupa_uint32_t mods_count;
pupa_uint32_t mods_addr;
pupa_uint32_t syms[4];
/* Memory Mapping buffer */
pupa_uint32_t mmap_length;
pupa_uint32_t mmap_addr;
/* Drive Info buffer */
pupa_uint32_t drives_length;
pupa_uint32_t drives_addr;
/* ROM configuration table */
pupa_uint32_t config_table;
/* Boot Loader Name */
pupa_uint32_t boot_loader_name;
/* APM table */
pupa_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;
};
struct pupa_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;
/* Module command line */
pupa_uint32_t cmdline;
/* padding to take it to 16 bytes (must be zero) */
pupa_uint32_t pad;
};
#endif /* ! ASM_FILE */
#endif /* ! PUPA_MULTIBOOT_MACHINE_HEADER */

View file

@ -0,0 +1,140 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
*
* PUPA 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 PUPA; 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
#include <pupa/symbol.h>
#include <pupa/types.h>
#include <pupa/err.h>
#define PUPA_APPLE_PART_MAGIC 0x504D
struct pupa_apple_part
{
/* The magic number to idenify this as a partition, it should have
the value `0x504D'. */
pupa_uint16_t magic;
/* Reserved. */
pupa_uint16_t reserved;
/* The size of the partition map in blocks. */
pupa_uint32_t partmap_size;
/* The first physical block of the partition. */
pupa_uint32_t first_phys_block;
/* The amount of blocks. */
pupa_uint32_t blockcnt;
/* The partition name. */
char partname[32];
/* The partition type. */
char parttype[32];
/* The first datablock of the partition. */
pupa_uint32_t datablocks_first;
/* The amount datablocks. */
pupa_uint32_t datablocks_count;
/* The status of the partition. (???) */
pupa_uint32_t status;
/* The first block on which the bootcode can be found. */
pupa_uint32_t bootcode_pos;
/* The size of the bootcode in bytes. */
pupa_uint32_t bootcode_size;
/* The load address of the bootcode. */
pupa_uint32_t bootcode_loadaddr;
/* Reserved. */
pupa_uint32_t reserved2;
/* The entrypoint of the bootcode. */
pupa_uint32_t bootcode_entrypoint;
/* Reserved. */
pupa_uint32_t reserved3;
/* A checksum of the bootcode. */
pupa_uint32_t bootcode_checksum;
/* The processor type. */
char processor[16];
/* Padding. */
pupa_uint16_t pad[187];
};
/* Partition description. */
struct pupa_partition
{
/* The start sector. */
unsigned long start;
/* The length in sector units. */
unsigned long len;
/* The offset of the partition table. */
unsigned long offset;
/* The index of this partition in the partition table. */
int index;
/* The DOS partition number. */
int dos_part;
/* The BSD partition number (a == 0). */
int bsd_part;
/* The DOS partition type. */
int dos_type;
/* The BSD partition type. */
int bsd_type;
};
typedef struct pupa_partition *pupa_partition_t;
struct pupa_disk;
pupa_partition_t EXPORT_FUNC(pupa_partition_probe) (struct pupa_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);
static inline unsigned long
pupa_partition_get_start (const pupa_partition_t p)
{
return p->start;
}
static inline unsigned long
pupa_partition_get_len (const pupa_partition_t p)
{
return p->len;
}
#endif /* ! PUPA_PARTITION_HEADER */

View file

@ -0,0 +1,33 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2003 Marco Gerards <metgerards@student.han.nl>
*
* 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 KERNEL_TIME_HEADER
#define KERNEL_TIME_HEADER 1
#ifdef PUPA_UTIL
# include <time.h>
# define PUPA_TICKS_PER_SECOND CLOCKS_PER_SEC
#else
# define PUPA_TICKS_PER_SECOND 18
#endif
/* Return the real time in ticks. */
pupa_uint32_t pupa_get_rtc (void);
#endif /* ! KERNEL_TIME_HEADER */

View file

@ -0,0 +1,28 @@
/* biosdisk.h - emulate biosdisk */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* PUPA 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 PUPA; 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
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);
#endif /* ! PUPA_BIOSDISK_MACHINE_UTIL_HEADER */

View file

@ -0,0 +1,25 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* 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_SETJMP_CPU_HEADER
#define PUPA_SETJMP_CPU_HEADER 1
typedef unsigned long pupa_jmp_buf[6];
#endif /* ! PUPA_SETJMP_CPU_HEADER */

View file

@ -0,0 +1,32 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
*
* PUPA 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 PUPA; 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
/* The size of void *. */
#define PUPA_HOST_SIZEOF_VOID_P 4
/* The size of long. */
#define PUPA_HOST_SIZEOF_LONG 4
/* powerpc is little-endian. */
#undef PUPA_HOST_WORDS_LITTLEENDIAN
#endif /* ! PUPA_TYPES_CPU_HEADER */