/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB 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, see <http://www.gnu.org/licenses/>.
*/
#define min(a,b) ((a) > (b) ? (b) : (a))
extern char _start[];
extern char _end[];
void
{
if (mem_size > 0)
{
/* Don't ask... */
}
else
{
+ 1024 * 1024;
}
grub_cmos_read (0x5b, &b);
grub_cmos_read (0x5c, &c);
grub_cmos_read (0x5d, &d);
| (((grub_uint64_t) c) << 24)
| (((grub_uint64_t) d) << 32);
}
{
if (hook (0x0,
return 1;
return 1;
0x100000 - GRUB_MEMORY_MACHINE_UPPER,
return 1;
/* Everything else is free. */
if (hook (0x100000,
return 1;
/* Protect boot.img, which contains the gdt. It is mapped at the top of memory
(it is also mapped below 0x100000, but we already reserved that area). */
return 1;
return 1;
return 0;
}