2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
* boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h. (roundup): Remove macro. (grub_ieee1275_flags): Make static. (grub_ieee1275_realmode): Remove. (grub_ieee1275_test_flag): New function. (grub_ieee1275_set_flag): Likewise. (find_options): Rename to `grub_ieee1275_find_options'; update callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS. (cmain): New prototype. (cmain): Use `grub_ieee1275_set_flag' instead of accessing `grub_ieee1275_flags' directly. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove machine/biosdisk.h. * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h. Don't include grub/machine/init.h. (grub_ofdisk_open): Call `grub_ieee1275_test_flag'. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags): Remove prototype. (grub_ieee1275_realmode): Likewise. (grub_ieee1275_flag): New enum. (grub_ieee1275_test_flag): New prototype. (grub_ieee1275_set_flag): New prototype. * include/grub/powerpc/ieee1275/init.h: Remove file. * include/grub/powerpc/ieee1275/ofdisk.h: New file. * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h. Include grub/machine/console.h. Include grub/machine/ofdisk.h. (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove comment. * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call `grub_ieee1275_test_flag'. (grub_ieee1275_encode_devname): Likewise.
This commit is contained in:
parent
ed16607e13
commit
f4c5e67ca4
9 changed files with 105 additions and 36 deletions
|
@ -65,11 +65,24 @@ typedef intptr_t grub_ieee1275_ihandle_t;
|
|||
typedef intptr_t grub_ieee1275_phandle_t;
|
||||
|
||||
extern intptr_t (*grub_ieee1275_entry_fn) (void *);
|
||||
extern grub_uint32_t grub_ieee1275_flags;
|
||||
extern int grub_ieee1275_realmode;
|
||||
|
||||
/* Old World firmware fails seek when "dev:0" is opened. */
|
||||
#define GRUB_IEEE1275_NO_PARTITION_0 0x1
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2005 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
|
||||
|
@ -17,11 +17,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_INIT_MACHINE_HEADER
|
||||
#define GRUB_INIT_MACHINE_HEADER 1
|
||||
#ifndef GRUB_OFDISK_MACHINE_HEADER
|
||||
#define GRUB_OFDISK_MACHINE_HEADER 1
|
||||
|
||||
void cmain (uint32_t r3, uint32_t r4, uint32_t r5);
|
||||
void grub_ofdisk_init (void);
|
||||
void grub_console_init (void);
|
||||
extern void grub_ofdisk_init (void);
|
||||
extern void grub_ofdisk_fini (void);
|
||||
|
||||
#endif /* ! GRUB_INIT_MACHINE_HEADER */
|
Loading…
Add table
Add a link
Reference in a new issue