Fix raw image addresses

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-13 18:48:33 +01:00
parent 0b4ab8e54a
commit 10f6389453
4 changed files with 7 additions and 5 deletions

View File

@ -118,7 +118,7 @@ prom_call:
boot_continue:
mov %o7, PIC_REG /* PIC base */
sethi %hi(SCRATCH_PAD), %l1 /* OF argument slots */
sethi %hi(SCRATCH_PAD_BOOT), %l1 /* OF argument slots */
/* Find the /chosen node so we can fetch the stdout handle,
* and thus perform console output.

View File

@ -81,7 +81,7 @@ prom_call:
after_info_block:
sethi %hi(SCRATCH_PAD), %l1 /* OF argument slots */
sethi %hi(SCRATCH_PAD_DISKBOOT), %l1 /* OF argument slots */
GET_ABS(notification_string, %o2)
call console_write

View File

@ -25,7 +25,8 @@
#define BOOTDEV_REG %l6
#define PIC_REG %l7
#define SCRATCH_PAD 0x10000
#define SCRATCH_PAD_BOOT 0x5000
#define SCRATCH_PAD_DISKBOOT 0x4000
#define GET_ABS(symbol, reg) \
add PIC_REG, (symbol - pic_base), reg
@ -51,7 +52,7 @@
#define GRUB_BOOT_MACHINE_LIST_SIZE 12
#define GRUB_BOOT_MACHINE_IMAGE_ADDRESS 0x200000
#define GRUB_BOOT_MACHINE_IMAGE_ADDRESS 0x4400
#define GRUB_BOOT_MACHINE_KERNEL_ADDR 0x4200

View File

@ -344,7 +344,8 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
aout_head->a_midmag = grub_host_to_target32 ((AOUT_MID_SUN << 16)
| AOUT32_OMAGIC);
aout_head->a_text = grub_host_to_target32 (core_size);
aout_head->a_entry = grub_host_to_target32 (0x4400);
aout_head->a_entry
= grub_host_to_target32 (GRUB_BOOT_MACHINE_IMAGE_ADDRESS);
memcpy (aout_img + sizeof (*aout_head), core_img, core_size);
free (core_img);