Commit Graph

1653 Commits

Author SHA1 Message Date
wrstuden
08a6eca79e Bring back saframe. Noted by Robert Swindells. 2008-10-16 04:02:32 +00:00
wrstuden
fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
macallan
8abf7fc8d9 Some fixes to the TAU support code:
- set the ADC time according to clock speed, not some magic number
- move some mtspr()s which we really only need to do once
- make our envsys_data_t static, this should fix PR 39411
2008-10-14 22:54:22 +00:00
chs
1f98baea49 in cpu_hatch(), set PIR when the current value is not what we need
rather than only when it's zero.
2008-10-04 17:20:06 +00:00
macallan
45e9b5a6c8 If we have to guess wether the console keyboard is USB or ADB check if the
PMU actually has ADB support.
2008-09-25 14:47:54 +00:00
macallan
cabde6837d recognize ATY,DDparent as display device so the rest of the code can find
the nodes for each individual display
2008-09-25 14:44:51 +00:00
macallan
42501f6294 properly 'probe' the MPC7400's L1 caches - before we'd fall through to
setting both to PAGE_SIZE
2008-09-23 13:58:59 +00:00
martin
feab9a1220 Fix machine_arch vs. machine confusion, PR 39436.
OK: garbled
2008-09-01 19:03:44 +00:00
matt
91d4704c12 Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones.  Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
2008-08-05 16:47:41 +00:00
matt
c54e2d5527 Fix bug where SRR1 (%r2) was being accidently misused and modifed
in place of segreg (%r1).

From Konrad Karpowicz <konradk at pacomp dot pl>.
2008-08-01 16:32:03 +00:00
tsutsui
ce1887dc69 - if SDA is set to low during DIR(INPUT) in gpiic_set_bits(),
store the SDA status into softc and enable it once after
  DIR() is changed to OUTPUT in gpiic_set_dir()
- remove "Read in output mode" warning in gpiic_read_bits()
  since it's a vaild operation (to read SCL during SDA output is low)

Tested by kiyohara@ on OPENBLOCKS266.
2008-07-12 02:04:07 +00:00
kiyohara
71d621af19 Initialize the member sc_callout before call callout_reset(). 2008-07-08 17:32:56 +00:00
rmind
160268aca6 Remove proc_representative_lwp(), use a simple LIST_FIRST() instead.
OK by <ad>.
2008-07-02 19:49:58 +00:00
ad
b94f79f0e8 Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@. 2008-07-02 17:28:54 +00:00
gmcgarry
8cb6efd4df Add stdargs support for pcc. 2008-06-21 00:56:39 +00:00
ad
06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +00:00
ad
48ced055d4 pci_intr_setattr(), allows PCI interrupts to be marked MPSAFE on x86, and
other platforms if the code is added.

pci_intr_map(...)
pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, 1);
pci_intr_establish(...)
2008-05-30 19:26:35 +00:00
mrg
c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
chs
dfe6756df5 add IBM970MP (used in the last model of powermac G5). 2008-05-25 16:00:52 +00:00
chs
6740bb5440 enable profiling of assembly functions. 2008-05-25 15:56:11 +00:00
phx
436768b562 Better call it HID0_BTCD, as in prep, mvmeppc and rs6000 locore. 2008-05-25 10:52:08 +00:00
phx
9728e10361 Added HID0[BTAC] bit for the 604. 2008-05-25 10:16:04 +00:00
phx
be85d6f928 Make oea_init() support systems with high-vector configurations (i.e exception
vectors at 0xfff00000), and trap_subr.S allows the kernel to be in a memory
region which is not reachable by absolute branch instructions (ba and bla).

High-vector support can be enabled by option PPC_HIGH_VEC, and long-branches
to the kernel are enabled by the option DISTANT_KERNEL.
2008-05-24 21:39:01 +00:00
kiyohara
cd22853503 Fix some bugs for bebox. 2008-05-24 17:34:02 +00:00
ad
1e62ed170b Remove unneeded playing about with kernel_lock. 2008-05-21 14:07:29 +00:00
martin
5d1469bd77 Backout previous: the license sweep touched these files in error, so
restore the old license.
2008-05-10 15:31:03 +00:00
chs
5069fb4d04 pmap_upvo_pool needs to use IPL_VM since it is used from
pmap_kenter_pa(), which can be called from interrupt context.
2008-05-05 04:40:53 +00:00
martin
9c63b7e8cc Move to 2 clause TNF license 2008-05-04 00:18:16 +00:00
martin
3b9bf49423 Move to standard TNF 2 clause license 2008-05-04 00:01:08 +00:00
garbled
82a9123f59 Add a missing Makefile that I forgot to commit in the mkbootimage
switch.  Caught by Juergen Hannken-Illjes.
2008-05-01 18:13:38 +00:00
macallan
27a3fd2a36 add dummy argument to cpu_did_resched() so kern_synch.c is happy again 2008-04-30 23:21:29 +00:00
garbled
c3408ed04a Convert prep to use the new unified mkbootimage rather than it's own. This
mkbootimage can be shared by prep, rs6000, and bebox.

TODO: Convert bebox to use this.  Needs someone to test.
2008-04-30 21:15:33 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad
30abe39468 - Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
2008-04-24 11:51:18 +00:00
he
157c460048 Need to include <powerpc/psl.h> and <powerpc/frame.h> here to get
PSL_EE and struct intrframe defined.  Fixes build problem for evbppc
EV64260 kernel.
2008-04-24 11:36:51 +00:00
matt
55d5280da2 On MP systems, make sure to update l->l_cpu with the cpu_info of the current
processor (in case it was running on a different processor before).
2008-04-10 23:29:01 +00:00
garbled
9792283735 SMP support for ofppc. (finally) Much thanks to Matt Thomas for help in
figuring out all the crazy nuances of getting this working, and to
Michael Lorenz for testing/fixing my changes on macppc.  Tested with a
quad-proc 7044-270.
Summary of changes:

Bumped CPU_MAXNUM to 16 on ofppc.
Added md_* routines to ofppc/cpu.c, to sync the timebase, and awaken the CPUs.
Fixed a bug in the test for a 64bit bridge cpu early in locore.S
Added code to set the interrupt priority for all CPUs with an openpic.
Change rtas to probe before cpus, to allow use of the rtas freeze/thaw
timebase code routines.
Fix CPU_INFO_FOREACH macro to iterate through detected cpus, not CPU_MAXNUM.
Change most uses of ci_cpuid to ci_index, to deal with CPUs that do not allow
writing to SPR_PIR.  Don't write SPR_PIR unless the secondary cpu identifies
itself as 0.
Change the hatchstack/interrupt stack allocations to allocate a 8192byte
interrupt stack, and a 4096 byte hatch stack, align them to 16 bytes, and
allocate them no lower than 0x10000.  Allocate them separately to prevent the
hatch stack corrupting the interrupt stack later on.
If the CPU is a 64bit cpu, copy SPR_ASR in cpu_hatch()
Set the idle stack to ci->ci_data.cpu_idlelwp->l_addr->u_pcb.pcb_sp.
Add OF_start_cpu().  Add a routine to ofwoea_initppc to spin up secondary
procs early, and place them into a spinloop waiting for the hatch routines
to be ready.
Modify the ipi routines to deal with openpics that reverse byte order on read
from an ipi register. (such as on the 7044)
Change the rtas setup to allocate the rtas physical base address above
the kernel, to avoid mucking up the hatch/interrupt stacks.
2008-04-08 02:33:03 +00:00
matt
666d4c1ddb split device_t/softc. Use device_xname and device_private. 2008-04-04 16:04:19 +00:00
phx
14f850861b SmartFirmware only reports the first 256MB as available.
Also use the remaining memory by looking at the "reg" property.
2008-03-27 18:01:08 +00:00
phx
61737214f3 Restrict RTAS instantiation to the first 256MB. Other memory regions may not
be mapped by OpenFirmware.
2008-03-27 17:54:46 +00:00
cube
607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
matt
9b9164cc52 on MP systems, whenever we change a PTE, make to sync the data cache so that
other processors can see the change.
2008-03-11 20:44:01 +00:00
phx
09190f8549 mem*.S no longer include assym.h 2008-03-07 17:10:00 +00:00
mrg
3b5f349b34 insert a .WAIT between include and include/foo subdirs, so that
include/ is created before include/foo.

fixes -j builds on ofppc for me.
2008-03-04 08:12:12 +00:00
matt
a2ce1f327a Make kernlib depend on assym.h 2008-03-03 18:48:26 +00:00
phx
50ea3aad0b Removed the check for device_type==display in rascons_cnattach(). It is not
required, because this function will be called for display-consoles only,
and it allows SmartFirmware to attach a rascons console.
Approved by garbled.
2008-03-03 17:15:57 +00:00
joerg
4e9584ed3b mem*.S needs assym.h. 2008-03-01 16:02:46 +00:00