diff options
Diffstat (limited to 'src/arch/arm')
| -rw-r--r-- | src/arch/arm/Makefile | 4 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/acpi.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/hyperv.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/iomap.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/mp.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/nap.h | 10 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/pci_io.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/reboot.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/sanboot.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/smbios.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/time.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/uaccess.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/uart.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/bits/umalloc.h | 12 | ||||
| -rw-r--r-- | src/arch/arm/include/ipxe/efi/efiarm_nap.h | 18 | ||||
| -rw-r--r-- | src/arch/arm/interface/efi/efiarm_nap.c | 57 |
16 files changed, 10 insertions, 223 deletions
diff --git a/src/arch/arm/Makefile b/src/arch/arm/Makefile index b6509dda0..f827ed422 100644 --- a/src/arch/arm/Makefile +++ b/src/arch/arm/Makefile @@ -3,9 +3,9 @@ ASM_TCHAR := % ASM_TCHAR_OPS := %% -# Include common ARM headers +# Include ARM-specific headers # -INCDIRS += arch/arm/include +INCDIRS := arch/$(ARCH)/include arch/arm/include $(INCDIRS) # ARM-specific directories containing source files # diff --git a/src/arch/arm/include/bits/acpi.h b/src/arch/arm/include/bits/acpi.h deleted file mode 100644 index f9f2f00e7..000000000 --- a/src/arch/arm/include/bits/acpi.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_ACPI_H -#define _BITS_ACPI_H - -/** @file - * - * ARM-specific ACPI API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_ACPI_H */ diff --git a/src/arch/arm/include/bits/hyperv.h b/src/arch/arm/include/bits/hyperv.h deleted file mode 100644 index f0e0c8793..000000000 --- a/src/arch/arm/include/bits/hyperv.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_HYPERV_H -#define _BITS_HYPERV_H - -/** @file - * - * Hyper-V interface - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_HYPERV_H */ diff --git a/src/arch/arm/include/bits/iomap.h b/src/arch/arm/include/bits/iomap.h deleted file mode 100644 index ae953c450..000000000 --- a/src/arch/arm/include/bits/iomap.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_IOMAP_H -#define _BITS_IOMAP_H - -/** @file - * - * ARM-specific I/O mapping API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_IOMAP_H */ diff --git a/src/arch/arm/include/bits/mp.h b/src/arch/arm/include/bits/mp.h deleted file mode 100644 index e7d4c0c16..000000000 --- a/src/arch/arm/include/bits/mp.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_MP_H -#define _BITS_MP_H - -/** @file - * - * ARM-specific multiprocessor API implementation - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_MP_H */ diff --git a/src/arch/arm/include/bits/nap.h b/src/arch/arm/include/bits/nap.h index e30a7146b..dbdf37166 100644 --- a/src/arch/arm/include/bits/nap.h +++ b/src/arch/arm/include/bits/nap.h @@ -9,6 +9,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); -#include <ipxe/efi/efiarm_nap.h> +/** + * Sleep until next CPU interrupt + * + */ +static inline __attribute__ (( always_inline )) void cpu_halt ( void ) { + __asm__ __volatile__ ( "wfi" ); +} -#endif /* _BITS_MAP_H */ +#endif /* _BITS_NAP_H */ diff --git a/src/arch/arm/include/bits/pci_io.h b/src/arch/arm/include/bits/pci_io.h deleted file mode 100644 index 91f507a44..000000000 --- a/src/arch/arm/include/bits/pci_io.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_PCI_IO_H -#define _BITS_PCI_IO_H - -/** @file - * - * ARM PCI I/O API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_PCI_IO_H */ diff --git a/src/arch/arm/include/bits/reboot.h b/src/arch/arm/include/bits/reboot.h deleted file mode 100644 index 88c50250c..000000000 --- a/src/arch/arm/include/bits/reboot.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_REBOOT_H -#define _BITS_REBOOT_H - -/** @file - * - * ARM-specific reboot API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_REBOOT_H */ diff --git a/src/arch/arm/include/bits/sanboot.h b/src/arch/arm/include/bits/sanboot.h deleted file mode 100644 index abd4c79a5..000000000 --- a/src/arch/arm/include/bits/sanboot.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_SANBOOT_H -#define _BITS_SANBOOT_H - -/** @file - * - * ARM-specific sanboot API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_SANBOOT_H */ diff --git a/src/arch/arm/include/bits/smbios.h b/src/arch/arm/include/bits/smbios.h deleted file mode 100644 index d94218116..000000000 --- a/src/arch/arm/include/bits/smbios.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_SMBIOS_H -#define _BITS_SMBIOS_H - -/** @file - * - * ARM-specific SMBIOS API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_SMBIOS_H */ diff --git a/src/arch/arm/include/bits/time.h b/src/arch/arm/include/bits/time.h deleted file mode 100644 index 724d8b932..000000000 --- a/src/arch/arm/include/bits/time.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_TIME_H -#define _BITS_TIME_H - -/** @file - * - * ARM-specific time API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_TIME_H */ diff --git a/src/arch/arm/include/bits/uaccess.h b/src/arch/arm/include/bits/uaccess.h deleted file mode 100644 index 87f11509c..000000000 --- a/src/arch/arm/include/bits/uaccess.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_UACCESS_H -#define _BITS_UACCESS_H - -/** @file - * - * ARM-specific user access API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_UACCESS_H */ diff --git a/src/arch/arm/include/bits/uart.h b/src/arch/arm/include/bits/uart.h deleted file mode 100644 index 6f85975f7..000000000 --- a/src/arch/arm/include/bits/uart.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_UART_H -#define _BITS_UART_H - -/** @file - * - * 16550-compatible UART - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_UART_H */ diff --git a/src/arch/arm/include/bits/umalloc.h b/src/arch/arm/include/bits/umalloc.h deleted file mode 100644 index 27970d7b2..000000000 --- a/src/arch/arm/include/bits/umalloc.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_UMALLOC_H -#define _BITS_UMALLOC_H - -/** @file - * - * ARM-specific user memory allocation API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_UMALLOC_H */ diff --git a/src/arch/arm/include/ipxe/efi/efiarm_nap.h b/src/arch/arm/include/ipxe/efi/efiarm_nap.h deleted file mode 100644 index dcbdd3e20..000000000 --- a/src/arch/arm/include/ipxe/efi/efiarm_nap.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _IPXE_EFIARM_NAP_H -#define _IPXE_EFIARM_NAP_H - -/** @file - * - * EFI CPU sleeping - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#ifdef NAP_EFIARM -#define NAP_PREFIX_efiarm -#else -#define NAP_PREFIX_efiarm __efiarm_ -#endif - -#endif /* _IPXE_EFIARM_NAP_H */ diff --git a/src/arch/arm/interface/efi/efiarm_nap.c b/src/arch/arm/interface/efi/efiarm_nap.c deleted file mode 100644 index fba7a5d82..000000000 --- a/src/arch/arm/interface/efi/efiarm_nap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2016 Michael Brown <mbrown@fensystems.co.uk>. - * - * This program 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 2 of the - * License, or any later version. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - * - * You can also choose to distribute this program under the terms of - * the Unmodified Binary Distribution Licence (as given in the file - * COPYING.UBDL), provided that you have satisfied its requirements. - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include <ipxe/nap.h> -#include <ipxe/efi/efi.h> - -/** @file - * - * iPXE CPU sleeping API for EFI - * - */ - -/** - * Sleep until next interrupt - * - */ -static void efiarm_cpu_nap ( void ) { - /* - * I can't find any EFI API that allows us to put the CPU to - * sleep. The CpuSleep() function is defined in CpuLib.h, but - * isn't part of any exposed protocol so we have no way to - * call it. - * - * The EFI shell doesn't seem to bother sleeping the CPU; it - * just sits there idly burning power. - * - * If a shutdown is in progess, there may be nothing to - * generate an interrupt since the timer is disabled in the - * first step of ExitBootServices(). - */ - if ( ! efi_shutdown_in_progress ) - __asm__ __volatile__ ( "wfi" ); -} - -PROVIDE_NAP ( efiarm, cpu_nap, efiarm_cpu_nap ); |
