Commit Graph

2236 Commits

Author SHA1 Message Date
jnemeth
6238d5fa66 Initial support for floppy drives on sparc64. This has been tested
on an Ultra 2 and works fine, apart from formatting which is known
to be broken.  It failed to work on an ebus machine.  The ebus
support compiles fine, but I don't have hardware for testing.  This
code is based on the sparc driver with hints from OpenBSD on how
to do the sbus and ebus attachments, along with help from martin@
and mrg@.

Initial commit approved by martin@

TODO:
- fix ebus support
- fix XXX issues
- check resource deallocation
- fix formatting
- merge remaining differences from sparc driver
- split out back end chip support
- have sparc driver use new common back end chip support
- adapt to newlock when branch is ready
- adapt to "disk-info" property dictionary
2006-10-06 08:44:59 +00:00
martin
0d3d26d9e7 After detecting wedges, close the disk vnode - otherwise things like
root on raid 1 will not be happy - fixes PR kern/34696.
2006-10-05 22:41:31 +00:00
chs
33c1fd1917 add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
2006-10-05 14:48:32 +00:00
tnozaki
44eb8f042e fix gcc -Werror -Wmissing-braces problem
mbstate_t(this is opaque object)'s initializer should be ``{ 0 }'',
so changed 1st field of union from character array to integer.
2006-10-04 13:51:59 +00:00
mrg
6ea0a43f25 use call instead of set/jmpl. add an entry point for idle that expects
sched_lock to be unlocked, and use this for non-boot cpu's.  complete a
comment describing how registers in idle_switch are expected to be set.
2006-10-04 05:00:39 +00:00
mrg
0b76b71214 redo previous: print these int64_t with PRIx64. 2006-10-03 23:39:03 +00:00
mrg
c8ead6a43b use the same SAVE_LOCALS_INS definition for 32 bit and 64 bit kernels.
refactor TRAP_SETUP() a little between these two versions to be more alike.
2006-10-03 23:34:52 +00:00
mrg
ca8f51da8c use the correct size/type for MP variables (pointers and longs).
a 32 bit MULTIPROCESSOR kernel now builds (and crashes quickly.)
2006-10-03 23:05:53 +00:00
mrg
9c88746805 need a (u_long) in the middle to go from 64 bit value to pointer value. 2006-10-03 22:37:51 +00:00
mrg
5552365a11 in pmap_mp_init(), tag & data are 64 bit int's, print them as such.
also, fix up some comments and function names.
2006-10-03 22:36:21 +00:00
mrg
4171072ea1 need an extra (u_long) to convert a 32 bit pointer to a cell_t. 2006-10-03 21:06:58 +00:00
mrg
5e4d079944 ddb_suspend() takes a struct trapframe64 *. 2006-10-03 21:05:46 +00:00
mrg
7aeb862201 cb_cpuinfo member is a paddr_t - make it printable as 64bits in 32bit mode. 2006-10-03 21:05:22 +00:00
mrg
09e5a0bb3a make get_ncpus() set sparc_ncpus = 1 in the !MULTIPROCESSOR case. 2006-10-03 21:04:47 +00:00
mrg
71bff15ee0 in the 64bit version of SAVE_LOCAL_INS, s/BIAS/STKB/ to allow future
sharing of the 32 and 64 bit versions of the {TRAP,INTR}_SETUP macros.
2006-10-03 20:01:19 +00:00
mrg
fa535729f9 remove some sparc v8 only definitions. 2006-10-02 23:22:52 +00:00
chs
e8295642bd remove MALLOC_NOINLINE, it doesn't do anything anymore. 2006-10-02 03:28:29 +00:00
elad
65792a0340 More from Matt Fleming:
Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
2006-10-01 20:31:49 +00:00
elad
e8373398dc Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks! 2006-10-01 18:56:21 +00:00
martin
787035550f When setting parameters, we should not only calculate the settings but
better write them back to the chip.
2006-10-01 17:31:47 +00:00
martin
d53ffe65a4 Use device_xname() accessor 2006-10-01 17:21:29 +00:00
martin
3cda2d1ef3 Oops, now *realy* do print the non-truncated firmware boot path 2006-10-01 10:15:24 +00:00
martin
6125ef30d2 Print the raw bootpath value 2006-10-01 10:04:13 +00:00
martin
9842f0088d Use more device_ accessor macros 2006-10-01 10:02:28 +00:00
itohy
b2d7fb48f1 Use ATA timing, instead of busmaster wait, for adding waits.
Use default wait value 0x01.
2006-10-01 09:53:08 +00:00
martin
90924281b7 Sysinst now properly ignores eon0 interfaces - so there is no need to
avoid ISO networking and EON in this kernel anymore.
2006-09-29 10:44:31 +00:00
manu
f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
martin
73962fd960 Minor cosmetics and error checking for probably impossible corner
cases.
2006-09-26 19:06:46 +00:00
thorpej
68c8876e88 device_setofnode(): Release the number object after storing it in the
device properties dictionary.  The dictionary also retains the object,
so if we don't release it, the initial reference leaks.
2006-09-26 16:11:02 +00:00
elad
2f417d0f92 Oops! forgot "options" in previous commit. Pointed out by freza@, thanks! 2006-09-26 14:30:26 +00:00
elad
8b4adae65a Make PaX mprotect(2) restrictions more accessible.
On amd64, sparc64, i386, and alpha, they will be compiled in and disabled
by default. That means that to use them you either enable the "global"
knob with sysctl, or use paxctl(1) to enable it on a per-program basis.

On sparc and macppc just include a commentd out line in the GENERIC kernel.
2006-09-26 14:08:18 +00:00
martin
931c60dde9 Rework boot device matching to get rid of lots of special case code
and tables to map fimware names to driver names. Based on a suggestion
from Eduardo (quite some time ago).
Each device (on busses we can handle and care about) gets a device property
storing the devices OpenFirmware package handle. To match the boot device,
the phandle of the chosen bootpath is compared against this property,
plus some additional string matching for disk/cd devices (where OF only
provides a node for the device class, not each instance).
2006-09-26 09:45:57 +00:00
mrg
8dd1169cb4 print the cpu number in a bunch of fault handler debug messages. 2006-09-25 05:52:34 +00:00
martin
8c0de790f8 Cosmetic nit - print the correct cpu number in the spin up message 2006-09-20 20:09:42 +00:00
mrg
62f1521a0b - remove some way old FP setup/teardown code
- put the block memcpy/memset inside #ifdef USE_BLOCK_STORE_LOAD which
  is (now) defined.

no functional change, same .o is generated.
2006-09-19 18:42:35 +00:00
mrg
349c05c4c3 re-order the changes in rev 1.217 to give registers a little bit of
time to settle between usage, like it was before hand.
2006-09-19 18:00:27 +00:00
mrg
ab182fe706 remove unused dump_rtf_info variable. 2006-09-19 06:43:11 +00:00
mrg
f994b6e5d8 - remove a wrong comment.
- add a new entry point for idle called idle_switch that is called by
  cpu_switch() in the MP case when sched_whichqs is zero, properly
  setting up the idle stack.  from petrov@ via martin@.
2006-09-19 02:08:14 +00:00
mrg
46ea89a8f7 remove an always printed debugging message. 2006-09-19 01:54:56 +00:00
mrg
bbe604f605 normalise case in some macro values to be all the same (lower case) 2006-09-19 00:55:35 +00:00
mrg
ef04c2ddac rework interrupt_vector() slightly:
- for the IPI case, avoid loading the address of intrlev into %g3
- remove some NOT_DEBUG code
- load the interrupt argument #2 in the delay slot

this removes 2 nops during interrupt processing for the normal
case, and an additional 2 ALU instructions for IPIs
2006-09-19 00:15:47 +00:00
mrg
65d0418a4b pmap_bootstrap() gets a bit of SMP help:
- initialise bootcpu->ci_{cpcb,initstack}/proc0paddr from the
	  idle u area.
pmap_extract():
	- make this work on the kernel interrupt stack as well

both of these are from petrov@ via martin@.

pmap_update(): XXX mark the MULTIPROCESSOR call to smp_tlb_flush_all().
2006-09-18 23:56:54 +00:00
mrg
9df9d4496c - sparc64_ipi_halt(): we shouldn't return from sparc64_ipi_halt_thiscpu()
so replace a branch with a 'sir'
- in #if 0 code, in sparc64_ipi_flush_pte() and sparc64_ipi_flush_ctx()
  save/restore the out registers that the sp_tlb_flush_xxx() versions
  around calling them
- in sp_tlb_flush_pte() and sp_tlb_flush_ctx(), replace global register
  usage with out registers so that we don't clobber the (alternate)
  global registers when these are called from IPI context
2006-09-18 20:56:44 +00:00
mrg
09003933e7 - remove an extra 'sir' that followed one in a macro
- add some named labels to some spill/fill handlers
- remove 2 unused strings
2006-09-18 20:36:26 +00:00
mrg
fa69249c88 remove some prototypes moved to cpu.h. de-static those functions. 2006-09-18 18:47:24 +00:00
martin
0b9bd89cf1 Lazy FPU handling for the MULTIPROCESSOR case 2006-09-18 08:18:47 +00:00
nakayama
63ba7c8fe3 From OpenBSD:
- reload %fprs for checking it again.
- use symbolic names for checking in %fprs.

  revision 1.51
  date: 2005/07/18 14:50:11;  author: deraadt;  state: Exp;  lines: +2 -1
  cache a copy of the fprs so we know what fp restore we should do after

  revision 1.50
  date: 2005/07/14 01:46:13;  author: deraadt;  state: Exp;  lines: +4 -4
  use symbolic names for checking in %fprs, as above
2006-09-16 08:43:24 +00:00
nakayama
ff1d071129 Fix a couple of %y register save/restore errors, inspired from OpenBSD.
revision 1.44
  date: 2004/04/23 04:18:17;  author: marc;  state: Exp;  lines: +5 -4

  fix a couple of %y register save/restore errors
  1) don't save %y in a register that is later used before restoring %y
  2) always restore %y after calling a signal handler
  tested by drahn@, OK pval
2006-09-16 08:29:06 +00:00
martin
008e573b41 Ooops, manually mis-merged this - this is only called for secondary CPUs,
so we better not start with 0 as cpu_number.
2006-09-15 17:29:45 +00:00
martin
092e3c8b7a Do not bother to save fpu state when we are about to get rid of it. 2006-09-15 07:42:38 +00:00