mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 01:59:49 +00:00
Recommit my work on alpha
This commit is contained in:
1 parent
c6dc6fa175
commit
85872c8373
31 files changed
+1401
-10
No files matched your search
@@ -0,0 +1,5 @@
|
||||
|
||||
void EXPORT_FUNC (__remlu) (void);
|
||||
void EXPORT_FUNC (__remqu) (void);
|
||||
void EXPORT_FUNC (__divqu) (void);
|
||||
void EXPORT_FUNC (__divlu) (void);
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_CONSOLE_MACHINE_HEADER
|
||||
#define GRUB_CONSOLE_MACHINE_HEADER 1
|
||||
|
||||
#include <grub/symbol.h>
|
||||
|
||||
/* Initialize the console system. */
|
||||
void grub_console_init_early (void);
|
||||
void grub_console_init_lately (void);
|
||||
|
||||
/* Finish the console system. */
|
||||
void grub_console_fini (void);
|
||||
|
||||
#endif /* ! GRUB_CONSOLE_MACHINE_HEADER */
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_SRM_HEADER
|
||||
#define GRUB_SRM_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
|
||||
grub_uint64_t grub_alpha_srm_dispatch (int code, ...);
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_ALPHA_SRM_GETC = 1,
|
||||
GRUB_ALPHA_SRM_PUTS = 2,
|
||||
GRUB_ALPHA_SRM_OPEN_CONSOLE = 7,
|
||||
GRUB_ALPHA_SRM_OPEN = 0x10,
|
||||
GRUB_ALPHA_SRM_CLOSE = 0x11,
|
||||
GRUB_ALPHA_SRM_READ = 0x13,
|
||||
GRUB_ALPHA_GET_ENV = 0x22
|
||||
};
|
||||
|
||||
typedef grub_uint64_t grub_srm_fileno_t;
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_ALPHA_SRM_ENV_TTY = 0x0f
|
||||
};
|
||||
|
||||
enum grub_alpha_srm_memdesc_entry_type
|
||||
{
|
||||
GRUB_ALPHA_SRM_MEMDESC_ENTRY_TYPE_AVAILABLE = 0,
|
||||
GRUB_ALPHA_SRM_MEMDESC_ENTRY_TYPE_NONVOLATILE = 1,
|
||||
GRUB_ALPHA_SRM_MEMDESC_ENTRY_TYPE_RESERVED1 = 2,
|
||||
GRUB_ALPHA_SRM_MEMDESC_ENTRY_TYPE_RESERVED2 = 3,
|
||||
};
|
||||
|
||||
struct grub_alpha_srm_memdesc_entry
|
||||
{
|
||||
grub_uint64_t start_page;
|
||||
grub_uint64_t num_pages;
|
||||
grub_uint64_t unused[4];
|
||||
grub_uint64_t type;
|
||||
};
|
||||
|
||||
struct grub_alpha_srm_memdesc
|
||||
{
|
||||
grub_uint64_t checksum;
|
||||
grub_uint64_t unused;
|
||||
grub_uint64_t num_entries;
|
||||
struct grub_alpha_srm_memdesc_entry entries[0];
|
||||
};
|
||||
|
||||
struct grub_alpha_srm_hwrpb
|
||||
{
|
||||
grub_uint64_t paddr;
|
||||
char magic[8];
|
||||
grub_uint64_t hwrpb_version;
|
||||
grub_uint64_t hwrpb_size;
|
||||
grub_uint64_t primary_cpu_id;
|
||||
grub_uint64_t page_size;
|
||||
grub_uint64_t unused1[14 - 6];
|
||||
grub_uint64_t pcc_freq;
|
||||
grub_uint64_t unused2[4];
|
||||
grub_uint64_t cpu_slot_size;
|
||||
grub_uint64_t cpu_slots_offset;
|
||||
grub_uint64_t unused3[4];
|
||||
grub_uint64_t memory_descriptor_table;
|
||||
grub_uint64_t unused4[30-26];
|
||||
grub_uint64_t vptb;
|
||||
grub_uint64_t unused5[72 - 31];
|
||||
grub_uint64_t checksum;
|
||||
};
|
||||
|
||||
struct grub_alpha_srm_hwpcb
|
||||
{
|
||||
grub_uint64_t ksp;
|
||||
grub_uint64_t esp;
|
||||
grub_uint64_t ssp;
|
||||
grub_uint64_t usp;
|
||||
grub_uint64_t ptbr;
|
||||
};
|
||||
|
||||
#define GRUB_ALPHA_SRM_HWRPB_ADDR 0x10000000
|
||||
#define GRUB_ALPHA_SRM_HWRPB (*(struct grub_alpha_srm_hwrpb *) GRUB_ALPHA_SRM_HWRPB_ADDR)
|
||||
|
||||
void grub_srmdisk_init (void);
|
||||
void grub_srmdisk_fini (void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_MACHINE_TIME_HEADER
|
||||
#define KERNEL_MACHINE_TIME_HEADER 1
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_CPU_TIME_HEADER
|
||||
#define KERNEL_CPU_TIME_HEADER 1
|
||||
|
||||
static inline void
|
||||
grub_cpu_idle(void)
|
||||
{
|
||||
}
|
||||
#ifndef GRUB_UTIL
|
||||
|
||||
#define GRUB_TICKS_PER_SECOND (grub_arch_pccclock)
|
||||
|
||||
/* Return the real time in ticks. */
|
||||
grub_uint64_t EXPORT_FUNC (grub_get_rtc) (void);
|
||||
|
||||
extern grub_uint32_t EXPORT_VAR (grub_arch_pccclock);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_TYPES_CPU_HEADER
|
||||
#define GRUB_TYPES_CPU_HEADER 1
|
||||
|
||||
/* The size of void *. */
|
||||
#define GRUB_TARGET_SIZEOF_VOID_P 8
|
||||
|
||||
/* The size of long. */
|
||||
#define GRUB_TARGET_SIZEOF_LONG 8
|
||||
|
||||
/* alpha is little-endian (usually). */
|
||||
#undef GRUB_TARGET_WORDS_BIGENDIAN
|
||||
|
||||
#endif /* ! GRUB_TYPES_CPU_HEADER */
|
||||
@@ -33,6 +33,8 @@ grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
||||
grub_size_t len __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
#elif defined (__alpha__)
|
||||
void EXPORT_FUNC(grub_arch_sync_all_caches) (void);
|
||||
#else
|
||||
void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
|
||||
#endif
|
||||
|
||||
@@ -48,6 +48,7 @@ enum grub_disk_dev_id
|
||||
GRUB_DISK_DEVICE_PROCFS_ID,
|
||||
GRUB_DISK_DEVICE_CBFSDISK_ID,
|
||||
GRUB_DISK_DEVICE_UBOOTDISK_ID,
|
||||
GRUB_DISK_DEVICE_SRMDISK_ID,
|
||||
};
|
||||
|
||||
struct grub_disk;
|
||||
|
||||
+10
-1
@@ -167,7 +167,7 @@ struct grub_dl
|
||||
Elf_Sym *symtab;
|
||||
void (*init) (struct grub_dl *mod);
|
||||
void (*fini) (void);
|
||||
#if defined (__ia64__) || defined (__powerpc__)
|
||||
#if defined (__ia64__) || defined (__alpha__) || defined (__powerpc__)
|
||||
void *got;
|
||||
void *tramp;
|
||||
#endif
|
||||
@@ -252,6 +252,15 @@ grub_arch_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
|
||||
#define GRUB_ARCH_DL_GOT_ALIGN 4
|
||||
#endif
|
||||
|
||||
#ifdef __alpha__
|
||||
#define GRUB_ARCH_DL_TRAMP_SIZE 0
|
||||
void
|
||||
grub_arch_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
|
||||
grub_size_t *got);
|
||||
#define GRUB_ARCH_DL_TRAMP_ALIGN 16
|
||||
#define GRUB_ARCH_DL_GOT_ALIGN 16
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_DL_H */
|
||||
+1
-1
@@ -1819,7 +1819,7 @@ typedef Elf32_Addr Elf32_Conflict;
|
||||
#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
|
||||
#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
|
||||
#define R_ALPHA_RELATIVE 27 /* Adjust by program base */
|
||||
#define R_ALPHA_TLS_GD_HI 28
|
||||
#define R_ALPHA_BRSGP 28
|
||||
#define R_ALPHA_TLSGD 29
|
||||
#define R_ALPHA_TLS_LDM 30
|
||||
#define R_ALPHA_DTPMOD64 31
|
||||
|
||||
@@ -32,6 +32,7 @@ typedef enum grub_memory_type
|
||||
GRUB_MEMORY_BADRAM = 5,
|
||||
GRUB_MEMORY_COREBOOT_TABLES = 16,
|
||||
GRUB_MEMORY_CODE = 20,
|
||||
GRUB_MEMORY_NVRAM = 22
|
||||
/* This one is special: it's used internally but is never reported
|
||||
by firmware. Don't use -1 as it's used internally for other purposes. */
|
||||
GRUB_MEMORY_HOLE = -2,
|
||||
|
||||
@@ -90,6 +90,8 @@
|
||||
|
||||
#define GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE 0x08
|
||||
|
||||
#define GRUB_KERNEL_ALPHA_SRM_TOTAL_MODULE_SIZE 0x80
|
||||
|
||||
#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x8200
|
||||
#define GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR 0x100000
|
||||
|
||||
|
||||
Reference in new issue
Block a user