New macros:
LOCATE_PCS(struct rpb *hwrpb, int cpu_number)
PCS_PROC_MAJORTYPE(struct pcs *)
PCS_PROC_MINORTYPE(struct pcs *)
Define LOCATE_PCS() to map (hwrpb, cpu_number) -> Per-Cpu-Slot structure.
Replace the PCS_PROC_{MAJOR,MINOR}{,SHIFT} stuff with macros that simply
return the major and minor cpu type codes.
address on 2 architectures anyhow. Also, move the definition of the `label_t'
type inside _KERNEL protection, since it is specific to the in-kernel
setjmp()/longjmp() implementations.
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
is defined, the bus_space macros will check to ensure that the bus address
and the target buffer (if applicable) are aligned properly for the size
of the type being used. If they are not, a message will be displayed on
the console.
Strict alignment is required by the Alpha architecture, and a trap will
occur of unaligned access is performed. These changes will aid debugging
of broken device drivers.
UVM pmap's locking protocol, written by Chuck Cranor. Not all of the
support for multiple processors is here yet, but the kernel does run
under moderate loads with LOCKDEBUG (all locking operations are no-ops
unless LOCKDEBUG is turned on).
This is by no means complete... there are still some possible snares
to take a look at.
member to the DMA tag, and calling the direct-mapped back-ends directly,
rather than through chipset-specific front-ends which pass the window
base as an additional argument.
caller to pass an optional 3rd argument, which is the previous level
PTE corresponding the virtual address. If this argument is non-NULL,
the table walk otherwise necessary will be bypassed.
enough to use as a console on my DEC 3000/400 (connected to a VT-520
terminal).
XXX The MI SCC driver needs serious changes to handle platforms which
have muliple SCC attachments (e.g. the Alpha port, which has an ioasic
attachment for TurboChannel systems and a gbus attachment for TurboLaser
systems).
XXX The MI SCC driver also needs changes to deal with the wacky (to put
it mildly) way the chips are wired up on the ioasic (on both TC Alphas
and DECstations). These are going to come along later.
Major change is that page table page management has been completely
rewritten. Page tables are now accessed via K0SEG (no more KVA space
wasted on user page tables), and a much larger user address space is
supported.
Many thanks to Chris Demetriou and Ross Harvey for helpful insight and
debugging assistance.
- Make pv_table an array of struct pv_head's, which contain LIST_HEADs
for the pv_entry's, as well as page attributes (mod, ref, ptpage).
- Use <sys/queue.h> to manipulate pv_entry lists.
- Fix several obvious bugs in pmap_collect_pv().
- Use K0SEG to access pv_page's.
- Clean up pmap_bootstrap() some, and make a slight change to how the
PROM mappings are saved.
- Give each pmap its own level 1 page table, rather than sharing a global
level 1 page table. This will eventually allow for Very Large user
address spaces.
- Keep a list of all pmaps, so that when kernel level 2 page tables are
allocated, all level 1 tables may be updated.
- Add a couple of functions for allocating and freeing page table pages.
- Add a few comments about ASN allocation.
These changes also recover memory that is located before the kernel in
the first system software segment on systems which do not use the PROM
for console I/O. Written by Chris Demetriou and myself.
knowledge) earlier, and gather all information needed earlier. Mark the
init code carefully re: when it can print stuff out, when it can expect
the firmware to stop working, etc. Be more careful about using the PROM
console and other PROM facilities, and hint that in the future all use
of firmware/boot program callbacks by the kernel should go away (since
the world may not be mapped the way the firmware/boot program wants!).
- Attempt to find the model string in the HWRPB's DSR area. Failing that
(if the HWRPB version is too old)...
- Look up the system variation in a variation/string table. Failing that
(unknown variation)...
- Create a default model string using the variation number.
Also, factor out a bunch of common code.
number passed by the boot block into a register, change the kernel's
bootinfo handing so that it always uses bootinfo to get bootinfo-ish values
(filling them in if the boot blocks didn't pass them), and make versioning
a small bit more sane.
configured into the kernel, or when the platform is not supported.
Use the defopt'ed options, rather than NDEC_... and remove the needs-flag
hack that's existed for a while.
- fix _C_LABEL so that it actually works.
- make __RENAME use _C_LABEL.
- fix __RENAME so that it expects an unquoted argument.
- fix __indr_reference and __warn_references so that they
supply their own final semicolon.
- define __warn_references to nothing if not GNU C (required
by the way it's used).
The __warn_references semicolon change has to be made
so that __warn_references can be defined into nothing.
(A ; all by itself isn't a great idea.) The __indr_reference
change was made for consistency.
--entries / remove kernel entry from locore / reorganize vector entry
--code. Enables access to stack frames transitively w.r.t. palcode
--vectors, e.g. upward traceback works, inverting (possibly several)
--kernel vectors. Until now, all trackbacks ended at the first-reached
--instance of trap(), which was totally useless as there is no mystery
--to trap->panic->cpu_reboot
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
with large amounts of memory and not spew. This doesn't really replace
fixing this problem better later, but it works for now. Basically, if memory
is greater than 128MB, start upping the sizes of some maps.
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
on EV56 and later processors that have the "amask BWX" bit clear. These
instructions will be used to implement non-swizzle bus access functions
on newer systems, such as the new AlphaStation 500s with EV56 and 21172
PCI chipsets.
See "Alpha Architecture Handbook, Version 3", DEC order number EC-QD2KB-TE.
(II-B) 2-33 of the Alpha AXP Architecture Reference Manual, Second Edition:
* rdps - Read Processor Status, needed by spl* functions.
* cflush - Cache Flush
* rdval - Read System Value
* wripir - Write Interprocessor Interrupt Request
* wrval - Write System Value
cflush, rdval, wripir, and wrval are used in multi-processor environments.
passing them a proc *, which encapsulates all of the information necessary
to activate an address space.
- Garbage-collect pmap->pm_stchanged; it's not really used for anything.
Also, put the cpu_decl()s in cpuconf.h, so that platform support files
can pull in the prototypes from there, and pull in options for those
systems for which there is code in the source tree.
at least 8-). Add structure offssets for structure members, so we
know how much space we're using. Make the version in the bootinfo
structure be a u_long, so there's no implicit padding in the structure.
Add a few more pointers to the bootinfo v1 structure, which will all
be set to NULL for now.
was sent to developers, but will eventually become a man page or
something), i noticed a few in various names:
(1) _map and _alloc should take a flags argument, rather than a
'cacheable' boolean.
(2) BUS_BARRIER_* flags should be BUS_SPACE_BARRIER_*.
(3) bus_space_copy_* should be bus_space_copy_region_* for consistency
with other region ops.
Fix all of these (in a backward-compatible way, at least for now). Redefine
internal usees of those names to use the new names. Also, while at it,
clean up the copy functions (remove unnecessary variables) and make sure
that they and other functions conform to the spec.
(1) it was using 'max', and some functions use a variable
of that name (*sigh*), and
(2) that makes it easier to be a bit trickier, and only call
swpipl if changing the IPL.