Move common BIOS/coreboot memory map declarations to

include/grub/i386/memory_raw.h and eliminate duplicate declarations.
This commit is contained in:
Vladimir Serbinenko 2013-11-23 12:39:21 +01:00
parent f65e14dc3a
commit 1bba40f578
11 changed files with 74 additions and 89 deletions

View file

@ -18,7 +18,6 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/i386/pc/memory.h>
#include <grub/machine/memory.h>
#include <grub/machine/boot.h>
#include <grub/machine/kernel.h>

View file

@ -17,8 +17,6 @@
*/
#include <grub/symbol.h>
/* For stack parameters. */
#include <grub/i386/pc/memory.h>
#include <grub/machine/memory.h>
#include <grub/cpu/linux.h>
#include <grub/offsets.h>

View file

@ -161,13 +161,13 @@ mmap_iterate_hook (grub_uint64_t addr, grub_uint64_t size,
void *data __attribute__ ((unused)))
{
/* Avoid the lower memory. */
if (addr < 0x100000)
if (addr < GRUB_MEMORY_MACHINE_UPPER_START)
{
if (size <= 0x100000 - addr)
if (size <= GRUB_MEMORY_MACHINE_UPPER_START - addr)
return 0;
size -= 0x100000 - addr;
addr = 0x100000;
size -= GRUB_MEMORY_MACHINE_UPPER_START - addr;
addr = GRUB_MEMORY_MACHINE_UPPER_START;
}
/* Ignore >4GB. */

View file

@ -19,7 +19,6 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/i386/pc/memory.h>
#include <grub/machine/memory.h>
#include <grub/machine/kernel.h>

View file

@ -16,7 +16,7 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/i386/pc/memory.h>
#include <grub/machine/memory.h>
/*
* Note: These functions defined in this file may be called from C.
@ -196,8 +196,6 @@ protcseg:
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/i386/pc/memory.h>
prot_to_real:
/* just in case, set GDT */
lgdt gdtdesc