1 |
/* openfw.c -- Open firmware support funtions. */ |
/* openfw.c -- Open firmware support funtions. */ |
2 |
/* |
/* |
3 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
4 |
* Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. |
5 |
* |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
189 |
{ |
{ |
190 |
if (grub_ieee1275_claim (addr, size, 0, 0)) |
if (grub_ieee1275_claim (addr, size, 0, 0)) |
191 |
return -1; |
return -1; |
192 |
if (grub_map (addr, addr, size, 0x00)) |
|
193 |
|
if ((! grub_ieee1275_realmode) && grub_map (addr, addr, size, 0x00)) |
194 |
{ |
{ |
195 |
|
grub_printf ("map failed: address 0x%x, size 0x%x\n", addr, size); |
196 |
grub_ieee1275_release (addr, size); |
grub_ieee1275_release (addr, size); |
197 |
return -1; |
return -1; |
198 |
} |
} |
199 |
|
|
200 |
return 0; |
return 0; |
201 |
} |
} |