2007-02-21 Hollis Blanchard <hollis@penguinppc.org>

* conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
	* kern/powerpc/ieee1275/init.c (_end): Add declaration.
	(_start): Likewise.
	(grub_arch_modules_addr): Return address after `_end'.
	* util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
	(load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
	(add_segments): Calculate `_end' from phdr size and location.
	(ALIGN_UP): Moved to ...
	* include/grub/misc.h: here.
	* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
	New macro.
	(GRUB_IEEE1275_MODULE_BASE): Removed.
This commit is contained in:
hollisb 2007-02-21 23:22:20 +00:00
parent fd7d8ebae4
commit a0cbb02386
7 changed files with 48 additions and 13 deletions

View file

@ -26,6 +26,8 @@
#include <grub/symbol.h>
#include <grub/err.h>
#define ALIGN_UP(addr, align) ((long)((char *)addr + align - 1) & ~(align - 1))
#define grub_dprintf(condition, fmt, args...) grub_real_dprintf(__FILE__, __LINE__, condition, fmt, ## args);
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
#define grub_memcpy(d,s,n) grub_memmove ((d), (s), (n))

View file

@ -22,10 +22,9 @@
#include <grub/symbol.h>
#define GRUB_IEEE1275_MOD_ALIGN 0x1000
void EXPORT_FUNC (grub_reboot) (void);
void EXPORT_FUNC (grub_halt) (void);
/* Where grub-mkimage places the core modules in memory. */
#define GRUB_IEEE1275_MODULE_BASE 0x00300000
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */