mapping of msgbuf during startup may map invalid physical adresses
"If the last available physical memory segment on a system is less 16k,
than the startup code that will map the kernel message buffer, will fail
and map physical pages behind the last segment. This may either only lead
to a message buffer without physical memory behind it, or to an
overlapping message buffer with something else."
Fix by allowing multiple physical memory segments to be used for msgbuf.
Also remove some leftover msgbuf manipulation from pmap.c.
Fix supplied by Wolfgang Stukenbrock in the PR, with some modifications
from me, mainly to use the already existing constant VM_PHYSSEG_MAX as the
static limit of number of msgbuf segments.
Attached is a patch to add generic base support for systems based on the
OMAP 1 family. The devices supported in this patch are serial console
and MPU timers for OS timing purposes.
I ran into a problem when I tried to set up a mapping that started at virtual
address 0xFFF00000 and was 0x00100000 long. In other words, the mapping
should have gone to the end of the 32 bit address space. The mapping was made
with no problem, but pmap_devmap_find_va() wouldn't find an address within the
mapping. For example, if I told it to find a mapping for 0x1000 bytes at
0xFFF01000, it would try to make sure that 0xFFF01000 was greater than
0xFFF00000 and that (0xFFF01000+0x1000) was less than (0xFFF00000+0x00100000).
However, that last expression (0xFFF00000+0x00100000) wrapped around to be
simply 0x00000000 so it wasn't found. This patch fixes this problem in
pmap_devmap_find_va() and pmap_devmap_find_pa() by subtracting one off of the
sizes to be compared, so in my example, (0xFFF01000+0x1000-1) will be less
than (0xFFF00000+0x00100000-1).
This one is really simple. I wanted to use KERNEL_BASE in an assembly source,
but arch/arm/include/arm32/vmparam.h wasn't protected by #ifndef
__ASSEMBLER__. The patch adds the protection.
identify_arm_cpu() prints out a helpful message when it detects that you're
trying to run on a CPU that you didn't configure for. Unfortunately, the
check for class_option being NULL is backward, so it either won't print the
class_option, or it will try to dereference a NULL. The patch just flips the
!= NULL to be == NULL.
Attached is a patch to add generic base support for systems based on the
OMAP 1 family. The devices supported in this patch are serial console
and MPU timers for OS timing purposes.
This patch depends upon patches previously sent by Scott Allan: "Three
small patches for ARM" on 07/26/2006 and "Patch to add support for
ARM9E" on 07/31/2006.
A staggering number of mobile phones, PDAs, and other portable devices
are based on these systems, and OMAP would make a great addition to
NetBSD. If there are any concerns we can address or other things we can
do to get this code accepted upstream please let me know, thanks,
Still requires some bug fixes in the nfe(4) driver; works with USB ethernet.
Requires Xromwell / Cromwell 2.41dev or above to boot. Tested both CD boot
and etherboot.
xboxfb(4) currently does not work properly with component video cables.
this affects XEN3_DOM[0U] as well. This change shrinks the amount of
disk space required for a full build significantly, and now only ALL
has -g enabled.
ok bouyer@
going to be the only way to get data onto a system.
This should get the INSTALL image way back under 2.8M again.
Someone does need to sort out an ACPI install kernel though....
otherwise, xbdstart kicked via dk_iodone still sees RING_FULL condition
and just returns. it makes xbd stall when all requests are acked by
a single xbd_handler. PR/34005.
into the first sector of a FAT16 filesystem and will load 'boot' (and hence)
the netbsd kernel from it.
Unlike bootxx_msdosfs this doesn't need the filesystem to have 8k of 'reserved'
sectors, and may well work on non-512 byte media (as yet untested).
is /dev/ttyB1 which has minor 2. If this serial port becomes zstty1,
/dev/ttyB1 becomes unusable because the minor number does not match. (The
problem was introduced when we started using the zstty(4) driver instead of
the scc(4) driver between NetBSD 1.6 and 2.0.)
Suggested by Bill Studenmund a long time ago.
Tested on DEC 3000 - 300LX and DEC 3000 - M600.
reliably supporting badaddr(). False negatives appear to occur
approximately 1.8 percent of the time, although neither false positives
nor consecutive false negatives occur. We take advantage of the latter
property and always use a wrapper that makes multiple checks.
My IP12 no longer sees occasional ghost devices and related panics during
boot.
Devices present on the GIO bus needn't always provide a Product
Indentification Word, even if their address space is the same as the
address space of a slot. Separate the handling of probing for slot-based
devices and graphics devices, matching the latter first, and precluding
addresses probed for the former when a graphics device is known to exist
in a slot's space.
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
for. Also, remove the 'clk_freq' variable, since this value differs on a
per-platform (IP12 is 20MHz, others are 10MHz) basis.
NB: I have no idea what frequency the GIO SCSI cards use. We'll have to
re-investigate this if we ever come across one.
results in unbootable ecoff kernels ("malloc_type_attach: bad magic"
panic). Maybe this could be fixed with appropriate flags, but elf2ecoff
produces working ecoff kernels and ecoff bootloaders, which was the reason
for the switch in the first place.
GIO slots. This differs from Indy, which has an interrupt per slot, neither
of which is the same as on the other two machines.
This lets my Phobos G160 run in both slots in my Indigo2 and my E++ adapter
works in both slots in my Indigo.
connected to the HPC. The only real reason for doing this is to get the
mac addresses off of E++ ethernet boards and the Challenge S IOPLUS board.
If no eeprom is present, we read in invalid data and take some default
action (query ARCBIOS).
based on mach_type (or at least know the major revision). The only case we
really need to concern ourselves with is differentiating between HPC1
and HPC3 on IP22. Specifically, between a HPC3 on the Challenge S IOPLUS
board and a HPC1.5-based adapter in an Indy.
- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
to how other KSEG-style pmaps (alpha, sh3, sh5) do.
Add a DIAGNOSTIC panic for KSEG1 addresses (nothing should touch
uncached memory, right?)
Clean up the the pmapdebug printfs a little too (athough with
more ugly #ifdef DEBUG bits of code).
XXX: should use DPRINTF() type printfs here.
Fixes panic running regress/sys/kern/umount on MIPS platforms
reported by Martin Husemann.
Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
- make fileassoc_t a pointer and remove FILEASSOC_INVAL.
- clean up kern_fileassoc.c. unify duplicated code.
- unexport fileassoc_init using RUN_ONCE(9).
- plug memory leaks in fileassoc_file_delete and fileassoc_table_delete.
- always call callbacks, regardless of the value of the associated data.
ok'ed by elad.
determine accurately which LED to illuminate.
Instead, hook into the PCI[ABC] interrupt chains (used solely for the
USB controller) and use the disk1/disk2 LEDS to indicate general USB
activity.
Use the "Ready/Status" LED as a CPU activity indicator by hooking the
TMR0 interrupt and illuminating the LED if the CPU is non-idle.
on IXDP425 since the PHYs fail to probe my board. This may be due to
an incompatibility between the stepping A0 CPU and the microcode.
Additionally, the MAC addresses are not configured by Redboot, so more
work is needed in this area.
* Add another model that needs to be added into the quirk table.
* Don't iterate over the pnow_cpu_quirk array if the two signatures
are identical.
Patch sent privately by Olaf 'Rhialto' Seibert, thanks.
Formac ProNitron 80.IVb (1024x768/8)
Relax 19" Model 200 (1024x768/8)
Apple Monochrome Video Card (640x480/1)
VillageTronic Mac Picasso 320 (up to 1920x1080/up to 24)
Nubus identifiers for Creative Solutions parallel & serial cards,
and a Becton Dickinson data acquisition card.
- add a ses(4) major number as the MI MAKEDEV tries to create the
nodes. hi elad.
- create audio devices.
- provide mount_kernfs and a dmesg command.
- start sysinst automagically and fix backspace key.
Mostly prompted by David H. Gutteridge on port-hp700.
Probably it ought to come from some generic .h file, but I've no idea
which - nor if any existing define has the same effect.
In any case this saves oodles of bytes in bootxx_msdos.
RDSK block, check for a valid native NetBSD label. If found, use the
NetBSD label. When writedisklabel() gets called, if no RDB was found,
write out the native NetBSD label. The disk won't be usable by AmigaDOS,
but is usable as a 'normal' NetBSD drive, with partition changes saved in
the disk label.
to ensure trap code will work (that is 0 upto ${endkernel}) and leave the
rest to pmap_tlbmiss(). Mapping whole physmem into the kernel wired way
too many TLB entries, see
http://mail-index.netbsd.org/port-powerpc/2006/10/27/0000.html
for performance analysis. While there, be a bit more descriptive in
pmap_tlbmiss() comment and use macro instead of numeric constant.
OK by Simon Burge
consinit() was moved before oea_init() in rev 1.136, but startsym and
endsym are not initialized at that point.
Now kernel symbols are usable (on ddb(4), ksyms(4) etc.) again on macppc.
First, remove process_checkioperm() calls from MD code. Similar checks
using kauth(9) routines (on the process scope, using appropriate action)
are done in the callers.
Add secmodel back-end to handle each subsystem.
still enabled, as it could have been disabled through USERCONF.
Use it in amd64 and i386 mainbus code and skip all ACPI processing in case
it is disabled.
default label. Allows creating an FFS filesystem on an unlabeled disk
without needing to use the RAW partition. If an RDSK block is found,
reset the default label prior to processing the PART blocks.
version.
Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
> It seems that 32bits programs, running under compat_netbsd32, using
> setrlimit force all other programs to have their maximum data size
> fixed at 3GB, where native 64bits apps used 8GB previously.
I tracked this one to the `netbsd32_adjust_limits()' function (called
when creating a new process under compat_netbsd32), where data and
stack limits are set without checking for shared `p_limit' structure
(p_limit->p_refcnt > 1). This explain the side effect where processes
have their limits changed when a compat_netbsd32 (or compat_linux32)
program is run.
The fix is to use `dosetrlimit()' to ensure the needed copy-on-write
behaviour for shared structure.
timer of VIA1. Passes regression/sys/kern/time regression test.
While we are here, GC leftover prototypes from MI todr integration,
and clean up clockreg.h in the light of "Guide to the Macintosh
Hardware" information.
(Reviewed and okayed by Martin Husemann)
Pointed out by Havard Eidnes.
XXX: should these decls be in <mips/intr.h> or <mips/locore.h>?
While here, remove "extern" keyword from function declarations.
which have virtual address indexed cache and whose pmaps don't always
allow normal shared mappings even for read only pages.
In future, these pmaps should be rewritten to handle such read only
shared mappings properly like ARM pmap, but currently we just disable
sosend_loan() to avoid unnecessary uncached mappings and cache flushes
on MIPS3 CPUs, or map/unmap thrashing on SH4.
Discussed with thorpej a while ago.
from cpu_configure(9) to cpu_initclocks(9) on mips ports which use
mips3_clockintr.c:mips3_clockintr() (i.e. CPU INT5 clock) to avoid
hardclock(9) before softclock interrupt is initialized in initclocks().
This should be harmless because initclocks() is a part of configure()
in these days and there is no MI function which expects hardware
interrupts between cpu_configure(9) and cpu_initclocks(9).
Disccussed on tech-kern and port-mips.
my archive of commit mail):
Take DST into account when computing bi.timezone offset, so that
NetBSD gets correct time when booted in the summer.
Fix framebuffer address for Jornada 7xx machines, so that you can boot
with layouts other than "Japanese" (which happened to have the
framebuffer address in its entry).
Fix a bug where ksyms were not loaded correctly, which also caused the
kernel to not recognize detached miniroot.
Kludge required memory size calculations to compensate for partially
filled tagged pages, or kernel with certain segment sizes wouldn't
load.
[hpcarm have picked up some of these fixes in hpcboot v14 that was
compiled/committed in the meanwhile, for hpcarm only].
this device in userland (e.g. qemu-dm when running a HVM guest), we'll reuse
the existing vnode and we'll panic in VOP_UNLOCK(). We don't have this issue
most of the time because when xbdback is the only user, we get a specfs
vnode for which locking operation are NOPs.
Thanks to Antti Kantee for spotting the missing vn_lock() in sources and
giving details about vnode locking.
event should be raised every 10ms if we're runnable. Unfortunately,
there seems to be an intermittent bug in the hypervisor such that,
for about 1<<32 ns (~4.3s) after it manifests, every running domain
continues to run but not get its timer events and new timestamps (nor
is it preempted in favor of other domains on that CPU). This can cause
strange behavior from our timekeeping; for example, hardclock() is never
called during this interval.
So here's a workaround: if timestamp is allegedly up to date but is more
than 40ms old (this is semi-arbitrary), the domain sets its timer to a
time in the past, which causes it to become immediately pending, and also
results in the publication of a new timestamp.
I'm leaving those platforms with few users and those whose machines are
not very powerful untouched per uwe@'s suggestion. The port masters or
the real users of those ports are better suited to make the decision of
enabling it.