~hamo/ubuntu/precise/grub2/grub2.hi_res

« 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
  • mfrom: (1.17.12 upstream)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 100.
  • Revision ID: james.westby@ubuntu.com-20110111171144-c4c3hc0jslqa1bxe
Tags: 1.99~20110111-1
* New Bazaar snapshot.
  - Don't check amount of low memory, as reportedly INT 12h can be broken
    and if low memory is too low we wouldn't have gotten into
    grub_machine_init anyway (closes: #588293, LP: #513528).
  - Submenu default support (LP: #691878).
  - Fix optimisation-dependent grub-mklayout crash (closes: #609584).
* branch_butter.patch: Don't free an uninitialised pointer if /proc is
  unmounted (LP: #697493).
* Add a po/LINGUAS file listing the translations we've synced from the TP
  (closes: #609671).

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