diff -ru eli.old/eli.c eli/eli.c --- eli.old/eli.c Fri Aug 18 16:21:55 2000 +++ eli/eli.c Fri Aug 18 16:24:58 2000 @@ -39,6 +39,7 @@ #define ROUNDUP(x,a) (((x) + (a) - 1) & ~((a) - 1)) #define virt_to_phys(a) ((EFI_PHYSICAL_ADDRESS) ((UINT64) (a) - 0xe000000000000000ULL)) +#define phys_to_virt(a) ((EFI_PHYSICAL_ADDRESS) ((UINT64) (a) + 0xe000000000000000ULL)) /* This is the structure passed to the kernel */ struct ia64_boot_param { @@ -112,7 +113,7 @@ CHAR16 *last = optionstr + optionsize/2; #ifdef DEBUG - Print(W2U(L"split_command_line: size %d, '%s'\n", optionsize, optionstr)); + Print(W2U(L"split_command_line: size %d, '%s'\n"), optionsize, optionstr); #endif do { @@ -411,7 +412,7 @@ } #else size = total_size; - status = fs->Read(file, &size, (VOID *) virt_to_phys(start_addr)); + status = fs->Read(file, &size, (VOID *) virt_to_phys(vbuffer)); if (EFI_ERROR(status)) return EFI_LOAD_ERROR; @@ -455,9 +456,9 @@ status = BS->AllocatePages(AllocateAddress, EfiLoaderCode, pages, &start_addr); if (EFI_ERROR(status)) return EFI_LOAD_ERROR; - + /* Make Buffer point to the requested physical address in memory */ - status = read_file(fs, file, start_addr, total_size); + status = read_file(fs, file, phys_to_virt(start_addr), total_size); if (EFI_ERROR(status)) { Print(W2U(L"%s: read failed: %r\n"), filename, status); BS->FreePages(start_addr, pages);