uch
731150d9ce
add SH7750S IPRD register define
2002-03-24 17:57:33 +00:00
uch
93da9db963
cosmetic changes, fix comments.
2002-03-17 17:55:22 +00:00
uch
1080799576
change to per-process AST.
2002-03-17 14:06:38 +00:00
uch
4c6260b9de
kernel stack fix. old code simply P3 address converted to P1, it
...
caused memory destruction when kernel stack grow over 1 page. new
code use P3 address for kernel stack. but for the sake of debug, P1
kernel stack mode remain.
2002-03-17 14:02:03 +00:00
chs
9fe7f9402f
only comments may follow #endif on a line.
2002-03-16 05:27:53 +00:00
uch
672baca18b
proc0 and page table intialize routines are moved to sh3_machdep.c
2002-03-10 07:46:12 +00:00
uch
f9201a1606
common part are moved to sh3/include/param.h
2002-03-10 07:45:31 +00:00
uch
dc55dc2c73
remove unneeded code and files.
2002-03-08 13:22:11 +00:00
uch
babf2e5892
cpu_swapout() moved to cpu.h
2002-03-08 13:12:10 +00:00
thorpej
069a559c65
Remove some files that no longer exist.
2002-03-07 19:34:37 +00:00
uch
2f603eaa17
CTL_MACHDEP definitions are integrated into sh3/include/cpu.h again.
2002-03-04 14:36:13 +00:00
uch
90baa8b206
SR related parts moved to psl.h. cpufunc.h segments.h are removed.
...
kernel mode checking is only SR.MD. no check stack pointer.
2002-03-03 14:31:24 +00:00
uch
17fbf85dc3
machine dependent sysctl are moved to machine/cpu.h
...
dreamcast, hpcsh ... CPU_CONSDEV
mmeye, evbsh3 ... CPU_CONSDEV, CPU_LOADANDRESET
2002-03-03 14:28:48 +00:00
uch
6042c0a3fc
Initial support for KGDB on the sh3.
2002-03-02 22:26:25 +00:00
uch
65af267aeb
Add SH7709A INTEVT2 register define.
2002-03-02 22:25:19 +00:00
uch
9c21656766
cpu_dumpconf, reserve_dumppages, dumpsys, cpu_reset are moved to sh3/sh3_machdep.c
2002-02-28 16:54:28 +00:00
simonb
4324f37586
Use "#define<tab>".
2002-02-28 03:17:23 +00:00
uch
6ece4e10f0
Remove #if 0 #endif
2002-02-28 01:58:53 +00:00
uch
bbc655c4fb
Cleanup register definition
2002-02-28 01:56:57 +00:00
uch
40382c6556
Change foo_r0_r1 macro in sh3/locore.h to foo(Rn, Rm)
2002-02-28 01:53:42 +00:00
uch
06fbd079f5
Remove unneeded header.
2002-02-28 01:52:28 +00:00
simonb
d9ab16ba2f
Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
...
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
2002-02-26 15:13:19 +00:00
uch
693be1956c
Move common exception vector and scheduler code to
...
sh3/sh3/exception_vector.S and sh3/sh3/locore_subr.S. exception
vectors are installed by sh_cpu_init(). machine/locore.S contains
kernel entry, interrupt handler, and some MD code.
2002-02-24 18:19:40 +00:00
uch
72589177e0
remove obsolete file.
2002-02-24 18:13:06 +00:00
uch
f694c9fdd7
New NetBSD/sh3 clock framework.
...
+ hardclock source is moved from TMU1 to TMU0.
+ SH3/SH4 common kernel support.
+ PCLOCK estimation.
+ remove duplicated code.
2002-02-22 19:43:58 +00:00
uch
5f5cce9adc
Clean up function declaration.
2002-02-19 17:22:34 +00:00
uch
1bdc7cc5ca
Clean up functions
...
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
2002-02-19 17:21:18 +00:00
simonb
2d8577fb83
Clean up some rampant code duplication wrt ieee number handling:
...
- Add alignment-safe double and float unions.
- Use the above for the __infinity and __nan constants on all
architectures that use the standard ieee754 representation of
those constants.
- Add a single copy of various ieee754 math functions (frexp, isinf,
isnan, ldexp and modf) that had numerous duplicates among the
arch-specific directories.
- Use the above functions on all architectures where the generic C
versions where used. Architectures that had local assembly
routines are untouched (for those functions only).
2002-02-19 13:08:12 +00:00
uch
6e0794b560
To determine CPU architecture and product, add cpu_arch and cpu_prduct variables.
...
these are initialized by sh_cpu_init()@sh3/sh3_machdep.c
(see sh3/include/cputypes.h for detail.)
add "options SH3" for SH3 kernel config file.
2002-02-17 20:59:33 +00:00
uch
a96c1d0e8f
change register naming.
2002-02-17 20:58:02 +00:00
uch
780de330ba
Add new MMU API. for detail, see sh3/mmu.h's comment.
2002-02-17 20:55:50 +00:00
uch
b3f7b11fe7
ANSIfy KNF.
2002-02-12 15:26:45 +00:00
uch
9487e1d731
change PTE PG_* bit define to support SH4 PCMCIA space attribute fully.
...
for detail, see pte.h.
2002-02-11 18:06:06 +00:00
uch
32f2c6e61f
clean up redundant PTE PG_* defines.
...
PG_RO -> PG_KR
PG_RW -> PG_KW
PG_u -> PG_URKR
PG_PROT -> PG_UW
PG_AVAIL1 -> PG_PVLIST
2002-02-11 18:05:17 +00:00
uch
6a86080d84
add useful macro for running P2, P1 area.
2002-02-11 18:04:24 +00:00
uch
de4d07e475
add defines
2002-02-11 18:03:48 +00:00
uch
e63a9777b2
add new cache routine.
2002-02-11 18:03:05 +00:00
uch
b3308f4d3d
TLB dump command added to DDB
2002-02-08 06:12:00 +00:00
uch
da20ab3589
add SH3/SH4 namespace free defines.
2002-02-08 06:11:38 +00:00
uch
66510b76a9
add SH-internal memory mapped register access method.
2002-02-08 06:11:16 +00:00
thorpej
462fa41153
* Make this lint'able.
...
* Reduce some code duplication.
2002-02-04 08:34:27 +00:00
thorpej
87c05210dd
Fix for ELF + __NO_LEADING_UNDERSCORES__.
2002-02-04 08:33:34 +00:00
uch
4202622d3c
if PCLOCK isn't setted, use estimated value calculated by kernel.
2002-02-01 17:52:54 +00:00
thorpej
ed0b3a0857
Add SuperH ELF header flags.
2002-01-29 01:42:57 +00:00
thorpej
e46bcf64ee
Add SuperH relocation types.
2002-01-29 01:35:36 +00:00
thorpej
3bce84cf10
Consider __NO_LEADING_UNDERSCORES__ provided by the new ELF toolchain.
2001-12-16 18:11:12 +00:00
thorpej
51535d4bf5
Add support for dumping ELF-cormat core files.
2001-12-09 23:05:56 +00:00
soren
662f877587
MAXSLP is defined to be a machine-independent scheduling parameter,
...
so move it into sys/param.h.
2001-11-15 18:06:11 +00:00
chs
1dcb706816
fix type-o.
2001-09-21 02:36:47 +00:00
wiz
456dff6cb8
Spell 'occurred' with two 'r's.
2001-09-16 16:34:23 +00:00
chris
0e7661f023
Update pmap_update to now take the updated pmap as an argument.
...
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.
Currently this is a no-op on most platforms, so they should see no difference.
Reviewed by Jason.
2001-09-10 21:19:08 +00:00
thorpej
babefc5331
Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
...
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
msaitoh
40204ff68c
fix KERNELMODE() macro (check MD bits, too)
2001-06-24 05:34:07 +00:00
msaitoh
fa7f03665e
use MMUCR_TF macro defined in mmureg.h
2001-06-24 05:32:55 +00:00
wiz
0a600be867
receive, not recieve
2001-06-12 15:17:10 +00:00
msaitoh
e29b0f085f
.type xxx,@function isn't supported under COFF
2001-06-10 19:06:26 +00:00
mrg
67afbd6270
use _KERNEL_OPT
2001-05-30 11:57:16 +00:00
chs
118ddca24a
replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
2001-05-26 16:32:40 +00:00
msaitoh
cbcd644ce8
sigreturn() fix (from kleink)
2001-05-16 12:42:38 +00:00
kleink
dadbb7e784
There is no extended-precision format on sh3.
2001-05-03 13:19:52 +00:00
thorpej
cf67ac7122
Per discussion w/ chuck and chuck, restructure the md page stuff
...
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
2001-05-01 02:19:13 +00:00
thorpej
2b27ac7a99
Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
...
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.
This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.
Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
2001-04-29 22:44:31 +00:00
kleink
fe3c9ceaf7
* Move definitions of exact-width integer types from <machine/types.h>
...
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
intmax_t, pointer-type and size_t arguments.
2001-04-28 15:41:28 +00:00
kleink
99054d7a6c
Add definitions for C99 fastest minimum-width integer types.
2001-04-26 16:25:19 +00:00
thorpej
69abdbf60c
Undo a misguided previous change to the pmap_update() API.
2001-04-22 23:19:26 +00:00
uch
103b08ffa1
make this compile again under SH4
2001-04-22 17:37:55 +00:00
uch
95f0d5c680
add RTC control register 1 defines.
2001-04-22 16:50:17 +00:00
thorpej
4738622712
Give pmap_update() an argument (a pmap_t) so that it knows which
...
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej
15f731ee94
pmap_update() should not be equated with "flush entire TLB", it is
...
used to process deferred pmap operations. Since these pmaps don't
defer anything, pmap_update() is a noop.
2001-04-21 17:25:01 +00:00
kleink
f06533a1ee
Add definitions of C99 integer format conversion macros.
...
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink
739cb75837
Add definitions of C99 specified-width integer type limits.
...
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink
cdcf9f46c5
Add definitions of C99 integer constant macros.
...
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink
a7c20e5788
Add definitions of C99 integer constant macros.
2001-04-14 22:38:33 +00:00
kleink
7affdab52e
Add definitions of C99 minimum-width and greatest-width integer types.
...
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej
bf2dcec4f5
Remove the use of splimp() from the NetBSD kernel. splnet()
...
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
marcus
b6c1c5d49a
Altentries should also be marked as functions, to keep linker happy.
2001-04-09 20:31:20 +00:00
marcus
e0d02d24d5
Mark syscalls as functions.
2001-04-09 15:52:59 +00:00
marcus
0640ad6ace
When the endians are little, they are little.
2001-03-29 03:23:33 +00:00
msaitoh
bc759e0d8d
check __LEADING_UNDERSCORE
2001-02-25 19:15:04 +00:00
msaitoh
526ce203e7
check __LEADING_UNDERSCORE instead of __sh3__
2001-02-25 15:49:58 +00:00
uch
8ce0133cc8
add SH7709/SH7709A I/O port register define
2001-02-21 14:49:53 +00:00
msaitoh
c090c1cfe5
temporary fix a serious pmap problem with dummy PMAP_{MAP,UNMAP}_POOLPAGE().
...
To fix correctly, set IOM_RAM_BEGIN with P0 addr instead of P1 addr and
fix machdep.c and pmap.c.
2001-02-19 17:51:22 +00:00
uch
78af56fcfd
move VM_PHYSSEG_MAX, VM_NFREELIST, VM_FREELIST_DEFAULT defines to
...
machine/vmparam.h
2001-02-07 14:53:09 +00:00
thorpej
c8cdb12913
Add some comments about P/USEG
2001-02-02 18:25:04 +00:00
thorpej
ef2315d256
Rewrite how mod/ref emulation is done. In particular, make
...
modified attribute checking actually work. Previously, a
page could be reported as modified even if it wasn't! This
is very bad, and e.g. caused the VM system to attempt to
"clean" pages of read-only files.
Only lip-services is paid to referenced attribute emulation.
This could be improved.
2001-02-02 02:28:18 +00:00
msaitoh
61831529f2
add some macros for 8bit PCMCIA access
2001-01-30 04:15:10 +00:00
thorpej
d85a75f583
Make sure everybody has an splvm() and equate it with splimp() (splimp()
...
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
itojun
1e7e3274f4
split MACHINE_ARCH sh3e[lb]. userland build still needs checking.
2001-01-04 07:03:21 +00:00
takemura
c5fd828440
replace 'long long' with int64_t to compile stand alone program with
...
compiler other than GCC.
2001-01-03 10:08:55 +00:00
itojun
efa2b7073c
make mbstate_t bigger (32 -> 128 bytes).
...
XXX if you have libc after citrus locale import, please recompile libc,
and your applications that use mbstate_t (rather rare). really sorry
for the mess.
2000-12-26 10:35:28 +00:00
itojun
823498203f
populate _BSD_MBSTATE_T_. add warning regarding to rune_t.
2000-12-21 06:03:47 +00:00
marcus
724713366e
Made weak_alias create correct labels on sh-elf.
2000-12-14 18:47:30 +00:00
msaitoh
d191cbf210
add interrupt mode into wdog
...
To use:
ioctl(fd, SIOWDOGSETMODE, &val)
val: WDOGM_RESET -> reset when counter expired
WDOGM_INTR -> print PC when counter expired (new!)
This interface is still under experimental.
2000-10-31 02:04:12 +00:00
is
126ba78048
We do wired page accounting. Tell UVM about this.
2000-09-28 14:03:38 +00:00
tsubai
9fdd44d404
DDB single step and stack trace support.
2000-09-08 10:15:23 +00:00
tsubai
d0078c839c
Add breakpoint().
2000-09-06 11:25:13 +00:00
tsubai
5f39c378a3
Correct label_t size.
2000-09-04 22:18:43 +00:00
msaitoh
8d1b1036ff
- move MMUCR_VALIDBITS definition into mmureg.h.
...
- access correct address in cacheflush().
2000-09-04 05:48:35 +00:00
thorpej
4db6fc7542
Make need_resched() take a "struct cpu_info *" argument. This
...
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
thorpej
58e7a6954b
Add spllock(). See spl(9) for details.
2000-08-22 19:46:26 +00:00