2 * Copyright (C) 2001-2003 Hewlett-Packard Co.
3 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
5 * This file is part of the ELILO, the EFI Linux boot loader.
7 * ELILO is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * ELILO is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with ELILO; see the file COPYING. If not, write to the Free
19 * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 * Please check out the elilo.txt for complete documentation on how
23 * to use this program.
27 * This file is used to define all the IA64-specific data structures, functions,
28 * and constants used by the generic ELILO.
30 * For things specific to this platform use private.h instead
32 #ifndef __ELILO_SYSDEPS_IA64_H__
33 #define __ELILO_SYSDEPS_IA64_H__
35 #define ELILO_ARCH "IA-64" /* ASCII string ! */
37 /* in respective assembly files */
38 extern VOID Memset(VOID *, INTN, UINTN);
39 extern VOID Memcpy(VOID *, VOID *, UINTN);
41 extern VOID sysdep_register_options(VOID);
44 * This version must match the one in the kernel
46 typedef struct ia64_boot_params {
48 * The following three pointers MUST point to memory that is marked
49 * as EfiRuntimeServicesData so that the kernel doesn't think the
50 * underlying memory is free.
52 UINTN command_line; /* physical address of command line arguments */
53 UINTN efi_systab; /* physical address of EFI system table */
54 UINTN efi_memmap; /* physical address of EFI memory map */
55 UINTN efi_memmap_size; /* size of EFI memory map */
56 UINTN efi_memdesc_size; /* size of an EFI memory map descriptor */
57 UINT32 efi_memdesc_version; /* descriptor version */
59 UINT16 num_cols; /* number of columns on console output device */
60 UINT16 num_rows; /* number of rows on console output device */
61 UINT16 orig_x; /* cursor's x position */
62 UINT16 orig_y; /* cursor's y position */
64 UINTN fpswa; /* physical address of fpswa interface */
65 UINTN initrd_start; /* virtual address where the initial ramdisk begins */
66 UINTN initrd_size; /* how big is the initial ramdisk */
68 UINTN vmcode_start; /* virtual address where the boot time vmcode begins */
69 UINTN vmcode_size; /* how big is the boot module */
70 UINTN loader_addr; /* start address of boot loader */
71 UINTN loader_size; /* size of loader code & data */
75 typedef struct sys_img_options {
76 UINT8 dummy; /* forces non-zero offset for first field */
77 UINT8 allow_relocation; /* allow kernel relocation on allocation error */
81 * How to jump to kernel code
84 start_kernel(VOID *kentry, VOID *bp)
86 asm volatile ("mov r28=%1; br.sptk.few %0" :: "b"(kentry),"r"(bp));
90 __ia64_swab64 (UINT64 x)
94 asm volatile ("mux1 %0=%1,@rev" : "=r" (result) : "r" (x));
99 __ia64_swab32 (UINT32 x)
101 return __ia64_swab64(x) >> 32;
105 __ia64_swab16(UINT16 x)
107 return __ia64_swab64(x) >> 48;
110 #endif /* __ELILO_SYSDEPS_IA64_H__ */