From 6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:29:51 +0200 Subject: Adding upstream version 2.06. Signed-off-by: Daniel Baumann --- include/grub/x86_64/at_keyboard.h | 1 + include/grub/x86_64/efi/boot.h | 0 include/grub/x86_64/efi/kernel.h | 0 include/grub/x86_64/efi/loader.h | 26 +++++++++++++++++++++++ include/grub/x86_64/efi/memory.h | 10 +++++++++ include/grub/x86_64/efi/serial.h | 1 + include/grub/x86_64/io.h | 19 +++++++++++++++++ include/grub/x86_64/linux.h | 19 +++++++++++++++++ include/grub/x86_64/macho.h | 1 + include/grub/x86_64/memory.h | 1 + include/grub/x86_64/multiboot.h | 1 + include/grub/x86_64/pci.h | 19 +++++++++++++++++ include/grub/x86_64/relocator.h | 1 + include/grub/x86_64/setjmp.h | 27 ++++++++++++++++++++++++ include/grub/x86_64/time.h | 29 ++++++++++++++++++++++++++ include/grub/x86_64/types.h | 41 +++++++++++++++++++++++++++++++++++++ include/grub/x86_64/xen/hypercall.h | 36 ++++++++++++++++++++++++++++++++ include/grub/x86_64/xnu.h | 1 + 18 files changed, 233 insertions(+) create mode 100644 include/grub/x86_64/at_keyboard.h create mode 100644 include/grub/x86_64/efi/boot.h create mode 100644 include/grub/x86_64/efi/kernel.h create mode 100644 include/grub/x86_64/efi/loader.h create mode 100644 include/grub/x86_64/efi/memory.h create mode 100644 include/grub/x86_64/efi/serial.h create mode 100644 include/grub/x86_64/io.h create mode 100644 include/grub/x86_64/linux.h create mode 100644 include/grub/x86_64/macho.h create mode 100644 include/grub/x86_64/memory.h create mode 100644 include/grub/x86_64/multiboot.h create mode 100644 include/grub/x86_64/pci.h create mode 100644 include/grub/x86_64/relocator.h create mode 100644 include/grub/x86_64/setjmp.h create mode 100644 include/grub/x86_64/time.h create mode 100644 include/grub/x86_64/types.h create mode 100644 include/grub/x86_64/xen/hypercall.h create mode 100644 include/grub/x86_64/xnu.h (limited to 'include/grub/x86_64') diff --git a/include/grub/x86_64/at_keyboard.h b/include/grub/x86_64/at_keyboard.h new file mode 100644 index 0000000..c632aa8 --- /dev/null +++ b/include/grub/x86_64/at_keyboard.h @@ -0,0 +1 @@ +#include diff --git a/include/grub/x86_64/efi/boot.h b/include/grub/x86_64/efi/boot.h new file mode 100644 index 0000000..e69de29 diff --git a/include/grub/x86_64/efi/kernel.h b/include/grub/x86_64/efi/kernel.h new file mode 100644 index 0000000..e69de29 diff --git a/include/grub/x86_64/efi/loader.h b/include/grub/x86_64/efi/loader.h new file mode 100644 index 0000000..7c302e8 --- /dev/null +++ b/include/grub/x86_64/efi/loader.h @@ -0,0 +1,26 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2002,2003,2004,2006,2007 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 . + */ + +#ifndef GRUB_LOADER_MACHINE_HEADER +#define GRUB_LOADER_MACHINE_HEADER 1 + +#include +#include + + +#endif /* ! GRUB_LOADER_MACHINE_HEADER */ diff --git a/include/grub/x86_64/efi/memory.h b/include/grub/x86_64/efi/memory.h new file mode 100644 index 0000000..46e9145 --- /dev/null +++ b/include/grub/x86_64/efi/memory.h @@ -0,0 +1,10 @@ +#ifndef GRUB_MEMORY_CPU_HEADER +#include + +#if defined (__code_model_large__) +#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffff +#else +#define GRUB_EFI_MAX_USABLE_ADDRESS 0x7fffffff +#endif + +#endif /* ! GRUB_MEMORY_CPU_HEADER */ diff --git a/include/grub/x86_64/efi/serial.h b/include/grub/x86_64/efi/serial.h new file mode 100644 index 0000000..2d85634 --- /dev/null +++ b/include/grub/x86_64/efi/serial.h @@ -0,0 +1 @@ +#include diff --git a/include/grub/x86_64/io.h b/include/grub/x86_64/io.h new file mode 100644 index 0000000..9f465bc --- /dev/null +++ b/include/grub/x86_64/io.h @@ -0,0 +1,19 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2009 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 . + */ + +#include diff --git a/include/grub/x86_64/linux.h b/include/grub/x86_64/linux.h new file mode 100644 index 0000000..19ea936 --- /dev/null +++ b/include/grub/x86_64/linux.h @@ -0,0 +1,19 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2008 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 . + */ + +#include diff --git a/include/grub/x86_64/macho.h b/include/grub/x86_64/macho.h new file mode 100644 index 0000000..165b8da --- /dev/null +++ b/include/grub/x86_64/macho.h @@ -0,0 +1 @@ +#include diff --git a/include/grub/x86_64/memory.h b/include/grub/x86_64/memory.h new file mode 100644 index 0000000..27fcd25 --- /dev/null +++ b/include/grub/x86_64/memory.h @@ -0,0 +1 @@ +#include diff --git a/include/grub/x86_64/multiboot.h b/include/grub/x86_64/multiboot.h new file mode 100644 index 0000000..957c7a5 --- /dev/null +++ b/include/grub/x86_64/multiboot.h @@ -0,0 +1 @@ +#include diff --git a/include/grub/x86_64/pci.h b/include/grub/x86_64/pci.h new file mode 100644 index 0000000..91a9924 --- /dev/null +++ b/include/grub/x86_64/pci.h @@ -0,0 +1,19 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2008 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 . + */ + +#include diff --git a/include/grub/x86_64/relocator.h b/include/grub/x86_64/relocator.h new file mode 100644 index 0000000..247e7a1 --- /dev/null +++ b/include/grub/x86_64/relocator.h @@ -0,0 +1 @@ +#include diff --git a/include/grub/x86_64/setjmp.h b/include/grub/x86_64/setjmp.h new file mode 100644 index 0000000..6df8a12 --- /dev/null +++ b/include/grub/x86_64/setjmp.h @@ -0,0 +1,27 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2003,2006,2007,2009 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 . + */ + +#ifndef GRUB_SETJMP_CPU_HEADER +#define GRUB_SETJMP_CPU_HEADER 1 + +typedef unsigned long grub_jmp_buf[8]; + +int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE GRUB_ASM_ATTR; +void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn)) GRUB_ASM_ATTR; + +#endif /* ! GRUB_SETJMP_CPU_HEADER */ diff --git a/include/grub/x86_64/time.h b/include/grub/x86_64/time.h new file mode 100644 index 0000000..4da5ae9 --- /dev/null +++ b/include/grub/x86_64/time.h @@ -0,0 +1,29 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2007 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 . + */ + +#ifndef KERNEL_CPU_TIME_HEADER +#define KERNEL_CPU_TIME_HEADER 1 + +static __inline void +grub_cpu_idle (void) +{ + /* FIXME: this can't work until we handle interrupts. */ +/* asm volatile ("hlt"); */ +} + +#endif /* ! KERNEL_CPU_TIME_HEADER */ diff --git a/include/grub/x86_64/types.h b/include/grub/x86_64/types.h new file mode 100644 index 0000000..0bbdc6d --- /dev/null +++ b/include/grub/x86_64/types.h @@ -0,0 +1,41 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2008 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 . + */ + +#ifndef GRUB_TYPES_CPU_HEADER +#define GRUB_TYPES_CPU_HEADER 1 + +/* The size of void *. */ +#ifdef __ILP32__ +#define GRUB_TARGET_SIZEOF_VOID_P 4 +#else +#define GRUB_TARGET_SIZEOF_VOID_P 8 +#endif + +/* The size of long. */ +#if defined(__MINGW32__) || defined(__ILP32__) +#define GRUB_TARGET_SIZEOF_LONG 4 +#else +#define GRUB_TARGET_SIZEOF_LONG 8 +#endif + +/* x86_64 is little-endian. */ +#undef GRUB_TARGET_WORDS_BIGENDIAN + +#define GRUB_HAVE_UNALIGNED_ACCESS 1 + +#endif /* ! GRUB_TYPES_CPU_HEADER */ diff --git a/include/grub/x86_64/xen/hypercall.h b/include/grub/x86_64/xen/hypercall.h new file mode 100644 index 0000000..90dd900 --- /dev/null +++ b/include/grub/x86_64/xen/hypercall.h @@ -0,0 +1,36 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2013 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 . + */ + +#ifndef GRUB_XEN_CPU_HYPERCALL_HEADER +#define GRUB_XEN_CPU_HYPERCALL_HEADER 1 + +#include + +int EXPORT_FUNC (grub_xen_sched_op) (int cmd, void *arg) GRUB_ASM_ATTR; +int grub_xen_update_va_mapping (void *addr, uint64_t pte, uint64_t flags) GRUB_ASM_ATTR; +int EXPORT_FUNC (grub_xen_event_channel_op) (int op, void *arg) GRUB_ASM_ATTR; + +int grub_xen_mmuext_op (mmuext_op_t * ops, + unsigned int count, + unsigned int *pdone, unsigned int foreigndom) GRUB_ASM_ATTR; +int EXPORT_FUNC (grub_xen_mmu_update) (const struct mmu_update * reqs, + unsigned count, unsigned *done_out, + unsigned foreigndom) GRUB_ASM_ATTR; +int EXPORT_FUNC (grub_xen_grant_table_op) (int, void *, int) GRUB_ASM_ATTR; + +#endif diff --git a/include/grub/x86_64/xnu.h b/include/grub/x86_64/xnu.h new file mode 100644 index 0000000..ae61733 --- /dev/null +++ b/include/grub/x86_64/xnu.h @@ -0,0 +1 @@ +#include -- cgit v1.2.3