Commit Graph

424 Commits

Author SHA1 Message Date
Marcel Moolenaar
3a6ec54e58 Remove call to cninit_finish. This is part of the multiple
low-level console support.
2001-10-24 08:06:55 +00:00
Marcel Moolenaar
39a4abbe0c Add parse functions for local APIC and I/O APIC entries.
Also, show when a local APIC or SAPIC is disabled.
2001-10-24 04:48:05 +00:00
Peter Wemm
76792d87a8 Fix RAW dependency violation when compiled with gcc-3
Warning: Use of 'br.ret.sptk.many' violates RAW dependency 'PSR.tb' (data)
2001-10-23 22:23:22 +00:00
Peter Wemm
b248bfe48d Turn off the single-user override. We've been running multi-user
for some time.  Having a machine boot unattended is useful. :-)
2001-10-23 11:04:43 +00:00
Doug Rabson
378749743c Add data serialisations after ptc and mov to rr[] instructions. 2001-10-23 10:20:04 +00:00
Mike Barcroft
3a72286480 Remove funky right justification.
Pointed out by:	bde
2001-10-23 00:42:15 +00:00
Doug Rabson
ab47b84778 In the signal trampoline, flush the register stack before calling
sigreturn. This appears to fix the last set of problems with csh.
2001-10-22 19:43:05 +00:00
David E. O'Brien
283da80631 Setup for a 200MB FS -- 209715200/512= 409600 sectors.
(DFR's latest ia64-root-*.tar.gz leaves only 7.7M avail when created by
dd if=/dev/zero of=ia64-root.fs bs=1024k count=200)
2001-10-22 07:33:38 +00:00
Dag-Erling Smørgrav
7c62990641 Move procfs_* from procfs_machdep.c into sys_process.c, and rename them to
proc_* in the process; procfs_machdep.c is no longer needed.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 23:57:24 +00:00
Dag-Erling Smørgrav
1f04261973 [partially forced commit due to pilot error in earlier commit attempt]
{set,fill}_{,fp,db}regs() fixup:

 - Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
one yet.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 22:16:48 +00:00
Dag-Erling Smørgrav
ef394d81ad {set,fill}_{,fp,db}regs() fixup:
- Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
{set,fill}_{,fp,db}regs() fixup:

 - Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
one yet.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 22:14:00 +00:00
Doug Rabson
eedecb60e8 Add some more names for bits of trapframe. 2001-10-21 14:03:58 +00:00
Doug Rabson
c623bf3471 We need to save a bit more information in the partial syscall trapframe
in case we need to take a signal.
2001-10-21 14:03:25 +00:00
Doug Rabson
3b51c8566c Set ar.fpsr to something sane before trying to handle a trap - the user
might have trashed it.
2001-10-21 14:02:27 +00:00
Doug Rabson
54e594762b Use ia64_set_fpsr() instead of __asm to set ar.fpsr. 2001-10-21 14:01:48 +00:00
Doug Rabson
f85321667c Add ia64_set_fpsr(). 2001-10-21 14:00:59 +00:00
Marcel Moolenaar
cf1a20ea71 Implement the IPI send functions. No mapping between IPI message
Id and interrupt vector has been made yet.
2001-10-21 08:57:02 +00:00
Marcel Moolenaar
2791ddeb6c Add define for the PIB default address and include a reference to
the SDM.
2001-10-21 05:52:54 +00:00
Matt Jacob
8c7c272c5a Remove wx. 2001-10-20 18:50:31 +00:00
Doug Rabson
2baea57020 Reserve space for signal state. 2001-10-20 15:19:43 +00:00
Marcel Moolenaar
3824d75af1 Save the AP wake-up vector from the SAL descriptor under SMP.
Note that the descriptor is optional. Add a comment to indicate
that we want to register the OS_BOOT_RENDEZ here as well.
2001-10-20 03:39:55 +00:00
Marcel Moolenaar
5b8c64dd2c Make this compile under option SMP. 2001-10-20 03:33:07 +00:00
Doug Rabson
76f7435e6e Make a start at an unaligned trap handler. Only integer loads and stores
are handled so far.
2001-10-19 22:23:51 +00:00
Doug Rabson
c33287f969 Translate various userland traps into SIGBUS (instead of just panicing). 2001-10-19 20:46:12 +00:00
Ruslan Ermilov
8c93e71e33 Try two on the preprocessing logic.
Reviewed by:	obrien
2001-10-19 20:06:23 +00:00
John Baldwin
e37d2a8c82 Remove unneeded sys/mutex.h includes. 2001-10-19 19:23:32 +00:00
David E. O'Brien
4b16cf4f8a Blah, fix braino where ru had to remind me of proper preprocessor syntax.
Bad fingers, no cookie.
2001-10-19 19:17:11 +00:00
Doug Rabson
5577bd2bca Rework pmap so that it separates the PTE structure from the pv_entry
structure. This makes it possible to pre-allocate PTEs for the kernel,
which is necessary for a reliable implementation of pmap_kenter(). This
also avoids wasting space (about 48 bytes per page) for kernel mappings
and user mappings of memory-mapped devices.

This also fixes a bug with the previous version where the implementation
required the pv_entry structure to be physically contiguous but did not
enforce this (the structure size was not a power of two). This meant
that the pv_entry free list was quickly corrupted as soon as the system
was even mildly loaded.
2001-10-19 09:47:02 +00:00
Doug Rabson
ef826b3ca8 Shift the code which packs and unpacks instruction bundles out of DDB
since it is useful for various emulations duties (e.g. unaligned trap
handling).
2001-10-18 16:20:04 +00:00
Marcel Moolenaar
acddfcf3a2 Fix typos in previous commit:
o  s/sys_narg/sy_narg/
o  s/SYS_MPSAFE/SYF_MPSAFE/
2001-10-18 05:21:52 +00:00
David E. O'Brien
4a3391b5a1 Add support for "__gnuc_va_list". Some overly "smart" libraries assume
the existence of the __gnuc_va_list type[*] because our compiler is GCC.

[*] __gnuc_va_list is defined in the GCC ginclude/stdarg.h replacement
headerwhich we don't use.
2001-10-18 00:27:39 +00:00
John Baldwin
05724cdd08 - Small cleanups to the Giant handling in trap().
- Only release Giant in trap() if we locked it, otherwise we could release
  Giant in a kernel trap if we didn't get it for a page fault and the
  previous frame had grabbed the lock.
- Only get Giant for !MP safe syscalls.
2001-10-17 22:04:45 +00:00
Matt Jacob
aaeac4f6c3 Make SCSI changer and SES devices standard in generic kernels.
Reviewed by:	ken@kdm.org
2001-10-16 22:22:58 +00:00
Doug Rabson
ebc26de418 Size the number of pv_entries we use to bootstrap the pv_entry allocator
based on the size of physical memory. This should eliminate the tweaking
needed for larger memory configurations.
2001-10-16 08:03:16 +00:00
Marcel Moolenaar
dea969f79f When compiling with SKI support, create the fake memory regions
when either the memory descriptor in the bootinfo is NULL or
the descriptor count is 0.
2001-10-15 07:58:27 +00:00
Doug Rabson
3b7ddc3170 Only the first eight arguments can possibly be in stacked registers. 2001-10-13 08:06:20 +00:00
Doug Rabson
cc6fae1156 Pass the correct trapframe pointer to fork_exit - sp is trapframe-16. 2001-10-12 11:50:09 +00:00
Doug Rabson
5b341f5baf If the faulting instruction is a cmpxchg, then isr.w and isr.r will both
be set. We need to check isr.w before isr.r so that we can correctly
handle a cmpxchg to a copy-on-write page.

This fixes the hang-after-fork problem for dynamically linked programs.
2001-10-12 11:49:11 +00:00
Doug Rabson
47806f084a Implement MCOUNT hook for assembler. Probably doesn't work right. 2001-10-11 13:35:31 +00:00
Doug Rabson
b4cc6db2df Implement mcount trampoline (untested). 2001-10-11 13:31:55 +00:00
Doug Rabson
f334c8bff7 * Change the calling convention for execve so that it conforms to normal
C calling conventions. This allows crt1.c to be written nearly without
  any inline assembler.
* Initialise cpu_model[] so that the hw.model sysctl works properly.
2001-10-11 12:31:50 +00:00
Paul Saab
cbc89bfbfe Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader
tunable.

Reviewed by:	peter
MFC after:	2 weeks
2001-10-10 23:06:54 +00:00
Doug Rabson
d91b6696b7 Add a definition for the ia64's special PLT_RESERVE entry in the _DYNAMIC
section.
2001-10-10 09:00:27 +00:00
Doug Rabson
7e3e8e556f Clarify a comment.
Requested by: jhb
2001-10-09 19:50:29 +00:00
Doug Rabson
f53482978c Don't include isavar.h - we don't need it. 2001-10-09 10:24:37 +00:00
Doug Rabson
ac0a5b09e0 Add a minimalist kernel config which can run inside SKI. 2001-10-09 10:14:06 +00:00
Doug Rabson
a3490d55d1 Make printtrap() more informative. 2001-10-08 20:21:04 +00:00
Doug Rabson
e4ef1eb797 Implement inline versions of ntohl etc. 2001-10-07 21:09:35 +00:00
Dag-Erling Smørgrav
3da3249106 Dissociate ptrace from procfs.
Until now, the ptrace syscall was implemented as a wrapper that called
various functions in procfs depending on which ptrace operation was
requested.  Most of these functions were themselves wrappers around
procfs_{read,write}_{,db,fp}regs(), with only some extra error checks,
which weren't necessary in the ptrace case anyway.

This commit moves procfs_rwmem() from procfs_mem.c into sys_process.c
(renaming it to proc_rwmem() in the process), and implements ptrace()
directly in terms of procfs_{read,write}_{,db,fp}regs() instead of
having it fake up a struct uio and then call procfs_do{,db,fp}regs().

It also moves the prototypes for procfs_{read,write}_{,db,fp}regs()
and proc_rwmem() from proc.h to ptrace.h, and marks all procfs files
except procfs_machdep.c as "optional procfs" instead of "standard".
2001-10-07 20:08:42 +00:00
Doug Rabson
e0e2fed358 * Use srlz.i to serialise changes to psr.ic
* Don't enable psr.i at the same time as psr.dt and psr.ic

These changes improve stability considerably.
2001-10-07 18:40:01 +00:00
Doug Rabson
ca11f4e176 Remove bogus include. 2001-10-07 14:20:01 +00:00
Doug Rabson
e2676403d8 Move console probes until after we set boothowto so that 'boot -h' works. 2001-10-06 16:06:48 +00:00
Doug Rabson
d0ad824d68 Assume round-to-nearest mode for floating point. 2001-10-06 15:57:22 +00:00
Doug Rabson
300634ffe0 Delete legacy pcib code - we can't possibly work without acpi on ia64. 2001-10-06 10:09:57 +00:00
Marcel Moolenaar
18819cbb5c o Change ia64_memory_address to explicitly take a u_int64_t
o  Add memcpy_fromio, memcpy_io, memcpy_toio, memset_io,
   memsetw and memsetw_io. I'm not sure this is the right
   place for it, though.
2001-10-06 09:31:43 +00:00
Doug Rabson
f1c1087a06 Add BOOTP support. 2001-10-05 19:03:01 +00:00
Doug Rabson
734047dd77 Fix some dependency violations (don't know why gas didn't catch this). 2001-10-05 19:02:21 +00:00
Doug Rabson
bff497f753 Use physical addresses, not virtual addresses when calling PHYS_TO_VM_PAGE. 2001-10-05 19:00:03 +00:00
Doug Rabson
8540504bac Eliminate some alpha craziness. 2001-10-05 18:59:02 +00:00
Doug Rabson
9e9ce1b861 In in_cksumdata, len must be a signed type. 2001-10-05 18:58:22 +00:00
Doug Rabson
34c5f03685 Low-level code for programming the I/O SAPIC. 2001-10-05 10:35:42 +00:00
Doug Rabson
7a7029581c Wire up most of the interrupt handling infrastructure. Not sure it works
right yet but its enough for the ATA probe to work. The SCSI probes which
follow are broken though.
2001-10-05 10:30:09 +00:00
Doug Rabson
ae0d75fe5f Fix typo which meant that we never actually found the ACPI 2.0 table. 2001-10-05 10:29:03 +00:00
Doug Rabson
c3a9c0057f Disable interrupts when we are in DDB. 2001-10-05 08:23:08 +00:00
Doug Rabson
c7521efc59 Add ia64_get_lid(). 2001-10-05 08:20:41 +00:00
Doug Rabson
02c76ceb97 Don't pretend the argument to clockattach is a device - it isn't. 2001-10-04 15:28:27 +00:00
Doug Rabson
a14927b550 * Don't pretend the object passed to clockattach is a device - it isn't.
* Declare itc_frequency properly.
2001-10-04 15:27:35 +00:00
Doug Rabson
377fa66e5e Use EFI (or some reasonable simulation) to read the RTC. 2001-10-04 15:26:05 +00:00
Doug Rabson
94d5f4bfd2 Fake the EFI runtime call GetTime. 2001-10-04 15:24:52 +00:00
Doug Rabson
1676303c5c Add low-level ACPI support code and make a start on parsing the ACPI
interrupt information.
2001-10-04 08:45:19 +00:00
Doug Rabson
712bc4a99a The encoding for the bus being passed to SAL was completely wrong. 2001-10-03 08:25:58 +00:00
Matt Jacob
22883e3c68 Fix problem where a user buffer outside of the area being tested
will be corrupted.

PR:		29194
Obtained from:	Tor.Egge@fast.no
MFC after:	2 weeks
2001-10-02 18:34:20 +00:00
Marcel Moolenaar
6b207c0e90 Remove redundant and misplaced "options DDB" line. 2001-10-02 06:18:23 +00:00
Doug Rabson
89dbc365be Support for SKI is now an option. 2001-09-29 11:45:33 +00:00
Doug Rabson
47d032e595 Make sio0 a console device. 2001-09-29 11:45:07 +00:00
Doug Rabson
f17bd83f5f Add a couple of arguments to ia64_init. I'll use them later to improve
the method of passing bootinfo from the loader.
2001-09-29 11:44:35 +00:00
Doug Rabson
cf1a145b08 Various changes to use the firmware on a real machine. 2001-09-29 11:43:37 +00:00
Doug Rabson
940bcd77bd * Read parameters for ptc.e instruction from PAL Code.
* Add pmap_unmapdev().
2001-09-29 11:41:23 +00:00
Doug Rabson
3ebae4bf00 Fake PAL Code for SKI. 2001-09-29 11:40:32 +00:00
Doug Rabson
625768e4a0 Start hooking up devices. 2001-09-29 11:11:18 +00:00
Doug Rabson
9a6f25fd59 Add pmap_unmapdev(). 2001-09-29 11:02:06 +00:00
Doug Rabson
ddead4655a Fill out the firmware interfaces somewhat. 2001-09-29 11:01:24 +00:00
Doug Rabson
63e057656e Add code to initialise firmware resources (and to fake them if we are
running in simulation).
2001-09-29 11:00:24 +00:00
Doug Rabson
965c805d64 Add shims for calling PAL Code in physical mode. 2001-09-29 10:59:07 +00:00
Doug Rabson
a3c9f0dc11 Add some move definitions. 2001-09-29 10:24:09 +00:00
Doug Rabson
ee82e0d5f8 Call cpu_boot from cpu_reset. 2001-09-29 10:23:21 +00:00
Doug Rabson
f184b2654b Give up on the backtrace if the calculated pc isn't in region 7. 2001-09-29 10:22:57 +00:00
Doug Rabson
3cf08d5025 Use PAGE_SHIFT instead of a hardcoded constant for log2(PAGE_SIZE). 2001-09-29 09:55:30 +00:00
Doug Rabson
27272270e8 * Preserve ar.rsc in ia64_change_mode.
* Convert sp to/from physical in ia64_change_mode.
* Add a shim for calling EFI procedures in virtual mode.
2001-09-29 09:54:42 +00:00
Doug Rabson
0e671be22e Change END(locorestart) to END(__start). 2001-09-29 09:53:38 +00:00
Robert Watson
b9c6f21493 o Modify the access control checks for the ia64 /dev/mem (and friends)
to use securelevel_gt() instead of direct variable checks.

Obtained from:	TrustedBSD Project
2001-09-26 20:24:23 +00:00
Doug Rabson
fa129a40db Tidy up and fix a runtime warning. 2001-09-26 16:15:20 +00:00
Brooks Davis
2f65332817 The faith(4) device is no longer a count device so don't specify a count. 2001-09-25 18:56:40 +00:00
Doug Rabson
3dc2c2d530 Use b6 instead of b1 - b1 is supposed to be preserved and b6 is scratch. 2001-09-24 22:50:20 +00:00
Doug Rabson
f8c1540f3d Make the Alternate {I,D} TLB vector code actually work for virtual
addresses greater than 256M (the page size for region 6 and 7).
2001-09-24 22:49:20 +00:00
Doug Rabson
588154e27b Don't try to access external files from SKI unless we are actually running
in SKI.
2001-09-24 20:01:29 +00:00
Doug Rabson
40aef04652 Increase the number of bootstrap PVs. 2001-09-24 20:00:20 +00:00
Doug Rabson
9324a7e743 Include <machine/pte.h> instead of <machine/pmap.h> 2001-09-24 19:58:15 +00:00
Doug Rabson
32956c3d49 We need different call stubs for static and stacked calling conventions. 2001-09-24 19:41:16 +00:00
Doug Rabson
378482865e Factor out PTE and related definitions from pmap.h - they are useful in
the loader.
2001-09-24 19:27:38 +00:00