diff -rupN powerpc/ieee1275/ieee1275.h sparc64/ieee1275/ieee1275.h --- powerpc/ieee1275/ieee1275.h 2005-07-09 01:52:26.000000000 +0200 +++ sparc64/ieee1275/ieee1275.h 2005-07-12 20:16:23.000000000 +0200 @@ -50,13 +50,15 @@ struct grub_ieee1275_mem_region passed arguments and the expected number of return values, resp. */ struct grub_ieee1275_common_hdr { - char *name; - int nr_ins; - int nr_outs; + grub_intn_t name; + grub_intn_t nr_ins; + grub_intn_t nr_outs; }; #define INIT_IEEE1275_COMMON(p, xname, xins, xouts) \ - (p)->name = xname; (p)->nr_ins = xins; (p)->nr_outs = xouts + (p)->name = (grub_intn_t)xname; \ + (p)->nr_ins = (grub_intn_t)xins; \ + (p)->nr_outs = (grub_intn_t)xouts /* FIXME jrydberg: is this correct cell types? */ typedef intptr_t grub_ieee1275_ihandle_t; @@ -67,24 +69,6 @@ extern grub_ieee1275_phandle_t EXPORT_VA extern intptr_t (*grub_ieee1275_entry_fn) (void *); extern intptr_t (* EXPORT_VAR(grub_ieee1275_entry_fn)) (void *); -enum grub_ieee1275_flag -{ - /* Old World firmware fails seek when "dev:0" is opened. */ - GRUB_IEEE1275_FLAG_NO_PARTITION_0, - - /* Apple firmware runs in translated mode and requires use of the "map" - method. Other firmware runs in untranslated mode and doesn't like "map" - calls. */ - GRUB_IEEE1275_FLAG_REAL_MODE, - - /* CHRP specifies partitions are numbered from 1 (partition 0 refers to the - whole disk). However, CodeGen firmware numbers partitions from 0. */ - GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS, -}; - -extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag); -extern void EXPORT_FUNC(grub_ieee1275_set_flag) (enum grub_ieee1275_flag flag); - uint32_t EXPORT_FUNC(grub_ieee1275_decode_int_4) (unsigned char *p); @@ -93,36 +77,39 @@ int EXPORT_FUNC(grub_ieee1275_finddevice int EXPORT_FUNC(grub_ieee1275_get_property) (grub_ieee1275_phandle_t 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); + grub_ssize_t *actual); +int EXPORT_FUNC(grub_ieee1275_next_property) (grub_ieee1275_phandle_t handle, + char *prev_prop, + char *prop, + grub_intn_t *flag); int EXPORT_FUNC(grub_ieee1275_get_property_length) - (grub_ieee1275_phandle_t handle, const char *prop, grub_size_t *length); + (grub_ieee1275_phandle_t handle, const char *prop, grub_ssize_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); + grub_ssize_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); + grub_ssize_t *actualp); int EXPORT_FUNC(grub_ieee1275_read) (grub_ieee1275_ihandle_t ihandle, void *buffer, grub_size_t len, - grub_size_t *actualp); + grub_ssize_t *actualp); int EXPORT_FUNC(grub_ieee1275_seek) (grub_ieee1275_ihandle_t ihandle, - int pos_hi, int pos_lo, int *result); + int pos_hi, int pos_lo, + grub_ssize_t *result); 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_interpret) (const char *command, int *catch); +int EXPORT_FUNC(grub_ieee1275_interpret) (const char *command, grub_intn_t *catch); int EXPORT_FUNC(grub_ieee1275_enter) (void); -int EXPORT_FUNC(grub_ieee1275_exit) (void); +int EXPORT_FUNC(grub_ieee1275_exit) (void) __attribute__ ((noreturn)); int EXPORT_FUNC(grub_ieee1275_open) (char *node, grub_ieee1275_ihandle_t *result); int EXPORT_FUNC(grub_ieee1275_close) (grub_ieee1275_ihandle_t ihandle); @@ -135,7 +122,7 @@ int EXPORT_FUNC(grub_ieee1275_set_proper grub_size_t *actual); int EXPORT_FUNC(grub_ieee1275_set_color) (grub_ieee1275_ihandle_t ihandle, int index, int r, int g, int b); -int EXPORT_FUNC(grub_ieee1275_milliseconds) (grub_uint32_t *msecs); +int EXPORT_FUNC(grub_ieee1275_milliseconds) (grub_uintn_t *msecs); grub_err_t EXPORT_FUNC(grub_devalias_iterate) diff -rupN powerpc/ieee1275/multiboot.h sparc64/ieee1275/multiboot.h --- powerpc/ieee1275/multiboot.h 2004-04-04 15:46:01.000000000 +0200 +++ sparc64/ieee1275/multiboot.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,184 +0,0 @@ -/* multiboot.h - multiboot header file. */ -/* - * GRUB -- GRand Unified Bootloader - * 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 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 GRUB_MB_SEARCH 8192 - -/* The magic field should contain this. */ -#define GRUB_MB_MAGIC 0x1BADB002 - -/* This should be in %eax. */ -#define GRUB_MB_MAGIC2 0x2BADB002 - -/* The bits in the required part of flags field we don't support. */ -#define GRUB_MB_UNSUPPORTED 0x0000fffc - -/* Alignment of multiboot modules. */ -#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 GRUB_MB_PAGE_ALIGN 0x00000001 - -/* Must pass memory information to OS. */ -#define GRUB_MB_MEMORY_INFO 0x00000002 - -/* Must pass video information to OS. */ -#define GRUB_MB_VIDEO_MODE 0x00000004 - -/* This flag indicates the use of the address fields in the header. */ -#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 GRUB_MB_INFO_MEMORY 0x00000001 -/* is there a boot device set? */ -#define GRUB_MB_INFO_BOOTDEV 0x00000002 -/* is the command-line defined? */ -#define GRUB_MB_INFO_CMDLINE 0x00000004 -/* are there modules to do something with? */ -#define GRUB_MB_INFO_MODS 0x00000008 - -/* These next two are mutually exclusive */ - -/* is there a symbol table loaded? */ -#define GRUB_MB_INFO_AOUT_SYMS 0x00000010 -/* is there an ELF section header table? */ -#define GRUB_MB_INFO_ELF_SHDR 0x00000020 - -/* is there a full memory map? */ -#define GRUB_MB_INFO_MEM_MAP 0x00000040 - -/* Is there drive info? */ -#define GRUB_MB_INFO_DRIVE_INFO 0x00000080 - -/* Is there a config table? */ -#define GRUB_MB_INFO_CONFIG_TABLE 0x00000100 - -/* Is there a boot loader name? */ -#define GRUB_MB_INFO_BOOT_LOADER_NAME 0x00000200 - -/* Is there a APM table? */ -#define GRUB_MB_INFO_APM_TABLE 0x00000400 - -/* Is there video information? */ -#define GRUB_MB_INFO_VIDEO_INFO 0x00000800 - -#ifndef ASM_FILE - -#include - -struct grub_multiboot_header -{ - /* Must be GRUB_MB_MAGIC - see above. */ - grub_uint32_t magic; - - /* Feature flags. */ - grub_uint32_t flags; - - /* The above fields plus this one must equal 0 mod 2^32. */ - grub_uint32_t checksum; - - /* 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 GRUB_MB_VIDEO_MODE is set. */ - grub_uint32_t mode_type; - grub_uint32_t width; - grub_uint32_t height; - grub_uint32_t depth; -}; - -struct grub_multiboot_info -{ - /* MultiBoot info version number */ - grub_uint32_t flags; - - /* Available memory from BIOS */ - grub_uint32_t mem_lower; - grub_uint32_t mem_upper; - - /* "root" partition */ - grub_uint32_t boot_device; - - /* Kernel command line */ - grub_uint32_t cmdline; - - /* Boot-Module list */ - grub_uint32_t mods_count; - grub_uint32_t mods_addr; - - grub_uint32_t syms[4]; - - /* Memory Mapping buffer */ - grub_uint32_t mmap_length; - grub_uint32_t mmap_addr; - - /* Drive Info buffer */ - grub_uint32_t drives_length; - grub_uint32_t drives_addr; - - /* ROM configuration table */ - grub_uint32_t config_table; - - /* Boot Loader Name */ - grub_uint32_t boot_loader_name; - - /* APM table */ - grub_uint32_t apm_table; - - /* Video */ - 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 grub_mod_list -{ - /* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */ - grub_uint32_t mod_start; - grub_uint32_t mod_end; - - /* Module command line */ - grub_uint32_t cmdline; - - /* padding to take it to 16 bytes (must be zero) */ - grub_uint32_t pad; -}; - -#endif /* ! ASM_FILE */ - -#endif /* ! GRUB_MULTIBOOT_MACHINE_HEADER */ diff -rupN powerpc/ieee1275/time.h sparc64/ieee1275/time.h --- powerpc/ieee1275/time.h 2005-02-27 22:19:05.000000000 +0100 +++ sparc64/ieee1275/time.h 2005-07-12 19:14:58.000000000 +0200 @@ -25,6 +25,6 @@ #define GRUB_TICKS_PER_SECOND 1000 /* Return the real time in ticks. */ -grub_uint32_t EXPORT_FUNC (grub_get_rtc) (void); +grub_uintn_t EXPORT_FUNC (grub_get_rtc) (void); #endif /* ! KERNEL_TIME_HEADER */ diff -rupN powerpc/libgcc.h sparc64/libgcc.h --- powerpc/libgcc.h 2005-02-13 19:54:57.000000000 +0100 +++ sparc64/libgcc.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,43 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2004 Free Software Foundation, Inc. - * - * 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. - * - * 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 GRUB; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -void EXPORT_FUNC (memset) (void); -void EXPORT_FUNC (__adddf3) (void); -void EXPORT_FUNC (__addsf3) (void); -void EXPORT_FUNC (__ashldi3) (void); -void EXPORT_FUNC (__bss_start) (void); -void EXPORT_FUNC (__extendsfdf2) (void); -void EXPORT_FUNC (__fixunsdfsi) (void); -void EXPORT_FUNC (__floatsidf) (void); -void EXPORT_FUNC (__floatsisf) (void); -void EXPORT_FUNC (__lshrdi3) (void); -void EXPORT_FUNC (__make_dp) (void); -void EXPORT_FUNC (__make_fp) (void); -void EXPORT_FUNC (__muldf3) (void); -void EXPORT_FUNC (__mulsf3) (void); -void EXPORT_FUNC (__pack_d) (void); -void EXPORT_FUNC (__pack_f) (void); -void EXPORT_FUNC (__subdf3) (void); -void EXPORT_FUNC (__subsf3) (void); -void EXPORT_FUNC (__thenan_df) (void); -void EXPORT_FUNC (__thenan_sf) (void); -void EXPORT_FUNC (__trampoline_setup) (void); -void EXPORT_FUNC (__truncdfsf2) (void); -void EXPORT_FUNC (__unpack_d) (void); -void EXPORT_FUNC (__unpack_f) (void); diff -rupN powerpc/types.h sparc64/types.h --- powerpc/types.h 2004-12-27 14:46:20.000000000 +0100 +++ sparc64/types.h 2005-07-12 19:14:58.000000000 +0200 @@ -21,12 +21,12 @@ #define GRUB_TYPES_CPU_HEADER 1 /* The size of void *. */ -#define GRUB_HOST_SIZEOF_VOID_P 4 +#define GRUB_HOST_SIZEOF_VOID_P 8 /* The size of long. */ -#define GRUB_HOST_SIZEOF_LONG 4 +#define GRUB_HOST_SIZEOF_LONG 8 -/* powerpc is big-endian. */ +/* sparc64 is big-endian. */ #define GRUB_HOST_WORDS_BIGENDIAN 1