matt
4423977ff5
Use symbolic constant for SPR. Fix comment.
2014-07-31 01:04:00 +00:00
matt
bf50eedd07
Don't use numeric constants for SPR. Use the symbolic name (SPR_PIR).
...
Add DBSR_BRT to KASSERT
2014-07-31 01:01:55 +00:00
joerg
76da57e7f2
Replace mfpir with mfspr r, 286. The Power ISA and GAS disagree on the
...
semantics of this instruction, so prefer the well defined replacement.
2014-07-30 23:56:01 +00:00
matt
e2c2dd7510
Fix diagnostic trap to be correct. PSL_EE@l would be sign-extended and this
...
could never match the result of the andi. before it.
2014-07-30 23:27:55 +00:00
joerg
d335762e53
Correct last, ha+l uses lis+addi, so use h+l.
2014-07-30 23:15:23 +00:00
joerg
efa045c031
Build 32bit constant with lis+ori, not lis+addi. The instructions
...
differ on the sign extension handling of the immediate.
2014-07-30 22:45:21 +00:00
joerg
edb8772400
pq3pci_config_addr_read is only used in a #if 0 block, so hide it under
...
the same condition.
2014-07-30 10:50:54 +00:00
joerg
1c7643fc59
GC openpic_read.
2014-07-29 23:35:00 +00:00
joerg
8006b1fe1b
Official PPC ISA documentation has no SP register, so use R1 directly.
2014-07-29 19:15:47 +00:00
joerg
0e3c494bd7
cmpl wants four operands, so use the shorter cmplw instead.
2014-07-29 16:19:45 +00:00
joerg
4a4dc674c9
#if 0 copyout_le32 and friends, they are currently unused.
2014-07-24 23:29:02 +00:00
joerg
6bd7e0ed8c
#if 0 unused copyin_halfword.
2014-07-24 23:27:25 +00:00
joerg
4dda201196
Let the assembler bail out if the immediate is too large instead of
...
truncating it.
2014-07-24 18:19:13 +00:00
alnsn
582402eab5
Rename sljitarch.h to sljit_machdep.h.
2014-07-23 18:19:43 +00:00
alnsn
8bf6e438cb
Cast to __syncicache() argument types.
2014-07-22 20:38:55 +00:00
mrg
c496beb132
make sure struct bat is aligned to 8 bytes as we shift them 3 bits.
...
fixes PReP lossage as reported on port-powerpc and port-prep.
thanks to makoto@ki.nu and kiyohara@netbsd.
2014-07-06 08:06:03 +00:00
msaitoh
af7b229d67
Pass MIIF_DOPAUSE mask to mii_attach() in if_emac.c. emac(4) change a
...
register from IFM_FLOW flag, so this change is required to control the
setting via ifconfig. PR#48950. OK'd by matt@.
2014-06-26 07:50:29 +00:00
rmind
8011b285c0
Implement MI IPI interface with cross-call support.
2014-05-19 22:47:53 +00:00
rmind
d67ab12c1d
pcu(9):
...
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
This experimental feature was tried on ARM did not meet the expectations.
It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
optimise a race condition: if LWP is discarding its state on a remote CPU,
but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
2014-05-16 00:48:41 +00:00
phx
625c110fa2
Fixed mkbootimage for 64-bit architectures. Now I can create a working
...
BeBox boot.fs under NetBSD/amd64.
2014-04-22 21:37:52 +00:00
matt
8ed9a6d892
Since all our compilers support __DBL_* and __FLT_*, use them to define
...
{DBL,FLT}_{DIG,MIN,MAX}
2014-04-21 10:53:47 +00:00
matt
5a400bbb3d
ldscript for ppc64 kernels
2014-04-19 12:46:04 +00:00
martin
2fd5cacc2b
Make it compilable
2014-04-06 14:47:46 +00:00
christos
3ff79dba35
adjust to new signature; return consistent stuff. 0 is ok -1 is error
2014-04-05 18:44:32 +00:00
matt
526f2aee72
Add PMAP_TLB_FLUSH_ASID_ON_RESET define
2014-04-03 13:55:34 +00:00
christos
e58a356cba
make pci_intr_string and eisa_intr_string take a buffer and a length
...
instead of relying in local static storage.
2014-03-29 19:28:24 +00:00
matt
06a44c13d2
sprintf -> snprintf
2014-03-25 16:39:27 +00:00
christos
e691d98f97
use cpu_{g,s}etmodel
2014-03-24 19:29:59 +00:00
christos
4a19197e17
remove dup cpu_model sysctl; use the mi version in hw.
2014-03-24 19:14:31 +00:00
macallan
04f7ce1f23
> Can we use c99 field initializers here instead of comments?!?
...
Yes, yes we can.
2014-03-18 20:11:08 +00:00
riastradh
6cb10275d0
Merge riastradh-drm2 to HEAD.
2014-03-18 18:20:35 +00:00
macallan
45f9a5100e
split 601 and generic PowerPC timecounter code a bit more
2014-03-18 14:34:31 +00:00
mrg
f6e33f02a8
remove various set-but-unused variables.
2014-03-14 21:59:41 +00:00
matt
9f9d956c40
same typo
2014-03-10 00:04:04 +00:00
matt
49aac98b50
Typo
2014-03-10 00:03:14 +00:00
matt
53dc265000
Make sure to clear PSL_SE before going to usermode on BOOKE
...
Revert back to testing PSL_SE in the trapframe and not mdlwp md_flags
2014-03-09 23:09:32 +00:00
matt
e267b088d4
Don't test for PSL_SE in tf_srr1 since will be cleared on the next exception.
...
Keep a copy of it in l_md.md_flags which will be preserved.
2014-03-09 22:31:25 +00:00
matt
6358bf0e36
Don't define ARCH_ELFSIZE if it's already defined.
2014-03-07 04:11:07 +00:00
matt
360ced8a90
Fix PPC64 setregs
2014-03-06 19:44:32 +00:00
matt
1de63f393f
Add PowerPC64 DTs
2014-03-06 19:30:39 +00:00
matt
9ee040b36e
Add _XENTRY which doesn't set the section to .text
2014-03-06 19:05:24 +00:00
matt
342cd14faf
When building a DEBUG kernel, mdsetimage into the .gdb as well (so if it's
...
used with gxemul, it has the md image in it.)
2014-03-06 09:24:07 +00:00
matt
65b6009a9a
Adapt to new elf_machdep.h
...
Add limited ELF64 support.
2014-03-06 09:22:52 +00:00
matt
10432e099e
More comments.
...
rest of powerpc64 relocs
2014-03-06 07:48:25 +00:00
matt
6040f5ca22
compat16 -> compat_16
2014-03-04 08:25:11 +00:00
macallan
b01d00d945
support ppc601
...
from scole_mail, ok matt@
2014-03-03 15:36:36 +00:00
matt
813e9ffd01
sigcode is dependant on compat_16
2014-02-28 05:49:21 +00:00
matt
17d1ea5241
Don't hardcode MACHINE_ARCH
2014-02-28 05:48:22 +00:00
matt
c849674a3b
Use uintptr_t to convert pointers.
2014-02-28 05:45:26 +00:00
matt
ebf2eb8d62
Use PRIx64
2014-02-28 05:44:39 +00:00
matt
9381109cb8
If execing a LP64 image, we need to read the function descriptor to get
...
the entry point and the TOC base. (Do we need to fixup the TOC base?)
2014-02-28 05:43:49 +00:00
matt
fc3fb3b857
Remove _LP64 since it's only used on 32-bit
2014-02-28 05:41:59 +00:00
matt
4ab6fe99ee
Use uintptr_t for ras_entry
2014-02-28 05:41:21 +00:00
matt
67d3d3e6e4
Fix the 64-bit case
2014-02-28 05:39:49 +00:00
matt
7b9e6b6d74
Use register_t instead of int for register values.
2014-02-28 05:38:53 +00:00
matt
146dcf7d7d
Make 64-bit clean
2014-02-28 05:38:15 +00:00
matt
066d12ed79
Use the right file.
2014-02-28 05:37:51 +00:00
matt
ad99a1aa4d
Use uintptr_t instead of int.
2014-02-28 05:35:49 +00:00
matt
8937f9fe62
Use more appropriate type.
2014-02-28 05:34:39 +00:00
matt
d4182252d5
Make this 64-bit aware.
2014-02-28 05:33:53 +00:00
matt
2d773d76bf
Add pmap_ste_spill
2014-02-28 05:32:01 +00:00
matt
648cd98c19
Make this work.
2014-02-28 05:31:38 +00:00
matt
d7c76f4df3
Add trapframe32 for COMPAT_NETBSD32
2014-02-28 05:30:24 +00:00
matt
c4eb371e6c
Add ALIGNBYTES32 for COMPAT_NETBSD32
2014-02-28 05:29:57 +00:00
matt
7f94f535b0
Use uintptr_t for bus_size_t, bus_addr_t, bus_space_handler_t since uint32_t
...
doesn't really work too 64-bit platforms.
2014-02-28 05:28:40 +00:00
matt
523fe23684
support PPC_OEA64
2014-02-28 05:27:38 +00:00
matt
2568724ec2
Add mcontext32_t
2014-02-28 05:27:05 +00:00
matt
0020224196
Add cmp{ptr,long,reg}{,l}{,i}
2014-02-28 05:26:23 +00:00
matt
8c93c0eb27
Use ## for concatenation
2014-02-27 18:12:28 +00:00
matt
2b39b08a8f
Add P2SZREG to be usign with .p2align
2014-02-27 15:58:03 +00:00
martin
9fad0528ec
Mark a temporary as __USEd
2014-02-25 14:16:25 +00:00
martin
c4a0cfaf05
Remove unused variable
2014-02-25 14:09:13 +00:00
macallan
a5d06cef1b
when looking for SCSI disks in canonicalize_bootpath() also match 'disk@'
...
since that's what at least some Adaptec firmware uses
2014-02-18 12:27:15 +00:00
christos
b07f3fe235
delete VM_DEFAULT_ADDRESS; some of those should be GC'ed because they match
...
the default definition.
2014-01-25 15:16:49 +00:00
mrg
2141bdc7f5
make this look more like the latest elf32ppc.x. tested on pegasosII.
2014-01-19 02:32:21 +00:00
mrg
03a295b74f
convert a failure to call OF for a reboot call into a panic() instead
...
of a hard hang.
2014-01-17 09:09:40 +00:00
dsl
95739e63cd
Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
...
of the fp save area to all the process_read_fpregs() and
process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
2014-01-04 00:10:02 +00:00
dsl
be74e0a9c9
Change the type of the 'cookie' that holds the state of the core dump file
...
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
2014-01-01 18:57:15 +00:00
wiz
d860f590d4
Fix typo ("then" instead of "than")
2013-12-09 09:35:16 +00:00
alnsn
7ca7224ef5
Use __syncicache() in sljit on powerpc.
2013-11-25 23:53:44 +00:00
kiyohara
a1cb7359eb
Move the parameters for obs600 to obs600_autoconf.c. This parameters was set from u-boot.
2013-11-21 13:52:27 +00:00
kiyohara
964b567a32
Support Synopsys DesigneWave OTG on PowerPC 405EX.
2013-11-21 13:33:15 +00:00
kiyohara
725fdb27e9
Fix IPL for cascading pic to HIGH.
2013-11-19 12:46:43 +00:00
alnsn
5345f80ec7
Enable sljit and bpfjit on powerpc.
2013-11-17 14:34:11 +00:00
mrg
c3e6c00ce6
make sure that .text.startup and .text.unlikely end up in the
...
text section. GCC 4.8 ofppc kernels now boot, though they are
unable to load the symbol table correctly.
also tested with GCC 4.5 and ofppc (pegasosII.)
2013-11-16 12:00:21 +00:00
nisimura
5818b5f944
use __diagused for KASSERT only variable.
2013-11-08 04:32:58 +00:00
nisimura
77418f57bd
resort the sys/cpu.h way for unused cii iterator in !MULTIPROCESSOR case.
2013-11-08 03:59:35 +00:00
nisimura
5c6968285a
move DIAGNOSTIC only variable inside #ifdef
2013-11-07 15:26:36 +00:00
mrg
1ee28a1fe7
- remove set but unused variables
...
- move some variables inside their relevant use #ifdef
2013-11-03 22:27:27 +00:00
mrg
c4746a16b5
- remove set but unused variables
2013-11-03 22:22:03 +00:00
mrg
44f61bfe42
gcc 4.8.1 wants:
...
- remove some set but unused variables
- move some variables inside their usage #ifdef's
- cast to (void) instead of using a dummy return variable
(there are more to come, but this one is now tested with gcc 4.5)
2013-11-03 22:15:57 +00:00
matt
699311e835
Fix c&p bug.
2013-09-22 18:56:11 +00:00
matt
328ab199e6
Disable XBSEN for the 7450.
2013-09-22 18:49:10 +00:00
matt
7f12d72195
Make sure ABE/SYNCBE are enabled in HID1 for the 7450 CPUs
...
Enable XBSEN for the 7450.
2013-09-22 18:05:16 +00:00
matt
73bf23c080
Define HID1_{SYNCBE,ABE} for the 7450
2013-09-22 17:51:31 +00:00
christos
f324b62750
remove unused OPENPIC flags.
2013-09-19 23:29:25 +00:00
christos
a8260c61a3
use ci_index.
2013-09-19 23:28:52 +00:00
joerg
4d12bfcd15
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
...
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-09-12 15:36:14 +00:00
matt
78620830e1
convert rfid to rfi in exception handlers.
2013-08-31 15:01:08 +00:00
matt
310fbebba0
Move the pmap_setup to the start oea_init (no non-OFW ports can use it).
...
If PPC_OEA64_BRIDGE is defined, add code so that when OEACPU_64_BRIDGE is not
present, it replaces the rfid with rfi and mfmsr/rldicl/mtmsrd sequence
with NOPs. This allows plain OEA kernels to work. (tested on PMPPC with
PPC_OEA64_BRIDGE option added).
2013-08-31 07:33:15 +00:00
matt
378cec5a74
Add CACHE_INFO_DCACHE_LINE_SIZE to assym.h
2013-08-30 21:29:29 +00:00
matt
3835e94cd4
struct cpu_info;
2013-08-24 15:42:29 +00:00
matt
24c580b056
Add a SYSTEM_DEP for the ramdisk on INSTALL kernels.
2013-08-23 06:25:02 +00:00
matt
ba0705f794
Avoid a few instructions since we know CURLWP is in %r13
2013-08-23 06:24:21 +00:00
matt
66cb4c16d4
Simplify since we know curlwp is in %r13
2013-08-23 06:22:32 +00:00
matt
b183b3ef97
Get rid of MDLWP_USED{FPU,VEC}
2013-08-23 06:19:46 +00:00
matt
ba182b7aab
Fix kern_softint.c errors (tested with WALNUT & EV64260)
2013-08-23 06:18:14 +00:00
drochner
69aeb16c07
-extend the pcu(9) API by a function which saves all context on the
...
current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
"LWP has used the coprocessor" flag should be set or reset. The flag
is reported by pcu_used_p(). If set, future accesses should use the
state stored in the PCB. If reset, it should be reset to default.
The former case is useful for setmcontext().
With that, it should not be necessary anymore to manage the "FPU used"
state by an additional MD variable.
approved by matt
2013-08-22 19:50:54 +00:00
matt
c83a49fc04
cpuset_info is no longer volatile
2013-07-19 06:43:20 +00:00
matt
9b2362ab06
kcpuset_t changes for the pmap and removal of __cpuset_t
2013-07-17 23:27:02 +00:00
matt
b89cdb0e53
Fix typo (pa instead of va).
2013-07-09 20:33:03 +00:00
joerg
f48ee015ba
Don't depend on libz.a for the tools build, /usr/lib/libz.a might not
...
exist.
2013-07-09 13:10:55 +00:00
joerg
bd970e74fe
Fix format string.
2013-07-09 13:10:33 +00:00
joerg
31ed74d31c
Set pc_intr_map only once.
2013-07-05 02:18:37 +00:00
joerg
3ce4c44911
Fix header guard.
2013-07-05 02:11:59 +00:00
joerg
58d90b3498
Don't use non-literal strings as format string.
2013-07-04 23:00:23 +00:00
joerg
0d9b68baf9
One const is good enough.
2013-07-04 22:59:58 +00:00
joerg
f6a98ac11b
When trying to write into page 0, use volatile to force the compiler to
...
actually create this access.
2013-07-04 22:59:27 +00:00
matt
8b42139220
Use sy_invoke
2013-06-26 06:31:53 +00:00
kiyohara
b7a30adb0b
Fix lost avail memory over 256M.
2013-06-12 15:11:08 +00:00
kiyohara
e3971f83fc
Call kmem_intr_free() with kmem_intr_alloc-ed memory instead of free().
2013-06-09 12:52:33 +00:00
macallan
b00e7f24a9
more G5 stuff:
...
- call OF_quiesce()
- properly map the message buffer
2013-05-13 00:12:01 +00:00
macallan
ca1d0e8b1b
add OF_quiesce() to shut down OF background tasks, needed on G5
...
from Phileas Fogg
2013-05-12 13:50:11 +00:00
macallan
092e2fd7b4
cleanup mem_regions:
...
- use different variables for / and /memory nodes
- remove redundant OF_finddevice("/")
- assume 32bit addresses/sizes in "available" on Apple hardware
2013-05-12 13:42:39 +00:00
macallan
bdcb52e9e3
move console_node and console_instance to ofw_consinit.c where they're
...
actually used
2013-05-12 13:23:08 +00:00
macallan
f6a41c7ccb
remove PMAC_G5 kludge - fixed this elsewhere
2013-04-28 00:45:45 +00:00
macallan
76c99e815c
some macppc boxes have onboard devices where parts or the whole PCI interrupt
...
register is hardwired to zero - fix this up here
2013-04-28 00:44:27 +00:00
macallan
9ab0014b38
make delay() work with _ARCH_PPC64
2013-04-25 00:11:35 +00:00
macallan
9c39c70523
we can read the timebase register as a 64bit chunk when _ARCH_PPC64 is defined,
...
not necessarily LP64
2013-04-25 00:08:48 +00:00
macallan
9902bdf86c
fix off-by-one
...
noticed by Phileas Fogg
2013-04-11 19:55:10 +00:00
macallan
b321ec3e3e
KNF nits
2013-04-11 19:53:51 +00:00
macallan
1a39b65774
in memio_map() don't fail without trying to mapiodev() if we don't find a BAT
...
mapping or don't have BATs
now this works on G5
2013-04-11 18:20:33 +00:00
macallan
b2ee8ed2e2
temporary kludge for G5 - on mine some devices are configured with interrupt
...
pin 0 but a valid IRQ line, so don't treat that as an error if PMAC_G5 is set
2013-04-11 18:14:40 +00:00
macallan
6b3498dcea
for some reason we can't use the ROM font on G5, so disable it with
...
options OFWOEA_WSCONS_NO_ROM_FONT
from Phileas Fogg
2013-04-11 18:04:20 +00:00
macallan
8a9318ebf5
make PPC_OEA64_BRIDGE mode work
...
from Phileas Fogg
2013-04-11 17:13:15 +00:00
christos
caafbf4e1b
add missing SSIZE_MIN
2013-04-11 00:57:34 +00:00
macallan
0ee8b59e60
deal with /memory "reg" property which may contain 64bit addresses on G5
2013-04-01 20:14:42 +00:00
christos
70c0b4d9e7
Fix loop bug (Phileas Fogg)
2013-03-28 00:22:21 +00:00
christos
3f9b5ba889
Explicitly set KERN_AS (this could be done in /usr/src/sys/conf/Makefile.*)
...
so that modules work, on config files that did not set it explicitly. All
the files now use the standard logic, except the ones that set KERN_AS=obj
and Makefile.usermode which sets KERN_AS=library.
2013-03-10 07:18:19 +00:00
kiyohara
ce02c3a687
Fix KASSERT(l == curlwp)ed in mi_switch(). Don't use INTSTK of cpu_info in
...
INTR_PROLOG when user-mode. Interrupted user context switches to newlwp, if
sched tick. This context must save to USPACE.
When use our INTSTK?
2013-02-09 11:22:51 +00:00
kiyohara
b73bbcbf2e
More stack for ibm4xx slow machines.
2013-01-29 15:47:16 +00:00
kiyohara
f870b0a58c
Support 16bits over stack size.
2013-01-29 15:45:43 +00:00
kiyohara
b38b935659
Set SRR1 to r31 in intr_exit. Not cpuinfo.
2013-01-29 15:33:44 +00:00
matt
7f6d9a714f
Use structure initializers.
2013-01-18 06:21:12 +00:00
matt
2b8030185c
Update to new pcu_state_{load,state,release} definitions
2012-12-26 19:05:03 +00:00
kiyohara
8a11b9f2d3
Change name of boot image(mount point?) to 'NetBSD' from 'fd'.
2012-12-24 14:01:24 +00:00
kiyohara
fd862c9a85
Obsolete options '-s'(standalone) on bebox. bebox can boot no-standalone image
...
from FD or HDD.
2012-12-19 13:47:20 +00:00
matt
f82647e665
Make the 85xx get closer to spinning up the secondary CPUs.
...
Don't assume TLB1[0] has the mapping for VA/PA 0.
Make sure the TLB1 entries that map physical memory have the M (memory
coherent) bit set.
2012-11-27 19:24:45 +00:00
christos
72708a99b3
provide _ENTRY(x) because some code needs it.
2012-11-25 01:10:37 +00:00
chs
5a4166a003
fix compile problems (for POWERMAC_G5).
2012-10-29 12:52:43 +00:00