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,6 +1,6 @@
/* -*-Asm-*- */
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@ -18,8 +18,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <pupa/boot.h>
#include <pupa/machine/boot.h>
#include <grub/boot.h>
#include <grub/machine/boot.h>
/*
* defines for the code go here
@ -83,25 +83,25 @@ cylinder_start:
.word 0
/* more space... */
. = _start + PUPA_BOOT_MACHINE_BPB_END
. = _start + GRUB_BOOT_MACHINE_BPB_END
/*
* End of BIOS parameter block.
*/
boot_version:
.byte PUPA_BOOT_VERSION_MAJOR, PUPA_BOOT_VERSION_MINOR
.byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
boot_drive:
.byte 0xff /* the disk to load kernel from */
/* 0xff means use the boot drive */
force_lba:
.byte 0
kernel_address:
.word PUPA_BOOT_MACHINE_KERNEL_ADDR
.word GRUB_BOOT_MACHINE_KERNEL_ADDR
kernel_sector:
.long 1
kernel_segment:
.word PUPA_BOOT_MACHINE_KERNEL_SEG
.word GRUB_BOOT_MACHINE_KERNEL_SEG
after_BPB:
@ -122,7 +122,7 @@ real_start:
movw %ax, %ss
/* set up the REAL stack */
movw $PUPA_BOOT_MACHINE_STACK_SEG, %sp
movw $GRUB_BOOT_MACHINE_STACK_SEG, %sp
sti /* we're safe again */
@ -141,7 +141,7 @@ real_start:
MSG(notification_string)
/* do not probe LBA if the drive is a floppy */
testb $PUPA_BOOT_MACHINE_BIOS_HD_FLAG, %dl
testb $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
jz chs_mode
/* check if LBA is supported */
@ -190,7 +190,7 @@ lba_mode:
movl %ebx, 8(%si)
/* the segment of buffer address */
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, 6(%si)
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
xorl %eax, %eax
movw %ax, 4(%si)
@ -211,7 +211,7 @@ lba_mode:
/* LBA read is not supported, so fallback to CHS. */
jc chs_mode
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, %bx
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
jmp copy_buffer
chs_mode:
@ -226,7 +226,7 @@ chs_mode:
/*
* The call failed, so maybe use the floppy probe instead.
*/
testb $PUPA_BOOT_MACHINE_BIOS_HD_FLAG, %dl
testb $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
jz floppy_probe
/* Nope, we definitely have a hard disk, and we're screwed. */
@ -322,7 +322,7 @@ setup_sectors:
* %al = 0x0 on success; err code on failure
*/
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, %bx
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
movw %bx, %es /* load %es segment with disk buffer */
xorw %bx, %bx /* %bx = 0, put it at 0 in the segment */
@ -387,7 +387,7 @@ general_error:
/* go here when you need to stop the machine hard after an error condition */
stop: jmp stop
notification_string: .string "PUPA "
notification_string: .string "GRUB "
geometry_error_string: .string "Geom"
hd_probe_error_string: .string "Hard Disk"
read_error_string: .string "Read"
@ -419,7 +419,7 @@ message:
* number here.
*/
. = _start + PUPA_BOOT_MACHINE_WINDOWS_NT_MAGIC
. = _start + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
nt_magic:
.long 0
.word 0
@ -431,7 +431,7 @@ nt_magic:
*/
part_start:
. = _start + PUPA_BOOT_MACHINE_PART_START
. = _start + GRUB_BOOT_MACHINE_PART_START
probe_values:
.byte 36, 18, 15, 9, 0
@ -465,7 +465,7 @@ fd_probe_error_string: .string "Floppy"
1:
/* perform read */
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, %bx
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
movw $0x201, %ax
movb $0, %ch
movb $0, %dh
@ -480,7 +480,7 @@ fd_probe_error_string: .string "Floppy"
jmp final_init
. = _start + PUPA_BOOT_MACHINE_PART_END
. = _start + GRUB_BOOT_MACHINE_PART_END
/* the last 2 bytes in the sector 0 contain the signature */
.word PUPA_BOOT_MACHINE_SIGNATURE
.word GRUB_BOOT_MACHINE_SIGNATURE

View file

@ -1,5 +1,5 @@
/*
* PUPA -- Preliminary Universal Programming Architecture for GRUB
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <pupa/machine/boot.h>
#include <grub/machine/boot.h>
/*
* defines for the code go here
@ -26,7 +26,7 @@
/* Absolute addresses
This makes the assembler generate the address without support
from the linker. (ELF can't relocate 16-bit addresses!) */
#define ABS(x) (x-_start+PUPA_BOOT_MACHINE_KERNEL_ADDR)
#define ABS(x) (x-_start+GRUB_BOOT_MACHINE_KERNEL_ADDR)
/* Print message string */
#define MSG(x) movw $ABS(x), %si; call message
@ -62,7 +62,7 @@ _start:
popw %si
/* this sets up for the first run through "bootloop" */
movw $ABS(firstlist - PUPA_BOOT_MACHINE_LIST_SIZE), %di
movw $ABS(firstlist - GRUB_BOOT_MACHINE_LIST_SIZE), %di
/* save the sector number of the second sector in %ebp */
movl (%di), %ebp
@ -119,7 +119,7 @@ lba_mode:
movl %ebx, 8(%si)
/* the segment of buffer address */
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, 6(%si)
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
/* save %ax from destruction! */
pushw %ax
@ -148,7 +148,7 @@ lba_mode:
jc read_error
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, %bx
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
jmp copy_buffer
chs_mode:
@ -237,7 +237,7 @@ chs_mode:
* %al = 0x0 on success; err code on failure
*/
movw $PUPA_BOOT_MACHINE_BUFFER_SEG, %bx
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
movw %bx, %es /* load %es segment with disk buffer */
xorw %bx, %bx /* %bx = 0, put it at 0 in the segment */
@ -292,7 +292,7 @@ copy_buffer:
jne setup_sectors
/* update position to load from */
subw $PUPA_BOOT_MACHINE_LIST_SIZE, %di
subw $GRUB_BOOT_MACHINE_LIST_SIZE, %di
/* jump to bootloop */
jmp bootloop
@ -303,7 +303,7 @@ bootit:
/* print a newline */
MSG(notification_done)
popw %dx /* this makes sure %dl is our "boot" drive */
ljmp $0, $(PUPA_BOOT_MACHINE_KERNEL_ADDR + 0x200)
ljmp $0, $(GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
/*
@ -368,7 +368,7 @@ lastlist:
.word 0
.word 0
. = _start + 0x200 - PUPA_BOOT_MACHINE_LIST_SIZE
. = _start + 0x200 - GRUB_BOOT_MACHINE_LIST_SIZE
/* fill the first data listing with the default */
blocklist_default_start:
@ -381,6 +381,6 @@ blocklist_default_len:
.word 0
blocklist_default_seg:
/* this is the segment of the starting address to load the data into */
.word (PUPA_BOOT_MACHINE_KERNEL_SEG + 0x20)
.word (GRUB_BOOT_MACHINE_KERNEL_SEG + 0x20)
firstlist: /* this label has to be after the list data!!! */

View file

@ -1,6 +1,6 @@
/* cmain.c - Startup code for the PowerPC. */
/*
* 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
@ -21,8 +21,8 @@
#include <alloca.h>
#include <stdint.h>
#include "pupa/machine/ieee1275.h"
#include "pupa/kernel.h"
#include "grub/machine/ieee1275.h"
#include "grub/kernel.h"
struct module_info
{
@ -33,7 +33,7 @@ struct module_info
#define roundup(a, s) (((a) + ((s) - 1)) & ~((s) - 1))
/* OpenFirmware entry point passed to us from the real bootloader. */
intptr_t (*pupa_ieee1275_entry_fn) (void *);
intptr_t (*grub_ieee1275_entry_fn) (void *);
/* Return a help text for this architecture. */
@ -51,11 +51,11 @@ void
cmain (uint32_t firmware_entry)
{
char **argv, args[256];
pupa_ieee1275_phandle_t chosen;
grub_ieee1275_phandle_t chosen;
int argc = 0, actual;
long batl, batu;
pupa_ieee1275_entry_fn = (intptr_t (*)(void *)) firmware_entry;
grub_ieee1275_entry_fn = (intptr_t (*)(void *)) firmware_entry;
/* Initialize BAT registers to unmapped to not generate overlapping
mappings below. */
@ -83,8 +83,8 @@ cmain (uint32_t firmware_entry)
be null (just the nul-character), so check that the size
is actually greater than one. */
pupa_ieee1275_finddevice ("/chosen", &chosen);
if (pupa_ieee1275_get_property (chosen, "bootargs", args,
grub_ieee1275_finddevice ("/chosen", &chosen);
if (grub_ieee1275_get_property (chosen, "bootargs", args,
sizeof args, &actual) == 0
&& actual > 1)
{
@ -109,7 +109,7 @@ cmain (uint32_t firmware_entry)
/* The bootargs property does not contain the program
name, just the arguments. */
argv[0] = "pupa";
argv[0] = "grub";
/* Second time around we fill in the argv. */
str = args;
@ -136,13 +136,13 @@ cmain (uint32_t firmware_entry)
else
{
argv = alloca (sizeof (char *) * 2);
argv[0] = "pupa";
argv[0] = "grub";
argv[1] = 0;
argc = 1;
}
/* Now invoke the main function. */
/* XXX: pupa_main does not parse arguments yet. */
pupa_main ();
/* XXX: grub_main does not parse arguments yet. */
grub_main ();
/* Never reached. */
}

View file

@ -1,6 +1,6 @@
/* crt0.S - Startup code for the PowerPC. */
/*
* 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

View file

@ -1,6 +1,6 @@
/* ieee1275.c - 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,16 +18,16 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <pupa/machine/ieee1275.h>
#include <grub/machine/ieee1275.h>
#define IEEE1275_PHANDLE_ROOT ((pupa_ieee1275_phandle_t) 0)
#define IEEE1275_PHANDLE_INVALID ((pupa_ieee1275_phandle_t) -1)
#define IEEE1275_PHANDLE_ROOT ((grub_ieee1275_phandle_t) 0)
#define IEEE1275_PHANDLE_INVALID ((grub_ieee1275_phandle_t) -1)
intptr_t (*pupa_ieee1275_entry_fn) (void *);
intptr_t (*grub_ieee1275_entry_fn) (void *);
#ifndef IEEE1275_CALL_ENTRY_FN
#define IEEE1275_CALL_ENTRY_FN(args) (*pupa_ieee1275_entry_fn) (args)
#define IEEE1275_CALL_ENTRY_FN(args) (*grub_ieee1275_entry_fn) (args)
#endif
/* All backcalls to the firmware is done by calling an entry function
@ -35,7 +35,7 @@ intptr_t (*pupa_ieee1275_entry_fn) (void *);
a structure is passed which specifies what the firmware should do.
NAME is the requested service. NR_INS and NR_OUTS is the number of
passed arguments and the expected number of return values, resp. */
struct pupa_ieee1275_common_hdr
struct grub_ieee1275_common_hdr
{
char *name;
int nr_ins;
@ -46,10 +46,10 @@ struct pupa_ieee1275_common_hdr
(p)->name = xname; (p)->nr_ins = xins; (p)->nr_outs = xouts
/* FIXME is this function needed? */
pupa_uint32_t
pupa_ieee1275_decode_int_4 (unsigned char *p)
grub_uint32_t
grub_ieee1275_decode_int_4 (unsigned char *p)
{
pupa_uint32_t val = (*p++ << 8);
grub_uint32_t val = (*p++ << 8);
val = (val + *p++) << 8;
val = (val + *p++) << 8;
return (val + *p);
@ -57,12 +57,12 @@ pupa_ieee1275_decode_int_4 (unsigned char *p)
int
pupa_ieee1275_finddevice (char *name, pupa_ieee1275_phandle_t *phandlep)
grub_ieee1275_finddevice (char *name, grub_ieee1275_phandle_t *phandlep)
{
struct find_device_args {
struct pupa_ieee1275_common_hdr common;
struct grub_ieee1275_common_hdr common;
char *device;
pupa_ieee1275_phandle_t phandle;
grub_ieee1275_phandle_t phandle;
} args;
INIT_IEEE1275_COMMON (&args.common, "finddevice", 1, 1);
@ -75,12 +75,12 @@ pupa_ieee1275_finddevice (char *name, pupa_ieee1275_phandle_t *phandlep)
}
int
pupa_ieee1275_get_property (int handle, const char *property, void *buf,
pupa_size_t size, pupa_size_t *actual)
grub_ieee1275_get_property (int handle, const char *property, void *buf,
grub_size_t size, grub_size_t *actual)
{
struct get_property_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t phandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t phandle;
const char *prop;
void *buf;
int buflen;
@ -101,12 +101,12 @@ pupa_ieee1275_get_property (int handle, const char *property, void *buf,
}
int
pupa_ieee1275_next_property (int handle, char *prev_prop, char *prop,
grub_ieee1275_next_property (int handle, char *prev_prop, char *prop,
int *flags)
{
struct get_property_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t phandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t phandle;
char *prev_prop;
char *next_prop;
int flags;
@ -126,14 +126,14 @@ pupa_ieee1275_next_property (int handle, char *prev_prop, char *prop,
}
int
pupa_ieee1275_get_property_length (pupa_ieee1275_phandle_t handle,
const char *prop, pupa_size_t *length)
grub_ieee1275_get_property_length (grub_ieee1275_phandle_t handle,
const char *prop, grub_size_t *length)
{
struct get_property_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t phandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t phandle;
const char *prop;
pupa_size_t length;
grub_size_t length;
} args;
INIT_IEEE1275_COMMON (&args.common, "getproplen", 2, 1);
@ -148,13 +148,13 @@ pupa_ieee1275_get_property_length (pupa_ieee1275_phandle_t handle,
}
int
pupa_ieee1275_instance_to_package (pupa_ieee1275_ihandle_t ihandle,
pupa_ieee1275_phandle_t *phandlep)
grub_ieee1275_instance_to_package (grub_ieee1275_ihandle_t ihandle,
grub_ieee1275_phandle_t *phandlep)
{
struct instance_to_package_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_ihandle_t ihandle;
pupa_ieee1275_phandle_t phandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_ihandle_t ihandle;
grub_ieee1275_phandle_t phandle;
} args;
INIT_IEEE1275_COMMON (&args.common, "instance-to-package", 1, 1);
@ -167,12 +167,12 @@ pupa_ieee1275_instance_to_package (pupa_ieee1275_ihandle_t ihandle,
}
int
pupa_ieee1275_package_to_path (pupa_ieee1275_phandle_t phandle,
char *path, pupa_size_t len, pupa_size_t *actual)
grub_ieee1275_package_to_path (grub_ieee1275_phandle_t phandle,
char *path, grub_size_t len, grub_size_t *actual)
{
struct instance_to_package_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t phandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t phandle;
char *buf;
int buflen;
int actual;
@ -191,13 +191,13 @@ pupa_ieee1275_package_to_path (pupa_ieee1275_phandle_t phandle,
}
int
pupa_ieee1275_instance_to_path (pupa_ieee1275_ihandle_t ihandle,
char *path, pupa_size_t len,
pupa_size_t *actual)
grub_ieee1275_instance_to_path (grub_ieee1275_ihandle_t ihandle,
char *path, grub_size_t len,
grub_size_t *actual)
{
struct instance_to_package_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_ihandle_t ihandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_ihandle_t ihandle;
char *buf;
int buflen;
int actual;
@ -216,15 +216,15 @@ pupa_ieee1275_instance_to_path (pupa_ieee1275_ihandle_t ihandle,
}
int
pupa_ieee1275_write (pupa_ieee1275_ihandle_t ihandle, void *buffer,
pupa_size_t len, pupa_size_t *actualp)
grub_ieee1275_write (grub_ieee1275_ihandle_t ihandle, void *buffer,
grub_size_t len, grub_size_t *actualp)
{
struct write_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_ihandle_t ihandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_ihandle_t ihandle;
void *buf;
pupa_size_t len;
pupa_size_t actual;
grub_size_t len;
grub_size_t actual;
} args;
INIT_IEEE1275_COMMON (&args.common, "write", 3, 1);
@ -240,15 +240,15 @@ pupa_ieee1275_write (pupa_ieee1275_ihandle_t ihandle, void *buffer,
}
int
pupa_ieee1275_read (pupa_ieee1275_ihandle_t ihandle, void *buffer,
pupa_size_t len, pupa_size_t *actualp)
grub_ieee1275_read (grub_ieee1275_ihandle_t ihandle, void *buffer,
grub_size_t len, grub_size_t *actualp)
{
struct write_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_ihandle_t ihandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_ihandle_t ihandle;
void *buf;
pupa_size_t len;
pupa_size_t actual;
grub_size_t len;
grub_size_t actual;
} args;
INIT_IEEE1275_COMMON (&args.common, "read", 3, 1);
@ -264,12 +264,12 @@ pupa_ieee1275_read (pupa_ieee1275_ihandle_t ihandle, void *buffer,
}
int
pupa_ieee1275_seek (pupa_ieee1275_ihandle_t ihandle, int pos_hi,
grub_ieee1275_seek (grub_ieee1275_ihandle_t ihandle, int pos_hi,
int pos_lo, int *result)
{
struct write_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_ihandle_t ihandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_ihandle_t ihandle;
int pos_hi;
int pos_lo;
int result;
@ -289,13 +289,13 @@ pupa_ieee1275_seek (pupa_ieee1275_ihandle_t ihandle, int pos_hi,
}
int
pupa_ieee1275_peer (pupa_ieee1275_phandle_t node,
pupa_ieee1275_phandle_t *result)
grub_ieee1275_peer (grub_ieee1275_phandle_t node,
grub_ieee1275_phandle_t *result)
{
struct peer_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t node;
pupa_ieee1275_phandle_t result;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t node;
grub_ieee1275_phandle_t result;
} args;
INIT_IEEE1275_COMMON (&args.common, "peer", 1, 1);
@ -308,13 +308,13 @@ pupa_ieee1275_peer (pupa_ieee1275_phandle_t node,
}
int
pupa_ieee1275_child (pupa_ieee1275_phandle_t node,
pupa_ieee1275_phandle_t *result)
grub_ieee1275_child (grub_ieee1275_phandle_t node,
grub_ieee1275_phandle_t *result)
{
struct child_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t node;
pupa_ieee1275_phandle_t result;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t node;
grub_ieee1275_phandle_t result;
} args;
INIT_IEEE1275_COMMON (&args.common, "child", 1, 1);
@ -328,13 +328,13 @@ pupa_ieee1275_child (pupa_ieee1275_phandle_t node,
}
int
pupa_ieee1275_parent (pupa_ieee1275_phandle_t node,
pupa_ieee1275_phandle_t *result)
grub_ieee1275_parent (grub_ieee1275_phandle_t node,
grub_ieee1275_phandle_t *result)
{
struct parent_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t node;
pupa_ieee1275_phandle_t result;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t node;
grub_ieee1275_phandle_t result;
} args;
INIT_IEEE1275_COMMON (&args.common, "parent", 1, 1);
@ -348,10 +348,10 @@ pupa_ieee1275_parent (pupa_ieee1275_phandle_t node,
}
int
pupa_ieee1275_exit (void)
grub_ieee1275_exit (void)
{
struct exit_args {
struct pupa_ieee1275_common_hdr common;
struct grub_ieee1275_common_hdr common;
} args;
INIT_IEEE1275_COMMON (&args.common, "exit", 0, 0);
@ -362,12 +362,12 @@ pupa_ieee1275_exit (void)
}
int
pupa_ieee1275_open (char *node, pupa_ieee1275_ihandle_t *result)
grub_ieee1275_open (char *node, grub_ieee1275_ihandle_t *result)
{
struct open_args {
struct pupa_ieee1275_common_hdr common;
struct grub_ieee1275_common_hdr common;
char *cstr;
pupa_ieee1275_ihandle_t result;
grub_ieee1275_ihandle_t result;
} args;
INIT_IEEE1275_COMMON (&args.common, "open", 1, 1);
@ -380,11 +380,11 @@ pupa_ieee1275_open (char *node, pupa_ieee1275_ihandle_t *result)
}
int
pupa_ieee1275_close (pupa_ieee1275_ihandle_t ihandle)
grub_ieee1275_close (grub_ieee1275_ihandle_t ihandle)
{
struct close_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_ihandle_t ihandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_ihandle_t ihandle;
} args;
INIT_IEEE1275_COMMON (&args.common, "close", 1, 0);
@ -397,13 +397,13 @@ pupa_ieee1275_close (pupa_ieee1275_ihandle_t ihandle)
}
int
pupa_ieee1275_claim (void *p, pupa_size_t size,
grub_ieee1275_claim (void *p, grub_size_t size,
unsigned int align, void **result)
{
struct claim_args {
struct pupa_ieee1275_common_hdr common;
struct grub_ieee1275_common_hdr common;
void *p;
pupa_size_t size;
grub_size_t size;
unsigned int align;
void *addr;
} args;
@ -420,17 +420,17 @@ pupa_ieee1275_claim (void *p, pupa_size_t size,
}
int
pupa_ieee1275_set_property (pupa_ieee1275_phandle_t phandle,
grub_ieee1275_set_property (grub_ieee1275_phandle_t phandle,
const char *propname, void *buf,
pupa_size_t size, pupa_size_t *actual)
grub_size_t size, grub_size_t *actual)
{
struct set_property_args {
struct pupa_ieee1275_common_hdr common;
pupa_ieee1275_phandle_t phandle;
struct grub_ieee1275_common_hdr common;
grub_ieee1275_phandle_t phandle;
const char *propname;
void *buf;
pupa_size_t size;
pupa_size_t actual;
grub_size_t size;
grub_size_t actual;
} args;
INIT_IEEE1275_COMMON (&args.common, "setprop", 4, 1);
@ -446,13 +446,13 @@ pupa_ieee1275_set_property (pupa_ieee1275_phandle_t phandle,
}
int
pupa_ieee1275_set_color (pupa_ieee1275_ihandle_t ihandle,
grub_ieee1275_set_color (grub_ieee1275_ihandle_t ihandle,
int index, int r, int g, int b)
{
struct set_color_args {
struct pupa_ieee1275_common_hdr common;
struct grub_ieee1275_common_hdr common;
char *method;
pupa_ieee1275_ihandle_t ihandle;
grub_ieee1275_ihandle_t ihandle;
int index;
int b;
int g;