summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
AgeCommit message (Collapse)Author
2019-08-04crank version, following fchmod changeTheo de Raadt
2019-08-03In the bootblocks, after discovering and opening /bsd.upgrade, fchmod -xTheo de Raadt
so the file cannot be re-executed upon the next boot. This provides a stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade. Now various forms of upgrade failure will reboot into /bsd, which is probably more recoverable. Performing fchmod -x depends on (1) use of MI boot.c (not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality in the IO layer. Most architectures have this support now. Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will remain in the tree while refinements happen for some of the laggard architectures. based upon a discussion florian tested in snapshots for more than a week without any complaints
2019-06-21Further improve the filesystem stability of kernel installation by KARL.Theo de Raadt
Use install -F to instead of cp, for fsync(2). Coupled with the new sync(8) in the reorder_kernel script, the window for a incomplete /bsd file on-disk due to a crash has now shrunk substantially. Discussion with kettenis, millert and tedu
2019-05-08Enable ucrcom(4) on all architectures that have uslcom(4).Mark Kettenis
ok deraadt@
2019-04-20libsa's memcpy() is actually memmove(). make a proper memmove(), and giveTheo de Raadt
memcpy() correct behaviour. This also brings the bcopy() macro into line.
2019-04-14Instead of using COPTS=-Oz (and similar) in make environment to forceTheo de Raadt
tightly-built ramdisk kernels, set the option in per-arch Makefile.inc based upon SMALL_KERNEL
2019-04-14Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 toJonathan Gray
linux 4.19.34. Adds support for more Intel hardware: Broxton/Apollo Lake (was is_preliminary in 4.4) Amber Lake (another Kaby Lake refresh) Gemini Lake Coffee Lake Whiskey Lake Cannon Lake (though no hardware with Intel graphics ever shipped) Ice Lake (alpha support, hardware not released) This does not add support for new radeon hardware on the AMD side as newer radeons have a different kernel driver (amdgpu). Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping and a bunch of other developers for testing.
2019-04-10crank versionsTheo de Raadt
2019-04-10change marks[] array to uint64_t, so the code can track full 64-bitTheo de Raadt
details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
2019-04-08crank version; looks good deraadtFlorian Obser
2019-04-01compile fix from visaTed Unangst
2019-04-01fast track ddb> reboot command to skip anything which might panic again.Ted Unangst
ok deraadt
2019-03-17Move intr_barrier(9) to the platform level so that it can be customized.Visa Hankala
2019-01-22flense more trailing whitespacePeter Hessler
2019-01-22remove trailing whitespace in the Laptop Package part of the license text.Peter Hessler
no words or punctation were modified.
2019-01-19Add a pwraction sysctl that controls what the power button does on acpi.Ted Unangst
By default, nothing changes -- shutdown is initiated. But allows turning power button into a sleep button if desired. (grudging) ok from a few parties
2019-01-14Remove obsolete symbols.sort target.Visa Hankala
OK deraadt@
2019-01-07tweak ohci_checkrev so it doesnt print a leading comma and space.David Gwynne
it assumes that it always followed an interrupt string, but we don't print that on fdt. having the bus responsible for the whitespace means the fdt glue can print a colon to separate the bus info from checkrev output, while every other glue keeps the comma. ok deraadt@
2018-10-31Bring over gapdummy.c changes from amd64/amr64/armv7/i386.Mark Kettenis
ok deraadt@, mortimer@, visa@
2018-09-26Fix controller name.Visa Hankala
2018-09-14add gapdummy.c to the "clean" target like other generated filesChristian Weisgerber
ok visa@ jsg@ phessler@
2018-08-22Enable uscom(4) where uslcom(4) is already present.Martin Pieuchot
Based on a submisison from Jan Klemkow.
2018-08-20Remove unused spllock().Visa Hankala
OK deraadt@ mpi@
2018-06-21Save and restore retguard area during hibernate unpack. This copies theMike Larkin
original retguard data to the piglet and bcopys it back in place immediately before resuming via the ACPI Sx trampoline. ok deraadt, guenther, tested by many.
2018-06-03Enable bwfm(4) for USB devices on RAMDISK as well.Frederic Cambus
Requested by visa@.
2018-05-31Enable bwfm(4) on Loongson for USB devices.Frederic Cambus
Tested on a Lemote Yeeloong 8101B. OK visa@
2018-04-24Enable em(4) on loongson.Visa Hankala
2018-04-20Add a workaround that lets loongson bootblocks work with PMON thatVisa Hankala
uses the O32 calling convention. Such firmware comes at least on some Loongson 3A development boards. This differs from the LS2F-based machines made by Lemote whose PMON uses the GCC O64 calling convention.
2018-04-20Make loongson bootblocks use disklabel duid instead of PMON device nameVisa Hankala
when indicating the boot device to the kernel. This should reduce ambiguity in root device selection.
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-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-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-23Always lock the kernel lock with non-MP-safe interrupt handlers.Visa Hankala
Suggested by kettenis@
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-08-28swap ualea for urngJasper Lievisse Adriaanse
2017-08-26Use macros for Config1 bits.Visa Hankala
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-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-07-12remove CPU_LIDSUSPEND/machdep.lidsuspendMartin Natano
"fire away!" tedu
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.