~ubuntu-branches/ubuntu/wily/grub2/wily

« back to all changes in this revision

Viewing changes to grub-core/kern/i386/pc/init.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-01-11 17:11:44 UTC
  • mto: (17.3.26 experimental)
  • mto: This revision was merged to the branch mainline in revision 60.
  • Revision ID: james.westby@ubuntu.com-20110111171144-o2h6luxzei5fivmf
Tags: upstream-1.99~20110111
ImportĀ upstreamĀ versionĀ 1.99~20110111

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
      }
141
141
}
142
142
 
143
 
/*
144
 
 *
145
 
 * grub_get_conv_memsize(i) :  return the conventional memory size in KB.
146
 
 *      BIOS call "INT 12H" to get conventional memory size
147
 
 *      The return value in AX.
148
 
 */
149
 
static inline grub_uint16_t
150
 
grub_get_conv_memsize (void)
151
 
{
152
 
  struct grub_bios_int_registers regs;
153
 
 
154
 
  regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
155
 
  grub_bios_interrupt (0x12, &regs);
156
 
  return regs.eax & 0xffff;
157
 
}
158
 
 
159
143
void
160
144
grub_machine_init (void)
161
145
{
162
146
  int i;
 
147
#if 0
163
148
  int grub_lower_mem;
 
149
#endif
164
150
 
165
151
  /* Initialize the console as early as possible.  */
166
152
  grub_console_init ();
167
153
 
 
154
  /* This sanity check is useless since top of GRUB_MEMORY_MACHINE_RESERVED_END
 
155
     is used for stack and if it's unavailable we wouldn't have gotten so far.
 
156
   */
 
157
#if 0
168
158
  grub_lower_mem = grub_get_conv_memsize () << 10;
169
159
 
170
160
  /* Sanity check.  */
171
161
  if (grub_lower_mem < GRUB_MEMORY_MACHINE_RESERVED_END)
172
162
    grub_fatal ("too small memory");
 
163
#endif
173
164
 
174
165
/* FIXME: This prevents loader/i386/linux.c from using low memory.  When our
175
166
   heap implements support for requesting a chunk in low memory, this should