summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/include
AgeCommit message (Collapse)Author
2010-04-28Storeing current cpu_info address into LLAddr register, for curcpu().Takuya ASADA
Instead of previous implementation, we won't use physical cpuid to fetch curcpu(). This requires to implement IP27/35 SMP. Implemented getcurcpu() and setcurcpu() for it, smp_malloc() renamed alloc_contiguous_pages() because now it only allocate by page. ok miod@
2010-04-06Split the device_register() code responsible for boot path recognition intoMiod Vallat
two distinct sets of routines: one for the ARCBios-compatible path used on non-KL systems (such as O2 and Octane), and one for the KL system using dksc() paths. When trying to match a dksc() path, walk the KL configuration of the whole system until the dksc controller is found; since the controller numbers are not assigned sequentially and contiguously, the old code would not work on complex systems (such as when booting from controller #6 when #3 to #5 are unaffected).
2010-04-06Add more KL grovelling routines: one routine to enumerate on all nodes,Miod Vallat
and routines to turn a KL console and a KL component structs, respectively, into struct sgi_device_location for further device identification. XXX Due to the way PCI devices are numbered on PIC buses, this code is tainted XXX by knowledge about PIC widgets, to compensate. I have considered changing XXX xbridge(4) to have our PCI device numbering match KL on PIC-connected XXX devices, but I expect this to be even uglier. This is not settled yet.
2010-04-06Introduce struct sgi_device_location to carry enough information to uniquelyMiod Vallat
identify a given device by its physical connection, and add a lazy compare routine. This will be used shortly.
2010-04-04Fix bus_space_{read,write}_raw_region_# operation.Miod Vallat
2010-03-21Update KL structure definitions to match IP35 use of previously unused fields.Miod Vallat
No functional change yet.
2010-03-07On Origin-like systems, get glass console information (if any) from theMiod Vallat
fake ARCBios component structures associated to the KL configuration. The ARCBios data tells us if the device is the output console, and the KL component data tells us its node and widget numbers.
2010-01-18Define IPL_SCHED as IPL_CLOCK, not IPL_HIGH.Miod Vallat
2010-01-09Move cache information from global variables to per-cpu_info fields; thisMiod Vallat
allows processors with different cache sizes to be used. Cache management routines now take a struct cpu_info * as first parameter.
2010-01-09Define struct cpu_hwinfo, to hold hardware specific information about eachMiod Vallat
processor (instead of sys_config.cpu[]), and pass it in the attach_args when attaching cpu devices. This allows per-cpu information to be gathered late in the bootstrap process, and not be limited by an arbitrary MAX_CPUS limit; this will suit IP27 and IP35 systems better. While there, use this information to make sure delay() uses the speed information from the cpu it is invoked on.
2009-12-28Fix compile error caused from previous commitTakuya ASADA
2009-12-28MP-safe pmap implemented, enable IPI in interrupt handler to avoid deadlock.Takuya ASADA
ok miod@
2009-12-25Pass both the virtual address and the physical address of the memory rangeMiod Vallat
when invoking the cache functions. The physical address is needed when operating on physically-indexed caches, such as the L2 cache on Loongson processors. Preprocessor abuse makes sure that the physical address computation gets compiled out when running on a kernel compiled for virtually-indexed caches only, such as the sgi kernel.
2009-12-12Switch page size from 4KB to 16KB on R10k kernels without R5k supportMiod Vallat
(i.e. IP27 and IP30 sgi kernels).
2009-12-08Unconditionnaly move kernel virtual memory space to XKSEG, now that previousMiod Vallat
context.S fixes allows these settings to work for kernels linked in CKSEG0.
2009-12-07Support for 16KB page size kernels; page size is now set in <machine/param.h>Miod Vallat
rather than <mips64/param.h>. For now, kernels are kept at 4KB to give people some time to build 16KB compatible binaries; this will change before the end of this release cycle. Use of 16KB page size kernels yields a 18% speedup (which, offset by the 1.6% slowdown caused by the pmap changes, yields a 16.6% overall speedup).
2009-12-02IPL_IPI priority raised to IPL_IPI > IPL_HIGH for handling TLB shootdown.Takuya ASADA
ok miod@
2009-11-30Use the new Elfxx_Phdr check hook to prevent loading a kernel not compiledMiod Vallat
for the platform we are running on (i.e. trying to boot e.g. bsd.IP32 on an IP27 machine).
2009-11-26Now IPI can interrupt to clock interrupt handler.Takuya ASADA
It prevents deadlock with TLB shootdown and clock interrupt. ok miod@
2009-11-25IP30 IPI implementation.Takuya ASADA
Also few xheart modification for SMP. ok miod@
2009-11-25Allow xbow_intr_establish() callers to provide optional storage for theMiod Vallat
struct intrhand, instead of having it malloc()'ed.
2009-11-22grammar fixes in comments; from bradMiod Vallat
2009-11-22Allow mips ports to override VM_{MIN,MAX}_KERNEL_ADDRESS, and provide theMiod Vallat
address as a kernel variable for use by libkvm. On sgi IP27 and IP30 kernels, use XKSEG instead of CKSSEG; this will allow kernel KVM size to grow in the future if necessary.
2009-11-21mplock, rw_cas implementedTakuya ASADA
ok miod@
2009-11-12More unused fields in struct sys_rec.Miod Vallat
2009-11-07In case an ioc(4) device has lost its NIC component, do not recognize itMiod Vallat
as the onboard ioc device, if one has already been found on this node. Also, on Origin 300, do not attempt to attach the PS/2 controller on the onboard ioc(4) since PS/2 ports are not wired.
2009-11-07Change sgi system identification from a single system type list, to a smallerMiod Vallat
system type list (which really is the system family) and a subsystem type. No functional change yet.
2009-11-04MP safe mutex.Takuya ASADA
ok miod@
2009-10-30Support IP30 secondary cpu bootup. ok miod@Takuya ASADA
2009-10-26Rename struct confargs to struct mainbus_attach_args for consistency and alsoMiod Vallat
to prevent further abuse of it.
2009-10-26Get rid of unused `frame' member of struct intrhand; only hardclock() needsMiod Vallat
a frame and clock interrupt doesn't need a struct intrhand.
2009-10-26Better crime/mace interrupt handling; interrupt information is no longerMiod Vallat
specified in the kernel configuration file, but is provided by macebus(4) as part of the child device attachment args, and provide both crime and mace interrupt bitmasks; this allows us to only really enable interrupt sources we care about, and to avoid invoking interrupt handler we don't need to for the few mace interrupts multiplexed at the crime level.
2009-10-22Completely overhaul interrupt handling on sgi. Cpu state now only stores aMiod Vallat
logical IPL level, and per-platform (IP27/IP30/IP32) code will from the necessary hardware mask registers. This allows the use of more than one interrupt mask register. Also, the generic (platform independent) interrupt code shrinks a lot, and the actual interrupt handler chains and masking information is now per-platform private data. Interrupt dispatching is generated from a template; more routines will be added to the template to reduce platform-specific changes and share as much code as possible. Tested on IP27, IP30, IP32 and IP35.
2009-10-22The recent cleanups make blatantly visible that the pending_int handlerMiod Vallat
does almost exactly what splx() is doing if ipending is zero, and triggers soft interrupts as well. So don't bother checking for ipending in splx, and always invoke pending_int, which gets renamed as splx_handler for consistency.
2009-10-22unifdef -DIMASK_EXTERNAL to the mips code. Support for interrupt masking atMiod Vallat
coprocessor 0 sr level might come back in the future if hardware support requires it, but at the moment it's getting in the way of larger changes. ``In the Attic, noone can hear you scream''
2009-10-22Replace intrmask_t with uint32_t. This types only describes interrupt masksMiod Vallat
in the coprocessor 0 status register (coupled with ICR on rm7k/rm9k), and may be completely alien to real hardware interrupt masks, so don't make things unnecessary confusing.
2009-10-21Replace IP32 hw_setintrmask() .S routine with a two line C routine.Miod Vallat
2009-10-16Get serial console speed from prom, and use it instead of hardcoding 9600 bps,Miod Vallat
on all systems but O2 (to catch up soon). Also use the IOC4 MCR register to figure out the IOC4 clock, instead of checking the widget control register, to be consistent with iof(4).
2009-10-14Add some comments to explain why the DMA32 physseg is really 2**31 bytesMiod Vallat
long. Prompted by deraadt@ long ago.
2009-10-08Recognize more brick types and probe fooX bricks in the same order asMiod Vallat
foo bricks (they differ by having PCI-X bridges instead of PCI bridges but are otherwise built the same)
2009-10-07ipending, cpl moved into cpu_infoTakuya ASADA
OK miod@
2009-09-30curproc, curprocpaddr moved into cpu_infoTakuya ASADA
OK miod@
2009-09-27Add an implementation of IRIX-compatible cacheflush() routine to mips ports,Miod Vallat
needed for gcc -ftrampoline operation as well as by some third-party software. Although the implementation uses the sysarch() sysctl, the wrapper is added to libc as it was a direct system call (which it is on IRIX).
2009-09-15cpu status flag, cpuid added to cpu_info.Takuya ASADA
cpu_info pointer array, cpu_info iterator, cpu_number() implementation added. constraint modifier fixed in lock.h to output correct assembly. calling proc_trampoline_mp in exception.S.
2009-08-22Constify the what/name parameter of pci_intr_establish().Michael Knudsen
Tested by myself, sthen, oga, kettenis, and jasper. Input from sthen and jasper. ok kettenis (Manpage follows shortly.)
2009-08-09Add a dummy <machine/conf.h> so that MI code can rely upon its existence.Miod Vallat
2009-08-06Remove _InvalidateICachePage cache op, it isn't used by anything.Miod Vallat
2009-07-30Get rid of the obsolet BUS_BARRIER_xxx constants for bus_space_barrier(), onlyMiod Vallat
provide and use BUS_SPACE_BARRIER_xxx.
2009-07-26Make sure all platforms understand the flags argument of bus_space_map() andMiod Vallat
bus_space_alloc() as a bitmask of flags, and not a boolean controlling cacheability; and make sure the three MI BUS_SPACE_MAP_xxx values documented in the manual page are defined on all platforms as well.
2009-07-23Get rid of bus_mem_add_mapping().Miod Vallat