summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/bus.h
Commit message (Collapse)AuthorAgeFilesLines
* AMD64 physical space is much larger than i386, de-i386 the bus_space andpeter2003-05-121-5/+5
| | | | | | | | bus_dma MD code for AMD64. (And a trivial ifdef update in dev/kbd because of this). More updates are needed here to take advantage of the 64 bit instructions. Approved by: re (blanket amd64/*)
* Commit MD parts of a loosely functional AMD64 port. This is based onpeter2003-05-011-7/+1
| | | | | | | | | | | | | | | | | | | | | | a heavily stripped down FreeBSD/i386 (brutally stripped down actually) to attempt to get a stable base to start from. There is a lot missing still. Worth noting: - The kernel runs at 1GB in order to cheat with the pmap code. pmap uses a variation of the PAE code in order to avoid having to worry about 4 levels of page tables yet. - It boots in 64 bit "long mode" with a tiny trampoline embedded in the i386 loader. This simplifies locore.s greatly. - There are still quite a few fragments of i386-specific code that have not been translated yet, and some that I cheated and wrote dumb C versions of (bcopy etc). - It has both int 0x80 for syscalls (but using registers for argument passing, as is native on the amd64 ABI), and the 'syscall' instruction for syscalls. int 0x80 preserves all registers, 'syscall' does not. - I have tried to minimize looking at the NetBSD code, except in a couple of places (eg: to find which register they use to replace the trashed %rcx register in the syscall instruction). As a result, there is not a lot of similarity. I did look at NetBSD a few times while debugging to get some ideas about what I might have done wrong in my first attempt.
* Add the following functions/macros to support byte order conversions andtmm2002-02-271-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike
* - Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h.nyan2001-10-061-0/+1
| | | | | (bus_dma.h is repo-copied from bus_at386.h) - Added '#include <machine/bus_dma.h>' into bus.h for backward compatibility.
* Added indirect pio into the bus space stuff for the NEC PC-98. bus.hkato2000-03-291-1263/+17
| | | | | | | | | | | includes one of bus_at386.h and bus_pc98.h. Becuase only bus_pc98.h supports indirect pio and bus_at386.h is identical to old bus.h, there is no functional change in PC-AT's kernels. That is, it cannot cause performance loss. Submitted by: nyan Reviewed by: imp bde and luoqi provided useful comments for earlier version.
* Fix clobbers so that GENERIC may compile with GCC 2.95.2.obrien1999-11-141-83/+84
| | | | | | | | | | | | | | | | | | | | Historically, the documentation of extended asm was lacking, namely you should NOT specify the same register as an input, and a clobber. If the register is clobbered, it should be specified as an output as well, e.g., by linking input and output through the "number" notation. (Beware of lvalues, some local variables needed...) URL:http://egcs.cygnus.com/faq.html In versions up to egcs-1.1.1, the compiler did not even warn about it, but it was liable to output bad code. Newer egcs are pickier and simply refuse to swallow such code. Note, since *addr changes, it needs to be an output operand. We might be excessive in saying that all memory has changed. Obtained from: OpenBSD w/extra thanks to Marc Espie <Marc.Espie@liafa.jussieu.fr>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Improve compatibility with other systems by changing the defaultimp1999-07-031-1/+10
| | | | | | | | | | | | | | | | | | | | | behavior slightly. If machine/bus.h is included, but neither bus_memio.h nor bus_pio.h are included, then behave as if both were included. This won't change existing drivers, all of which include one or more of bus_{p,mem}io.h, but will allow drivers from other systems to come over with fewer changes. I freely admit that this might not be optimal for some drivers, but those drivers can be optimized for FreeBSD after the initial bringup happens. Without the change, there is a bug that preclude drivers from compiling with strange warning/errors. I've been running this here for a while now w/o ill effects. Reviewed by: gibbs Not objected to by: bde, arch@ list.
* Don't pretend to support ix86's with 16-bit ints by using longs justbde1998-09-291-4/+4
| | | | to ensure 32-bit variables. Doing so broke ix86's with 64-bit longs.
* Implement bus_dmamem_* functions and correct a few nits reported by Peter Wemm.gibbs1998-05-061-10/+27
|
* Support compiling with `gcc-pedantic' (don't use hard newlines inbde1998-04-191-74/+74
| | | | (asm) string constants or trailing commas in enum declarations).
* Implementation of Bus Space for FreeBSD-x86.gibbs1998-01-151-0/+1264
Obtained From: NetBSD
OpenPOWER on IntegriCloud