summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
AgeCommit message (Collapse)Author
2019-01-15Remove an unused variable. Spotted by clang.Visa Hankala
OK miod@
2019-01-14Remove obsolete symbols.sort target.Visa Hankala
OK deraadt@
2018-12-13Use a faster, more reliable way to figure out how many TLB entries areVisa Hankala
available on RM7000 processors. From miod@
2018-12-10Clean up the mec(4) MII read/write routines a bit.Visa Hankala
The PHY register offsets are adjusted because the registers are accessed using 64-bit loads and stores. From miod@
2018-12-10Fix phy discovery on O2 systems.Visa Hankala
After a cold boot, the mii bus appears to take some time to initialize; the phy does not answer to address 8 but to a larger address (10 or 11), then, after being reset, to its correct address of 8. So the kernel would discover the phy at a wrong address, attach it, and after it gets reset, reading from the phy at the wrong address would return either all bits clear or all bits set, confusing the link speed logic without any way to recover. Work around the issue by resetting all phys found when the interface is reset for the first time. Thus, by the time mii_attach() runs and walks the bus again, the phy will answer at the right address. From miod@
2018-12-03Do not process the top 32 bits of the 64 bit interrupt mask registerVisa Hankala
on the O2. The CRIME interrupt controller only has 32 interrupt sources. From miod@
2018-12-03Remove the unused interrupt type (edge/level) from the mace interruptVisa Hankala
handler registration. The code is inherited from isa(4), but on the O2, although some interrupt sources on CRIME are edge-triggered, all the MACE interrupts are level-triggered. From miod@
2018-10-31Bring over gapdummy.c changes from amd64/amr64/armv7/i386.Mark Kettenis
ok deraadt@, mortimer@, visa@
2018-09-14add gapdummy.c to the "clean" target like other generated filesChristian Weisgerber
ok visa@ jsg@ phessler@
2018-08-20Remove unused spllock().Visa Hankala
OK deraadt@ mpi@
2018-03-02Fix the locating of the OpenBSD disklabel on media with 2048 byteVisa Hankala
sectors (installXX.iso). The change to properly locate the disklabel, introduced after 6.0, assumed incorrectly 512 byte sectors. Diff from miod@
2018-02-24Declare ci_ipl volatile to prevent the compiler from optimizingVisa Hankala
or reordering accesses to the variable. Assume that the assembler preserves the correct sequence of instructions, which allows the removal of the explicit noreorder/reorder toggles from the C code. With ci_ipl being volatile, drop mips_sync() calls that follow the accesses of the variable. The sync is redundant as a compiler barrier. In addition, the MIPS64 CPU designs should not need the sync for pipeline or write buffer control. According to miod@, the use of the instruction is a carryover from code targeting early MIPS designs that lack tight integration with the cache and write buffer. Discussed with and testing help from miod@. Tested on CN5020, CN6120, CN7130, CN7360, Loongson 2F and 3A1000, R4400, R8000, R10000 and R16000.
2018-02-14prune files.* entries that refer to files not in treeJonathan Gray
ok krw@ mpi@
2018-02-09Check for the existence of /bsd before trying to back it up to /obsd.Theo Buehler
Fixes 'make install' when /bsd is not present for some reason. ok rob florian, "fine with me" deraadt
2018-01-29Let the interrupt subsystem allocate memory for the IPI handle,Visa Hankala
to drop remaining uses of `ci_ipiih'. In addition, mark the IPI handler MP-safe.
2018-01-27Sync the nam2blk entries with the bdevsw table, which is theChristian Weisgerber
definitive list of block devices supported on an architecture. ok kettenis@ deraadt@
2018-01-22Include <sys/mutex.h> instead of <machine/mutex.h>Martin Pieuchot
required by upcoming MI mutex change.
2018-01-11Add size for free.Visa Hankala
OK mpi@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-11-04Since rev 1.502 of rc(8) it creates a /bsd.booted hard link. At theFlorian Obser
end of rc we call reorder_kernel which creates a /obsd hard link to the same kernel. In the past obsd was only created when doing a manual make install in the kernel sources. There is no need for two backup hard links during boot, rearange the kernel Makefiles to restore previous behaviour and thus stopping reorder_kernel from scribbling over /obsd. Makes muscle memory of some kernel developers work again: /obsd can serve as a known good kernel; and there was much rejoycing... Discussed at length with benno, rpe, phessler and tb at p2k17. Seems like a good idea to deraadt. OK benno, phessler, rpe, tb
2017-09-28When option DDB_STRUCTINFO was removed from the kernel, too much fromPatrick Wildt
the kernel makefiles was removed which lead to C files not being re- compiled when a dependency changed. This can lead to panics in odd places and generally a broken system. ok deraadt@
2017-09-12Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarMartin Pieuchot
functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-08-28swap ualea for urngJasper Lievisse Adriaanse
2017-08-12Use ctfstrip(1) by default to strip kernels.Martin Pieuchot
ok deraadt@, jasper@
2017-08-12Add a dummy (for now) <machine/reloc.h> for mips64 to fix build.Visa Hankala
OK guenther@
2017-07-30Define MAXCPUS per mips64 port.Visa Hankala
2017-07-19Fix memory leak in iec_get(). If MCLGET fails free the mbuf as well.Claudio Jeker
Found by Ilja Van Sprundel OK bluhm@ deraadt@
2017-07-18Stop automatically regenerating gap.o (and hence linking a new kernel)Theo Buehler
whenever make is issued. Only do this when there are actual source changes below /sys. This restores the behavior prior to the KARL implementation. Problem noticed and patiently explained by mpi implementation with a lot of help from espie ok mpi, espie, deraadt
2017-07-16Pass the linker from make environment to makegap.sh. This is (only)Visa Hankala
a partial solution to cross compiling the kernel with KARL. OK deraadt@ a while ago
2017-06-29put SYSTEM_SWAP_DEP out of its misery, it died in 1997, along with config.oldMarc Espie
"go for it" deraadt@
2017-06-25dull dependency for copying makegap.sh to obj, so that installsTheo de Raadt
without src and comp work. That is what we've designed for, but since we always have src and comp on our systems it is so easy to slide... problem first noted by rpe.
2017-06-22Generate a gap.link script, and use that to generate gap.o. On multi-ABITheo de Raadt
architectures we must also link against a gapdummy.o to repair the ABI of the resulting .o file. Woe is me. Also repair install: target to update the linkkit & hash when a kernel is installed. ok rpe tb mlarkin and tested by others also
2017-06-13newbsd: target which re-links a kernel. We cannot use the bsd: targetTheo de Raadt
since it has source dependencies, and relinking doesn't have any. Also the bsd: target is created by config(8)... worked on with rpe.
2017-06-11make vers.o not depend on gap.o using a trick, because it is piece ofTheo de Raadt
fiction participating only in the linkphase. tricks from rpe and espie
2017-06-11Use umask 077 instead of cp -p when installing the kernel as root.Alexander Bluhm
Otherwise owner of /bsd could be the build user with permissions inherited from the compile directory. OK deraadt@ tb@
2017-06-11Define register_splx_handler() in one place.Visa Hankala
2017-06-08Move loongson/octeon/sgi unmap_startup() under arch/mips64.Visa Hankala
2017-06-08Split early startup code out of locore.S into locore0.S. Adjust linkVisa Hankala
run so that this locore0.o is always at the start of the executable. But randomize the link order of all other .o files in the kernel, so that their exec/rodata/data/bss segments land all over the place. Late during kernel boot, smash the startup code with traps so that it does not point to the other randomly placed code. It has be smashed, because sgi runs in the kseg0 or xkphys space. As a result, the internal layout of every newly build bsd kernel is different from past kernels. Internal relative offsets are not known to an outside attacker. Ramdisk kernels cannot be compiled like this, because they are gzip'd. When the internal pointer references change, the compression dictionary bloats and results in poorer compression.
2017-06-05The arm* architectures edit the ld.script, creating a copy in the compileTheo de Raadt
directories. Copy it in the same way on other architectures, for the same effect. Something upcoming will want that file there anyways.
2017-06-03Create gap.S and gap.o with umask 077. Create lorder and bsd* with umask 007.Theo de Raadt
Prying eyes cannot look at the kernels in the compile directory. ok tb rpe, kernel developers seem unimpacted
2017-05-11The device_to_pa routine really isn't needed. We always have physicalVisa Hankala
addresses. While there, pave the way for BUS_DMA_64BIT (not working yet). Diff from miod@; OK dlg@
2017-05-08add a BUS_DMA_64BIT flag to bus_dma on all our archs.David Gwynne
this is so drivers can advertise that they can handle 64 dma addresses to the platform. it may choose to handle dmamaps differently based on this flag. tweaks and ok tom@ ok kettenis@
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-04-02printf format strings should be literals. Reminded by clang.Visa Hankala
2017-03-18Build mips64 kernels with -ffreestanding.Visa Hankala
OK kettenis@
2017-03-15Fix building profiling kernels by passing the -p flag to config(8)Theo Buehler
if the kernel's name ends in .PROF. problem reported by jmc via mpi ok mpi
2017-03-08Fix logic in the driver preventing it to receive broadcast framesMartin Pieuchot
before configuring an address. Make dhclient(8) work on sq(4). Problem reported by Frank Scheiner, diff from miod@