You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
This commit is contained in:
@@ -0,0 +1,420 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see Documentation/kbuild/kconfig-language.txt.
|
||||
#
|
||||
|
||||
mainmenu "IA-64 Linux Kernel Configuration"
|
||||
|
||||
source "init/Kconfig"
|
||||
|
||||
menu "Processor type and features"
|
||||
|
||||
config IA64
|
||||
bool
|
||||
default y
|
||||
help
|
||||
The Itanium Processor Family is Intel's 64-bit successor to
|
||||
the 32-bit X86 line. The IA-64 Linux project has a home
|
||||
page at <http://www.linuxia64.org/> and a mailing list at
|
||||
<linux-ia64@vger.kernel.org>.
|
||||
|
||||
config 64BIT
|
||||
bool
|
||||
default y
|
||||
|
||||
config MMU
|
||||
bool
|
||||
default y
|
||||
|
||||
config RWSEM_XCHGADD_ALGORITHM
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config TIME_INTERPOLATION
|
||||
bool
|
||||
default y
|
||||
|
||||
config EFI
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_IOMAP
|
||||
bool
|
||||
default y
|
||||
|
||||
choice
|
||||
prompt "System type"
|
||||
default IA64_GENERIC
|
||||
|
||||
config IA64_GENERIC
|
||||
bool "generic"
|
||||
select NUMA
|
||||
select ACPI_NUMA
|
||||
select VIRTUAL_MEM_MAP
|
||||
select DISCONTIGMEM
|
||||
help
|
||||
This selects the system type of your hardware. A "generic" kernel
|
||||
will run on any supported IA-64 system. However, if you configure
|
||||
a kernel for your specific system, it will be faster and smaller.
|
||||
|
||||
generic For any supported IA-64 system
|
||||
DIG-compliant For DIG ("Developer's Interface Guide") compliant systems
|
||||
HP-zx1/sx1000 For HP systems
|
||||
HP-zx1/sx1000+swiotlb For HP systems with (broken) DMA-constrained devices.
|
||||
SGI-SN2 For SGI Altix systems
|
||||
Ski-simulator For the HP simulator <http://www.hpl.hp.com/research/linux/ski/>
|
||||
|
||||
If you don't know what to do, choose "generic".
|
||||
|
||||
config IA64_DIG
|
||||
bool "DIG-compliant"
|
||||
|
||||
config IA64_HP_ZX1
|
||||
bool "HP-zx1/sx1000"
|
||||
help
|
||||
Build a kernel that runs on HP zx1 and sx1000 systems. This adds
|
||||
support for the HP I/O MMU.
|
||||
|
||||
config IA64_HP_ZX1_SWIOTLB
|
||||
bool "HP-zx1/sx1000 with software I/O TLB"
|
||||
help
|
||||
Build a kernel that runs on HP zx1 and sx1000 systems even when they
|
||||
have broken PCI devices which cannot DMA to full 32 bits. Apart
|
||||
from support for the HP I/O MMU, this includes support for the software
|
||||
I/O TLB, which allows supporting the broken devices at the expense of
|
||||
wasting some kernel memory (about 2MB by default).
|
||||
|
||||
config IA64_SGI_SN2
|
||||
bool "SGI-SN2"
|
||||
help
|
||||
Selecting this option will optimize the kernel for use on sn2 based
|
||||
systems, but the resulting kernel binary will not run on other
|
||||
types of ia64 systems. If you have an SGI Altix system, it's safe
|
||||
to select this option. If in doubt, select ia64 generic support
|
||||
instead.
|
||||
|
||||
config IA64_HP_SIM
|
||||
bool "Ski-simulator"
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Processor type"
|
||||
default ITANIUM
|
||||
|
||||
config ITANIUM
|
||||
bool "Itanium"
|
||||
help
|
||||
Select your IA-64 processor type. The default is Itanium.
|
||||
This choice is safe for all IA-64 systems, but may not perform
|
||||
optimally on systems with, say, Itanium 2 or newer processors.
|
||||
|
||||
config MCKINLEY
|
||||
bool "Itanium 2"
|
||||
help
|
||||
Select this to configure for an Itanium 2 (McKinley) processor.
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Kernel page size"
|
||||
default IA64_PAGE_SIZE_16KB
|
||||
|
||||
config IA64_PAGE_SIZE_4KB
|
||||
bool "4KB"
|
||||
help
|
||||
This lets you select the page size of the kernel. For best IA-64
|
||||
performance, a page size of 8KB or 16KB is recommended. For best
|
||||
IA-32 compatibility, a page size of 4KB should be selected (the vast
|
||||
majority of IA-32 binaries work perfectly fine with a larger page
|
||||
size). For Itanium 2 or newer systems, a page size of 64KB can also
|
||||
be selected.
|
||||
|
||||
4KB For best IA-32 compatibility
|
||||
8KB For best IA-64 performance
|
||||
16KB For best IA-64 performance
|
||||
64KB Requires Itanium 2 or newer processor.
|
||||
|
||||
If you don't know what to do, choose 16KB.
|
||||
|
||||
config IA64_PAGE_SIZE_8KB
|
||||
bool "8KB"
|
||||
|
||||
config IA64_PAGE_SIZE_16KB
|
||||
bool "16KB"
|
||||
|
||||
config IA64_PAGE_SIZE_64KB
|
||||
depends on !ITANIUM
|
||||
bool "64KB"
|
||||
|
||||
endchoice
|
||||
|
||||
config IA64_BRL_EMU
|
||||
bool
|
||||
depends on ITANIUM
|
||||
default y
|
||||
|
||||
# align cache-sensitive data to 128 bytes
|
||||
config IA64_L1_CACHE_SHIFT
|
||||
int
|
||||
default "7" if MCKINLEY
|
||||
default "6" if ITANIUM
|
||||
|
||||
# align cache-sensitive data to 64 bytes
|
||||
config NUMA
|
||||
bool "NUMA support"
|
||||
depends on !IA64_HP_SIM
|
||||
default y if IA64_SGI_SN2
|
||||
select ACPI_NUMA
|
||||
help
|
||||
Say Y to compile the kernel to support NUMA (Non-Uniform Memory
|
||||
Access). This option is for configuring high-end multiprocessor
|
||||
server systems. If in doubt, say N.
|
||||
|
||||
config VIRTUAL_MEM_MAP
|
||||
bool "Virtual mem map"
|
||||
default y if !IA64_HP_SIM
|
||||
help
|
||||
Say Y to compile the kernel with support for a virtual mem map.
|
||||
This code also only takes effect if a memory hole of greater than
|
||||
1 Gb is found during boot. You must turn this option on if you
|
||||
require the DISCONTIGMEM option for your machine. If you are
|
||||
unsure, say Y.
|
||||
|
||||
config HOLES_IN_ZONE
|
||||
bool
|
||||
default y if VIRTUAL_MEM_MAP
|
||||
|
||||
config DISCONTIGMEM
|
||||
bool "Discontiguous memory support"
|
||||
depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB) && NUMA && VIRTUAL_MEM_MAP
|
||||
default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
|
||||
help
|
||||
Say Y to support efficient handling of discontiguous physical memory,
|
||||
for architectures which are either NUMA (Non-Uniform Memory Access)
|
||||
or have huge holes in the physical address space for other reasons.
|
||||
See <file:Documentation/vm/numa> for more.
|
||||
|
||||
config IA64_CYCLONE
|
||||
bool "Cyclone (EXA) Time Source support"
|
||||
help
|
||||
Say Y here to enable support for IBM EXA Cyclone time source.
|
||||
If you're unsure, answer N.
|
||||
|
||||
config IOSAPIC
|
||||
bool
|
||||
depends on !IA64_HP_SIM
|
||||
default y
|
||||
|
||||
config IA64_SGI_SN_SIM
|
||||
bool "SGI Medusa Simulator Support"
|
||||
depends on IA64_SGI_SN2
|
||||
help
|
||||
If you are compiling a kernel that will run under SGI's IA-64
|
||||
simulator (Medusa) then say Y, otherwise say N.
|
||||
|
||||
config FORCE_MAX_ZONEORDER
|
||||
int
|
||||
default "18"
|
||||
|
||||
config SMP
|
||||
bool "Symmetric multi-processing support"
|
||||
help
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, say N. If you have a system with more
|
||||
than one CPU, say Y.
|
||||
|
||||
If you say N here, the kernel will run on single and multiprocessor
|
||||
systems, but will use only one CPU of a multiprocessor system. If
|
||||
you say Y here, the kernel will run on many, but not all,
|
||||
single processor systems. On a single processor system, the kernel
|
||||
will run faster if you say N here.
|
||||
|
||||
See also the <file:Documentation/smp.txt> and the SMP-HOWTO
|
||||
available at <http://www.tldp.org/docs.html#howto>.
|
||||
|
||||
If you don't know what to do here, say N.
|
||||
|
||||
config NR_CPUS
|
||||
int "Maximum number of CPUs (2-512)"
|
||||
range 2 512
|
||||
depends on SMP
|
||||
default "64"
|
||||
help
|
||||
You should set this to the number of CPUs in your system, but
|
||||
keep in mind that a kernel compiled for, e.g., 2 CPUs will boot but
|
||||
only use 2 CPUs on a >2 CPU system. Setting this to a value larger
|
||||
than 64 will cause the use of a CPU mask array, causing a small
|
||||
performance hit.
|
||||
|
||||
config HOTPLUG_CPU
|
||||
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
|
||||
depends on SMP && EXPERIMENTAL
|
||||
select HOTPLUG
|
||||
default n
|
||||
---help---
|
||||
Say Y here to experiment with turning CPUs off and on. CPUs
|
||||
can be controlled through /sys/devices/system/cpu/cpu#.
|
||||
Say N if you want to disable CPU hotplug.
|
||||
|
||||
config PREEMPT
|
||||
bool "Preemptible Kernel"
|
||||
help
|
||||
This option reduces the latency of the kernel when reacting to
|
||||
real-time or interactive events by allowing a low priority process to
|
||||
be preempted even if it is in kernel mode executing a system call.
|
||||
This allows applications to run more reliably even when the system is
|
||||
under load.
|
||||
|
||||
Say Y here if you are building a kernel for a desktop, embedded
|
||||
or real-time system. Say N if you are unsure.
|
||||
|
||||
config HAVE_DEC_LOCK
|
||||
bool
|
||||
depends on (SMP || PREEMPT)
|
||||
default y
|
||||
|
||||
config IA32_SUPPORT
|
||||
bool "Support for Linux/x86 binaries"
|
||||
help
|
||||
IA-64 processors can execute IA-32 (X86) instructions. By
|
||||
saying Y here, the kernel will include IA-32 system call
|
||||
emulation support which makes it possible to transparently
|
||||
run IA-32 Linux binaries on an IA-64 Linux system.
|
||||
If in doubt, say Y.
|
||||
|
||||
config COMPAT
|
||||
bool
|
||||
depends on IA32_SUPPORT
|
||||
default y
|
||||
|
||||
config IA64_MCA_RECOVERY
|
||||
tristate "MCA recovery from errors other than TLB."
|
||||
|
||||
config PERFMON
|
||||
bool "Performance monitor support"
|
||||
help
|
||||
Selects whether support for the IA-64 performance monitor hardware
|
||||
is included in the kernel. This makes some kernel data-structures a
|
||||
little bigger and slows down execution a bit, but it is generally
|
||||
a good idea to turn this on. If you're unsure, say Y.
|
||||
|
||||
config IA64_PALINFO
|
||||
tristate "/proc/pal support"
|
||||
help
|
||||
If you say Y here, you are able to get PAL (Processor Abstraction
|
||||
Layer) information in /proc/pal. This contains useful information
|
||||
about the processors in your systems, such as cache and TLB sizes
|
||||
and the PAL firmware version in use.
|
||||
|
||||
To use this option, you have to ensure that the "/proc file system
|
||||
support" (CONFIG_PROC_FS) is enabled, too.
|
||||
|
||||
config ACPI_DEALLOCATE_IRQ
|
||||
bool
|
||||
depends on IOSAPIC && EXPERIMENTAL
|
||||
default y
|
||||
|
||||
source "drivers/firmware/Kconfig"
|
||||
|
||||
source "fs/Kconfig.binfmt"
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Power management and ACPI"
|
||||
|
||||
config PM
|
||||
bool "Power Management support"
|
||||
depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB
|
||||
default y
|
||||
help
|
||||
"Power Management" means that parts of your computer are shut
|
||||
off or put into a power conserving "sleep" mode if they are not
|
||||
being used. There are two competing standards for doing this: APM
|
||||
and ACPI. If you want to use either one, say Y here and then also
|
||||
to the requisite support below.
|
||||
|
||||
Power Management is most important for battery powered laptop
|
||||
computers; if you have a laptop, check out the Linux Laptop home
|
||||
page on the WWW at <http://www.linux-on-laptops.com/> and the
|
||||
Battery Powered Linux mini-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>.
|
||||
|
||||
Note that, even if you say N here, Linux on the x86 architecture
|
||||
will issue the hlt instruction if nothing is to be done, thereby
|
||||
sending the processor to sleep and saving power.
|
||||
|
||||
config ACPI
|
||||
bool
|
||||
depends on !IA64_HP_SIM
|
||||
default y
|
||||
|
||||
if !IA64_HP_SIM
|
||||
|
||||
source "drivers/acpi/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
if !IA64_HP_SIM
|
||||
|
||||
menu "Bus options (PCI, PCMCIA)"
|
||||
|
||||
config PCI
|
||||
bool "PCI support"
|
||||
help
|
||||
Find out whether you have a PCI motherboard. PCI is the name of a
|
||||
bus system, i.e. the way the CPU talks to the other stuff inside
|
||||
your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
|
||||
VESA. If you have PCI, say Y, otherwise N.
|
||||
|
||||
The PCI-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>, contains valuable
|
||||
information about which PCI hardware does work under Linux and which
|
||||
doesn't.
|
||||
|
||||
config PCI_DOMAINS
|
||||
bool
|
||||
default PCI
|
||||
|
||||
source "drivers/pci/Kconfig"
|
||||
|
||||
source "drivers/pci/hotplug/Kconfig"
|
||||
|
||||
source "drivers/pcmcia/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
source "drivers/Kconfig"
|
||||
|
||||
source "fs/Kconfig"
|
||||
|
||||
source "lib/Kconfig"
|
||||
|
||||
#
|
||||
# Use the generic interrupt handling code in kernel/irq/:
|
||||
#
|
||||
config GENERIC_HARDIRQS
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_IRQ_PROBE
|
||||
bool
|
||||
default y
|
||||
|
||||
source "arch/ia64/hp/sim/Kconfig"
|
||||
|
||||
source "arch/ia64/oprofile/Kconfig"
|
||||
|
||||
source "arch/ia64/Kconfig.debug"
|
||||
|
||||
source "security/Kconfig"
|
||||
|
||||
source "crypto/Kconfig"
|
||||
@@ -0,0 +1,64 @@
|
||||
menu "Kernel hacking"
|
||||
|
||||
source "lib/Kconfig.debug"
|
||||
|
||||
choice
|
||||
prompt "Physical memory granularity"
|
||||
default IA64_GRANULE_64MB
|
||||
|
||||
config IA64_GRANULE_16MB
|
||||
bool "16MB"
|
||||
help
|
||||
IA-64 identity-mapped regions use a large page size called "granules".
|
||||
|
||||
Select "16MB" for a small granule size.
|
||||
Select "64MB" for a large granule size. This is the current default.
|
||||
|
||||
config IA64_GRANULE_64MB
|
||||
bool "64MB"
|
||||
depends on !(IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_SGI_SN2)
|
||||
|
||||
endchoice
|
||||
|
||||
config IA64_PRINT_HAZARDS
|
||||
bool "Print possible IA-64 dependency violations to console"
|
||||
depends on DEBUG_KERNEL
|
||||
help
|
||||
Selecting this option prints more information for Illegal Dependency
|
||||
Faults, that is, for Read-after-Write (RAW), Write-after-Write (WAW),
|
||||
or Write-after-Read (WAR) violations. This option is ignored if you
|
||||
are compiling for an Itanium A step processor
|
||||
(CONFIG_ITANIUM_ASTEP_SPECIFIC). If you're unsure, select Y.
|
||||
|
||||
config DISABLE_VHPT
|
||||
bool "Disable VHPT"
|
||||
depends on DEBUG_KERNEL
|
||||
help
|
||||
The Virtual Hash Page Table (VHPT) enhances virtual address
|
||||
translation performance. Normally you want the VHPT active but you
|
||||
can select this option to disable the VHPT for debugging. If you're
|
||||
unsure, answer N.
|
||||
|
||||
config IA64_DEBUG_CMPXCHG
|
||||
bool "Turn on compare-and-exchange bug checking (slow!)"
|
||||
depends on DEBUG_KERNEL
|
||||
help
|
||||
Selecting this option turns on bug checking for the IA-64
|
||||
compare-and-exchange instructions. This is slow! Itaniums
|
||||
from step B3 or later don't have this problem. If you're unsure,
|
||||
select N.
|
||||
|
||||
config IA64_DEBUG_IRQ
|
||||
bool "Turn on irq debug checks (slow!)"
|
||||
depends on DEBUG_KERNEL
|
||||
help
|
||||
Selecting this option turns on bug checking for the IA-64 irq_save
|
||||
and restore instructions. It's useful for tracking down spinlock
|
||||
problems, but slow! If you're unsure, select N.
|
||||
|
||||
config SYSVIPC_COMPAT
|
||||
bool
|
||||
depends on COMPAT && SYSVIPC
|
||||
default y
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,115 @@
|
||||
#
|
||||
# ia64/Makefile
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
#
|
||||
# Copyright (C) 1998-2004 by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
#
|
||||
|
||||
NM := $(CROSS_COMPILE)nm -B
|
||||
READELF := $(CROSS_COMPILE)readelf
|
||||
|
||||
export AWK
|
||||
|
||||
CHECKFLAGS += -m64 -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
|
||||
|
||||
OBJCOPYFLAGS := --strip-all
|
||||
LDFLAGS_vmlinux := -static
|
||||
LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds
|
||||
AFLAGS_KERNEL := -mconstant-gp
|
||||
EXTRA :=
|
||||
|
||||
cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
|
||||
-falign-functions=32 -frename-registers -fno-optimize-sibling-calls
|
||||
CFLAGS_KERNEL := -mconstant-gp
|
||||
|
||||
GCC_VERSION := $(call cc-version)
|
||||
GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
|
||||
CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
|
||||
|
||||
ifeq ($(GAS_STATUS),buggy)
|
||||
$(error Sorry, you need a newer version of the assember, one that is built from \
|
||||
a source-tree that post-dates 18-Dec-2002. You can find a pre-compiled \
|
||||
static binary of such an assembler at: \
|
||||
\
|
||||
ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
|
||||
endif
|
||||
|
||||
ifneq ($(shell if [ $(GCC_VERSION) -lt 0300 ] ; then echo "bad"; fi ;),)
|
||||
$(error Sorry, your compiler is too old. GCC v2.96 is known to generate bad code.)
|
||||
endif
|
||||
|
||||
ifeq ($(GCC_VERSION),0304)
|
||||
cflags-$(CONFIG_ITANIUM) += -mtune=merced
|
||||
cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
|
||||
endif
|
||||
|
||||
CFLAGS += $(cflags-y)
|
||||
head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
|
||||
|
||||
libs-y += arch/ia64/lib/
|
||||
core-y += arch/ia64/kernel/ arch/ia64/mm/
|
||||
core-$(CONFIG_IA32_SUPPORT) += arch/ia64/ia32/
|
||||
core-$(CONFIG_IA64_DIG) += arch/ia64/dig/
|
||||
core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/
|
||||
core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
|
||||
core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
|
||||
core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
|
||||
|
||||
drivers-$(CONFIG_PCI) += arch/ia64/pci/
|
||||
drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
|
||||
drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
|
||||
drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
|
||||
drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/
|
||||
drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/
|
||||
|
||||
boot := arch/ia64/hp/sim/boot
|
||||
|
||||
.PHONY: boot compressed check
|
||||
|
||||
all: compressed unwcheck
|
||||
|
||||
compressed: vmlinux.gz
|
||||
|
||||
vmlinux.gz: vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
unwcheck: vmlinux
|
||||
-$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $<
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
CLEAN_FILES += include/asm-ia64/.offsets.h.stamp vmlinux.gz bootloader
|
||||
|
||||
MRPROPER_FILES += include/asm-ia64/offsets.h
|
||||
|
||||
prepare: include/asm-ia64/offsets.h
|
||||
|
||||
arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
|
||||
|
||||
include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
|
||||
$(call filechk,gen-asm-offsets)
|
||||
|
||||
arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
|
||||
|
||||
include/asm-ia64/.offsets.h.stamp:
|
||||
mkdir -p include/asm-ia64
|
||||
[ -s include/asm-ia64/offsets.h ] \
|
||||
|| echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/offsets.h
|
||||
touch $@
|
||||
|
||||
boot: lib/lib.a vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
install: vmlinux.gz
|
||||
sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
|
||||
|
||||
define archhelp
|
||||
echo '* compressed - Build compressed kernel image'
|
||||
echo ' install - Install compressed kernel image'
|
||||
echo ' boot - Build vmlinux and bootloader for Ski simulator'
|
||||
echo '* unwcheck - Check vmlinux for invalid unwind info'
|
||||
endef
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1199
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# ia64/platform/dig/Makefile
|
||||
#
|
||||
# Copyright (C) 1999 Silicon Graphics, Inc.
|
||||
# Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
|
||||
#
|
||||
|
||||
obj-y := setup.o
|
||||
obj-$(CONFIG_IA64_GENERIC) += machvec.o
|
||||
@@ -0,0 +1,3 @@
|
||||
#define MACHVEC_PLATFORM_NAME dig
|
||||
#define MACHVEC_PLATFORM_HEADER <asm/machvec_dig.h>
|
||||
#include <asm/machvec_init.h>
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Platform dependent support for DIG64 platforms.
|
||||
*
|
||||
* Copyright (C) 1999 Intel Corp.
|
||||
* Copyright (C) 1999, 2001 Hewlett-Packard Co
|
||||
* Copyright (C) 1999, 2001, 2003 David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
* Copyright (C) 1999 VA Linux Systems
|
||||
* Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
|
||||
* Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
|
||||
*/
|
||||
#include <linux/config.h>
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/root_dev.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
/*
|
||||
* This is here so we can use the CMOS detection in ide-probe.c to
|
||||
* determine what drives are present. In theory, we don't need this
|
||||
* as the auto-detection could be done via ide-probe.c:do_probe() but
|
||||
* in practice that would be much slower, which is painful when
|
||||
* running in the simulator. Note that passing zeroes in DRIVE_INFO
|
||||
* is sufficient (the IDE driver will autodetect the drive geometry).
|
||||
*/
|
||||
char drive_info[4*16];
|
||||
|
||||
void __init
|
||||
dig_setup (char **cmdline_p)
|
||||
{
|
||||
unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
|
||||
|
||||
/*
|
||||
* Default to /dev/sda2. This assumes that the EFI partition
|
||||
* is physical disk 1 partition 1 and the Linux root disk is
|
||||
* physical disk 1 partition 2.
|
||||
*/
|
||||
ROOT_DEV = Root_SDA2; /* default to second partition on first drive */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
init_smp_config();
|
||||
#endif
|
||||
|
||||
memset(&screen_info, 0, sizeof(screen_info));
|
||||
|
||||
if (!ia64_boot_param->console_info.num_rows
|
||||
|| !ia64_boot_param->console_info.num_cols)
|
||||
{
|
||||
printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n");
|
||||
orig_x = 0;
|
||||
orig_y = 0;
|
||||
num_cols = 80;
|
||||
num_rows = 25;
|
||||
font_height = 16;
|
||||
} else {
|
||||
orig_x = ia64_boot_param->console_info.orig_x;
|
||||
orig_y = ia64_boot_param->console_info.orig_y;
|
||||
num_cols = ia64_boot_param->console_info.num_cols;
|
||||
num_rows = ia64_boot_param->console_info.num_rows;
|
||||
font_height = 400 / num_rows;
|
||||
}
|
||||
|
||||
screen_info.orig_x = orig_x;
|
||||
screen_info.orig_y = orig_y;
|
||||
screen_info.orig_video_cols = num_cols;
|
||||
screen_info.orig_video_lines = num_rows;
|
||||
screen_info.orig_video_points = font_height;
|
||||
screen_info.orig_video_mode = 3; /* XXX fake */
|
||||
screen_info.orig_video_isVGA = 1; /* XXX fake */
|
||||
screen_info.orig_video_ega_bx = 3; /* XXX fake */
|
||||
}
|
||||
|
||||
void __init
|
||||
dig_irq_init (void)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# ia64/platform/hp/common/Makefile
|
||||
#
|
||||
# Copyright (C) 2002 Hewlett Packard
|
||||
# Copyright (C) Alex Williamson (alex_williamson@hp.com)
|
||||
#
|
||||
|
||||
obj-y := sba_iommu.o
|
||||
obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += hwsw_iommu.o
|
||||
obj-$(CONFIG_IA64_GENERIC) += hwsw_iommu.o
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
||||
* Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
*
|
||||
* This is a pseudo I/O MMU which dispatches to the hardware I/O MMU
|
||||
* whenever possible. We assume that the hardware I/O MMU requires
|
||||
* full 32-bit addressability, as is the case, e.g., for HP zx1-based
|
||||
* systems (there, the I/O MMU window is mapped at 3-4GB). If a
|
||||
* device doesn't provide full 32-bit addressability, we fall back on
|
||||
* the sw I/O TLB. This is good enough to let us support broken
|
||||
* hardware such as soundcards which have a DMA engine that can
|
||||
* address only 28 bits.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
#include <asm/machvec.h>
|
||||
|
||||
/* swiotlb declarations & definitions: */
|
||||
extern void swiotlb_init_with_default_size (size_t size);
|
||||
extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent;
|
||||
extern ia64_mv_dma_free_coherent swiotlb_free_coherent;
|
||||
extern ia64_mv_dma_map_single swiotlb_map_single;
|
||||
extern ia64_mv_dma_unmap_single swiotlb_unmap_single;
|
||||
extern ia64_mv_dma_map_sg swiotlb_map_sg;
|
||||
extern ia64_mv_dma_unmap_sg swiotlb_unmap_sg;
|
||||
extern ia64_mv_dma_supported swiotlb_dma_supported;
|
||||
extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error;
|
||||
|
||||
/* hwiommu declarations & definitions: */
|
||||
|
||||
extern ia64_mv_dma_alloc_coherent sba_alloc_coherent;
|
||||
extern ia64_mv_dma_free_coherent sba_free_coherent;
|
||||
extern ia64_mv_dma_map_single sba_map_single;
|
||||
extern ia64_mv_dma_unmap_single sba_unmap_single;
|
||||
extern ia64_mv_dma_map_sg sba_map_sg;
|
||||
extern ia64_mv_dma_unmap_sg sba_unmap_sg;
|
||||
extern ia64_mv_dma_supported sba_dma_supported;
|
||||
extern ia64_mv_dma_mapping_error sba_dma_mapping_error;
|
||||
|
||||
#define hwiommu_alloc_coherent sba_alloc_coherent
|
||||
#define hwiommu_free_coherent sba_free_coherent
|
||||
#define hwiommu_map_single sba_map_single
|
||||
#define hwiommu_unmap_single sba_unmap_single
|
||||
#define hwiommu_map_sg sba_map_sg
|
||||
#define hwiommu_unmap_sg sba_unmap_sg
|
||||
#define hwiommu_dma_supported sba_dma_supported
|
||||
#define hwiommu_dma_mapping_error sba_dma_mapping_error
|
||||
#define hwiommu_sync_single_for_cpu machvec_dma_sync_single
|
||||
#define hwiommu_sync_sg_for_cpu machvec_dma_sync_sg
|
||||
#define hwiommu_sync_single_for_device machvec_dma_sync_single
|
||||
#define hwiommu_sync_sg_for_device machvec_dma_sync_sg
|
||||
|
||||
|
||||
/*
|
||||
* Note: we need to make the determination of whether or not to use
|
||||
* the sw I/O TLB based purely on the device structure. Anything else
|
||||
* would be unreliable or would be too intrusive.
|
||||
*/
|
||||
static inline int
|
||||
use_swiotlb (struct device *dev)
|
||||
{
|
||||
return dev && dev->dma_mask && !hwiommu_dma_supported(dev, *dev->dma_mask);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_init (void)
|
||||
{
|
||||
/* default to a smallish 2MB sw I/O TLB */
|
||||
swiotlb_init_with_default_size (2 * (1<<20));
|
||||
}
|
||||
|
||||
void *
|
||||
hwsw_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, int flags)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
|
||||
else
|
||||
return hwiommu_alloc_coherent(dev, size, dma_handle, flags);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
swiotlb_free_coherent(dev, size, vaddr, dma_handle);
|
||||
else
|
||||
hwiommu_free_coherent(dev, size, vaddr, dma_handle);
|
||||
}
|
||||
|
||||
dma_addr_t
|
||||
hwsw_map_single (struct device *dev, void *addr, size_t size, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
return swiotlb_map_single(dev, addr, size, dir);
|
||||
else
|
||||
return hwiommu_map_single(dev, addr, size, dir);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_unmap_single (struct device *dev, dma_addr_t iova, size_t size, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
return swiotlb_unmap_single(dev, iova, size, dir);
|
||||
else
|
||||
return hwiommu_unmap_single(dev, iova, size, dir);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
hwsw_map_sg (struct device *dev, struct scatterlist *sglist, int nents, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
return swiotlb_map_sg(dev, sglist, nents, dir);
|
||||
else
|
||||
return hwiommu_map_sg(dev, sglist, nents, dir);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
return swiotlb_unmap_sg(dev, sglist, nents, dir);
|
||||
else
|
||||
return hwiommu_unmap_sg(dev, sglist, nents, dir);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_sync_single_for_cpu (struct device *dev, dma_addr_t addr, size_t size, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
swiotlb_sync_single_for_cpu(dev, addr, size, dir);
|
||||
else
|
||||
hwiommu_sync_single_for_cpu(dev, addr, size, dir);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_sync_sg_for_cpu (struct device *dev, struct scatterlist *sg, int nelems, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
swiotlb_sync_sg_for_cpu(dev, sg, nelems, dir);
|
||||
else
|
||||
hwiommu_sync_sg_for_cpu(dev, sg, nelems, dir);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_sync_single_for_device (struct device *dev, dma_addr_t addr, size_t size, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
swiotlb_sync_single_for_device(dev, addr, size, dir);
|
||||
else
|
||||
hwiommu_sync_single_for_device(dev, addr, size, dir);
|
||||
}
|
||||
|
||||
void
|
||||
hwsw_sync_sg_for_device (struct device *dev, struct scatterlist *sg, int nelems, int dir)
|
||||
{
|
||||
if (use_swiotlb(dev))
|
||||
swiotlb_sync_sg_for_device(dev, sg, nelems, dir);
|
||||
else
|
||||
hwiommu_sync_sg_for_device(dev, sg, nelems, dir);
|
||||
}
|
||||
|
||||
int
|
||||
hwsw_dma_supported (struct device *dev, u64 mask)
|
||||
{
|
||||
if (hwiommu_dma_supported(dev, mask))
|
||||
return 1;
|
||||
return swiotlb_dma_supported(dev, mask);
|
||||
}
|
||||
|
||||
int
|
||||
hwsw_dma_mapping_error (dma_addr_t dma_addr)
|
||||
{
|
||||
return hwiommu_dma_mapping_error (dma_addr) || swiotlb_dma_mapping_error(dma_addr);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(hwsw_dma_mapping_error);
|
||||
EXPORT_SYMBOL(hwsw_map_single);
|
||||
EXPORT_SYMBOL(hwsw_unmap_single);
|
||||
EXPORT_SYMBOL(hwsw_map_sg);
|
||||
EXPORT_SYMBOL(hwsw_unmap_sg);
|
||||
EXPORT_SYMBOL(hwsw_dma_supported);
|
||||
EXPORT_SYMBOL(hwsw_alloc_coherent);
|
||||
EXPORT_SYMBOL(hwsw_free_coherent);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
|
||||
menu "HP Simulator drivers"
|
||||
depends on IA64_HP_SIM || IA64_GENERIC
|
||||
|
||||
config HP_SIMETH
|
||||
bool "Simulated Ethernet "
|
||||
|
||||
config HP_SIMSERIAL
|
||||
bool "Simulated serial driver support"
|
||||
|
||||
config HP_SIMSERIAL_CONSOLE
|
||||
bool "Console for HP simulator"
|
||||
depends on HP_SIMSERIAL
|
||||
|
||||
config HP_SIMSCSI
|
||||
tristate "Simulated SCSI disk"
|
||||
depends on SCSI
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# ia64/platform/hp/sim/Makefile
|
||||
#
|
||||
# Copyright (C) 2002 Hewlett-Packard Co.
|
||||
# David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
# Copyright (C) 1999 Silicon Graphics, Inc.
|
||||
# Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
|
||||
#
|
||||
|
||||
obj-y := hpsim_irq.o hpsim_setup.o hpsim.o
|
||||
obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
|
||||
|
||||
obj-$(CONFIG_HP_SIMETH) += simeth.o
|
||||
obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
|
||||
obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
|
||||
obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
|
||||
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# ia64/boot/Makefile
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
#
|
||||
# Copyright (C) 1998, 2003 by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
#
|
||||
|
||||
targets-$(CONFIG_IA64_HP_SIM) += bootloader
|
||||
targets := vmlinux.bin vmlinux.gz $(targets-y)
|
||||
|
||||
quiet_cmd_cptotop = LN $@
|
||||
cmd_cptotop = ln -f $< $@
|
||||
|
||||
vmlinux.gz: $(obj)/vmlinux.gz $(addprefix $(obj)/,$(targets-y))
|
||||
$(call cmd,cptotop)
|
||||
@echo ' Kernel: $@ is ready'
|
||||
|
||||
boot: bootloader
|
||||
|
||||
bootloader: $(obj)/bootloader
|
||||
$(call cmd,cptotop)
|
||||
|
||||
$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,gzip)
|
||||
|
||||
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
|
||||
LDFLAGS_bootloader = -static -T
|
||||
|
||||
$(obj)/bootloader: $(src)/bootloader.lds $(obj)/bootloader.o $(obj)/boot_head.o $(obj)/fw-emu.o \
|
||||
lib/lib.a arch/ia64/lib/lib.a FORCE
|
||||
$(call if_changed,ld)
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Copyright (C) 1998-2003 Hewlett-Packard Co
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
*/
|
||||
|
||||
#include <asm/asmmacro.h>
|
||||
|
||||
.bss
|
||||
.align 16
|
||||
stack_mem:
|
||||
.skip 16834
|
||||
|
||||
.text
|
||||
|
||||
/* This needs to be defined because lib/string.c:strlcat() calls it in case of error... */
|
||||
GLOBAL_ENTRY(printk)
|
||||
break 0
|
||||
END(printk)
|
||||
|
||||
GLOBAL_ENTRY(_start)
|
||||
.prologue
|
||||
.save rp, r0
|
||||
.body
|
||||
movl gp = __gp
|
||||
movl sp = stack_mem
|
||||
bsw.1
|
||||
br.call.sptk.many rp=start_bootloader
|
||||
END(_start)
|
||||
|
||||
/*
|
||||
* Set a break point on this function so that symbols are available to set breakpoints in
|
||||
* the kernel being debugged.
|
||||
*/
|
||||
GLOBAL_ENTRY(debug_break)
|
||||
br.ret.sptk.many b0
|
||||
END(debug_break)
|
||||
|
||||
GLOBAL_ENTRY(ssc)
|
||||
.regstk 5,0,0,0
|
||||
mov r15=in4
|
||||
break 0x80001
|
||||
br.ret.sptk.many b0
|
||||
END(ssc)
|
||||
|
||||
GLOBAL_ENTRY(jmp_to_kernel)
|
||||
.regstk 2,0,0,0
|
||||
mov r28=in0
|
||||
mov b7=in1
|
||||
br.sptk.few b7
|
||||
END(jmp_to_kernel)
|
||||
|
||||
|
||||
GLOBAL_ENTRY(pal_emulator_static)
|
||||
mov r8=-1
|
||||
mov r9=256
|
||||
;;
|
||||
cmp.gtu p6,p7=r9,r28 /* r28 <= 255? */
|
||||
(p6) br.cond.sptk.few static
|
||||
;;
|
||||
mov r9=512
|
||||
;;
|
||||
cmp.gtu p6,p7=r9,r28
|
||||
(p6) br.cond.sptk.few stacked
|
||||
;;
|
||||
static: cmp.eq p6,p7=6,r28 /* PAL_PTCE_INFO */
|
||||
(p7) br.cond.sptk.few 1f
|
||||
;;
|
||||
mov r8=0 /* status = 0 */
|
||||
movl r9=0x100000000 /* tc.base */
|
||||
movl r10=0x0000000200000003 /* count[0], count[1] */
|
||||
movl r11=0x1000000000002000 /* stride[0], stride[1] */
|
||||
br.cond.sptk.few rp
|
||||
1: cmp.eq p6,p7=14,r28 /* PAL_FREQ_RATIOS */
|
||||
(p7) br.cond.sptk.few 1f
|
||||
mov r8=0 /* status = 0 */
|
||||
movl r9 =0x100000064 /* proc_ratio (1/100) */
|
||||
movl r10=0x100000100 /* bus_ratio<<32 (1/256) */
|
||||
movl r11=0x100000064 /* itc_ratio<<32 (1/100) */
|
||||
;;
|
||||
1: cmp.eq p6,p7=19,r28 /* PAL_RSE_INFO */
|
||||
(p7) br.cond.sptk.few 1f
|
||||
mov r8=0 /* status = 0 */
|
||||
mov r9=96 /* num phys stacked */
|
||||
mov r10=0 /* hints */
|
||||
mov r11=0
|
||||
br.cond.sptk.few rp
|
||||
1: cmp.eq p6,p7=1,r28 /* PAL_CACHE_FLUSH */
|
||||
(p7) br.cond.sptk.few 1f
|
||||
mov r9=ar.lc
|
||||
movl r8=524288 /* flush 512k million cache lines (16MB) */
|
||||
;;
|
||||
mov ar.lc=r8
|
||||
movl r8=0xe000000000000000
|
||||
;;
|
||||
.loop: fc r8
|
||||
add r8=32,r8
|
||||
br.cloop.sptk.few .loop
|
||||
sync.i
|
||||
;;
|
||||
srlz.i
|
||||
;;
|
||||
mov ar.lc=r9
|
||||
mov r8=r0
|
||||
;;
|
||||
1: cmp.eq p6,p7=15,r28 /* PAL_PERF_MON_INFO */
|
||||
(p7) br.cond.sptk.few 1f
|
||||
mov r8=0 /* status = 0 */
|
||||
movl r9 =0x08122f04 /* generic=4 width=47 retired=8 cycles=18 */
|
||||
mov r10=0 /* reserved */
|
||||
mov r11=0 /* reserved */
|
||||
mov r16=0xffff /* implemented PMC */
|
||||
mov r17=0x3ffff /* implemented PMD */
|
||||
add r18=8,r29 /* second index */
|
||||
;;
|
||||
st8 [r29]=r16,16 /* store implemented PMC */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
;;
|
||||
st8 [r29]=r0,16 /* clear remaining bits */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
;;
|
||||
st8 [r29]=r17,16 /* store implemented PMD */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
mov r16=0xf0 /* cycles count capable PMC */
|
||||
;;
|
||||
st8 [r29]=r0,16 /* clear remaining bits */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
mov r17=0xf0 /* retired bundles capable PMC */
|
||||
;;
|
||||
st8 [r29]=r16,16 /* store cycles capable */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
;;
|
||||
st8 [r29]=r0,16 /* clear remaining bits */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
;;
|
||||
st8 [r29]=r17,16 /* store retired bundle capable */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
;;
|
||||
st8 [r29]=r0,16 /* clear remaining bits */
|
||||
st8 [r18]=r0,16 /* clear remaining bits */
|
||||
;;
|
||||
1: br.cond.sptk.few rp
|
||||
stacked:
|
||||
br.ret.sptk.few rp
|
||||
END(pal_emulator_static)
|
||||
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* arch/ia64/hp/sim/boot/bootloader.c
|
||||
*
|
||||
* Loads an ELF kernel.
|
||||
*
|
||||
* Copyright (C) 1998-2003 Hewlett-Packard Co
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
* Stephane Eranian <eranian@hpl.hp.com>
|
||||
*
|
||||
* 01/07/99 S.Eranian modified to pass command line arguments to kernel
|
||||
*/
|
||||
struct task_struct; /* forward declaration for elf.h */
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/elf.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include <asm/elf.h>
|
||||
#include <asm/intrinsics.h>
|
||||
#include <asm/pal.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/sal.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include "ssc.h"
|
||||
|
||||
struct disk_req {
|
||||
unsigned long addr;
|
||||
unsigned len;
|
||||
};
|
||||
|
||||
struct disk_stat {
|
||||
int fd;
|
||||
unsigned count;
|
||||
};
|
||||
|
||||
extern void jmp_to_kernel (unsigned long bp, unsigned long e_entry);
|
||||
extern struct ia64_boot_param *sys_fw_init (const char *args, int arglen);
|
||||
extern void debug_break (void);
|
||||
|
||||
static void
|
||||
cons_write (const char *buf)
|
||||
{
|
||||
unsigned long ch;
|
||||
|
||||
while ((ch = *buf++) != '\0') {
|
||||
ssc(ch, 0, 0, 0, SSC_PUTCHAR);
|
||||
if (ch == '\n')
|
||||
ssc('\r', 0, 0, 0, SSC_PUTCHAR);
|
||||
}
|
||||
}
|
||||
|
||||
#define MAX_ARGS 32
|
||||
|
||||
void
|
||||
start_bootloader (void)
|
||||
{
|
||||
static char mem[4096];
|
||||
static char buffer[1024];
|
||||
unsigned long off;
|
||||
int fd, i;
|
||||
struct disk_req req;
|
||||
struct disk_stat stat;
|
||||
struct elfhdr *elf;
|
||||
struct elf_phdr *elf_phdr; /* program header */
|
||||
unsigned long e_entry, e_phoff, e_phnum;
|
||||
register struct ia64_boot_param *bp;
|
||||
char *kpath, *args;
|
||||
long arglen = 0;
|
||||
|
||||
ssc(0, 0, 0, 0, SSC_CONSOLE_INIT);
|
||||
|
||||
/*
|
||||
* S.Eranian: extract the commandline argument from the simulator
|
||||
*
|
||||
* The expected format is as follows:
|
||||
*
|
||||
* kernelname args...
|
||||
*
|
||||
* Both are optional but you can't have the second one without the first.
|
||||
*/
|
||||
arglen = ssc((long) buffer, 0, 0, 0, SSC_GET_ARGS);
|
||||
|
||||
kpath = "vmlinux";
|
||||
args = buffer;
|
||||
if (arglen > 0) {
|
||||
kpath = buffer;
|
||||
while (*args != ' ' && *args != '\0')
|
||||
++args, --arglen;
|
||||
if (*args == ' ')
|
||||
*args++ = '\0', --arglen;
|
||||
}
|
||||
|
||||
if (arglen <= 0) {
|
||||
args = "";
|
||||
arglen = 1;
|
||||
}
|
||||
|
||||
fd = ssc((long) kpath, 1, 0, 0, SSC_OPEN);
|
||||
|
||||
if (fd < 0) {
|
||||
cons_write(kpath);
|
||||
cons_write(": file not found, reboot now\n");
|
||||
for(;;);
|
||||
}
|
||||
stat.fd = fd;
|
||||
off = 0;
|
||||
|
||||
req.len = sizeof(mem);
|
||||
req.addr = (long) mem;
|
||||
ssc(fd, 1, (long) &req, off, SSC_READ);
|
||||
ssc((long) &stat, 0, 0, 0, SSC_WAIT_COMPLETION);
|
||||
|
||||
elf = (struct elfhdr *) mem;
|
||||
if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) != 0) {
|
||||
cons_write("not an ELF file\n");
|
||||
return;
|
||||
}
|
||||
if (elf->e_type != ET_EXEC) {
|
||||
cons_write("not an ELF executable\n");
|
||||
return;
|
||||
}
|
||||
if (!elf_check_arch(elf)) {
|
||||
cons_write("kernel not for this processor\n");
|
||||
return;
|
||||
}
|
||||
|
||||
e_entry = elf->e_entry;
|
||||
e_phnum = elf->e_phnum;
|
||||
e_phoff = elf->e_phoff;
|
||||
|
||||
cons_write("loading ");
|
||||
cons_write(kpath);
|
||||
cons_write("...\n");
|
||||
|
||||
for (i = 0; i < e_phnum; ++i) {
|
||||
req.len = sizeof(*elf_phdr);
|
||||
req.addr = (long) mem;
|
||||
ssc(fd, 1, (long) &req, e_phoff, SSC_READ);
|
||||
ssc((long) &stat, 0, 0, 0, SSC_WAIT_COMPLETION);
|
||||
if (stat.count != sizeof(*elf_phdr)) {
|
||||
cons_write("failed to read phdr\n");
|
||||
return;
|
||||
}
|
||||
e_phoff += sizeof(*elf_phdr);
|
||||
|
||||
elf_phdr = (struct elf_phdr *) mem;
|
||||
|
||||
if (elf_phdr->p_type != PT_LOAD)
|
||||
continue;
|
||||
|
||||
req.len = elf_phdr->p_filesz;
|
||||
req.addr = __pa(elf_phdr->p_paddr);
|
||||
ssc(fd, 1, (long) &req, elf_phdr->p_offset, SSC_READ);
|
||||
ssc((long) &stat, 0, 0, 0, SSC_WAIT_COMPLETION);
|
||||
memset((char *)__pa(elf_phdr->p_paddr) + elf_phdr->p_filesz, 0,
|
||||
elf_phdr->p_memsz - elf_phdr->p_filesz);
|
||||
}
|
||||
ssc(fd, 0, 0, 0, SSC_CLOSE);
|
||||
|
||||
cons_write("starting kernel...\n");
|
||||
|
||||
/* fake an I/O base address: */
|
||||
ia64_setreg(_IA64_REG_AR_KR0, 0xffffc000000UL);
|
||||
|
||||
bp = sys_fw_init(args, arglen);
|
||||
|
||||
ssc(0, (long) kpath, 0, 0, SSC_LOAD_SYMBOLS);
|
||||
|
||||
debug_break();
|
||||
jmp_to_kernel((unsigned long) bp, e_entry);
|
||||
|
||||
cons_write("kernel returned!\n");
|
||||
ssc(-1, 0, 0, 0, SSC_EXIT);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user