Tomas Niño Kehoe | 18 May 2013 06:58
Picon
Gravatar

NetBSD/avr32

Hi all,

I'd like to announce the existence of a NetBSD port to the AVR32 processor architecture.
This port is being developed in the context of my engineering thesis at the University of Buenos Aires, Argentina. It is directed by Leandro Santi.

This is my first experience with AVR32. My previous experience with RISC architectures involves MIPS. Consecuently, the MIPS port was taken as a staring point into NetBSD. Some parts of the MD code contain MIPS code snippets -guarded by #ifdef notyet clauses- acting as a
reference. These will be removed in the near future. Multiple MIPS implementations were studied to be
able to understand the interaction between Machine Dependent code (MD) and Machine independent code (MI).

The milestone that will mark the end of this thesis is the execution of a static 32-bit Linux binary, read from an in-memory file system supported by md.c. Currently, the system is able to mount the filesystem successfully, yet system call support and Linux compatibilty are currently under development. The rationale here is related to the inexistence of a NetBSD/avr32 API, vs. the immediate availability of the Linux system call emulation interface ofNetBSD.  Support for a proper NetBSD/avr32 API will be developed, but not within the context of my thesis (see below).

Bear in mind that this port was produced in an academic context subject to time restrictions (and therefore scope restrictions), and due to the lack of the gcc compiler and related toolchain, including the NetBSD, and port-specific config(1), genassym(1), some compromises were taken to enable the development of this port.

For similar reasons, some other compromises were taken:

o The assym.h emited by genassym(1) is handcrafted, containing only the offset definitions needed by this port.

o There is no genassym.cf file, however we have payed special attention to preserve the semantics of the generated headers.

o The ioconf.c file created by config(1) is handcrafted, containing only a few device definitions.

o There are no device definition files for config(9) to configure the kernel. All optional header files were created and definitions were added as needed through the development cycle.

o The global curlwp reference, which is held in a fixed register in the MIPS port is being stored in memory.

oCurrently, the clock tick is implemented using the CPU COUNT register, for simplicity reasons.

o The linux port of the compiler is being used: This has been done on purpose, in order to be able to bootstrap the kernel of the operating system within the context of my thesis. We believe that a proper, NetBSD specific port of gcc should be made available early in the userland-centric porting effort, which would begin right after the end of my thesis.

o pmap.c tags every page with the D (dirty) bit set (rationale:early unavailability of the trap.c machinery). We except to implement proper handling of the D bit soon. Finally, these are the next work items in line:

o It would be nice to locate the board-specific code in a separate directory, mimicking the vast amount of examples already provided in the source code of the kernel.

o MB(9) functions are NOPs for the time being.

o compare-and-swap functions have race conditions.

o Integrate with the NetBSD build system: Makefiles are Linux and GNU make-specific due to the unavailability of the toolchain for anything else than Linux (i'm currently developing in a Linux workstation).

In the near future, i'm hoping to include support for execution of NetBSD 32bit binaries and improve exception handling.

Currently, work is being focused on the trap machinery and related exceptions, in order to complete the necessary trap.c glue looking to execute the static userland shell. Will post a follow-up in a few days.

Code can be found here: 

Starting kernel at 90000000 (params at 11fc0040)...

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.1.0_PATCH (MYKERNEL) #0: Thu Jan 12 20:05:02 ARST 2012
root <at> netbsd-5-1:/tomas/new/src/sys/arch/i386/compile/MYKERNEL
Atmel AT32AP7000 SoC
total memory = 32768 KB
avail memory = 29728 KB
sysctl_createv: sysctl_locate(disknames) returned 2
sysctl_createv: sysctl_locate(iostatnames) returned 2
sysctl_createv: sysctl_locate(iostats) returned 2
mainbus0 (root)
cpu0 at mainbus0: Atmel AT32AP7000 SoC (0x1) Rev. 0, no FPU
cpu0: 16KB/32B 4-way set-associative Instruction cache
cpu0: 16KB/32B 4-way set-associative Data cache
cpu0: unified TLB, 32 entries
at32bus0 at mainbus0
at32pm0 at at32bus0
at32intc0 at at32bus0
at32clock0 at at32bus0
rn_init: radix functions require max_keylen be set
boot device: <unknown>
root on md0a dumps on md0b
root file system type: ext2fs
WARNING: no TOD clock present
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
warning: no /dev/console
panic: Unrecoverable Exception
cpu_reboot

Greetings,
Tomas.
Przemysław Sierociński | 16 May 2013 21:34
Picon

[GSoC 2013] Implement file system flags to scrub data blocks before deletion

Hello,

I have received some comments on my project proposal, which can be found
https://google-melange.appspot.com/gsoc/proposal/review/google/gsoc2013/psie/1 ,
however it would be great if I could detail more points.

May I ask about your opinion on:
1) What file system(s) besides ffs and ext2fs could be modified to
benefit users,
2) What user space binaries have to be changed?

I am finding figuring out these two a little troubling, as I don't
want to miss anything.
Any other comments/suggestions are also more then welcome.

I am not planning to implement undelete instead, unless it is really wanted.

Mrs. S.P.Zeidler suggested I posted here, yet I started on
tech-security, I apologize and hope discussion won't diverge.

Regards,

Przemyslaw Sierocinski

6bone | 13 May 2013 08:35
Picon

frozen netbsd-6-rc4

hello,

I am using netbsd-6-rc4 at a dell 1850. the server works only as router. 
it is connected with an lacp port-channel (4*1gb) to a cisco catalyst 
switch.

sometimes (1/day or more often) the system cpu usage increases to 300 
percent or more. in some cases netbsd is frozen (also the kernel 
debugger), in other cases netbsd continues to a normal work after some 
minutes.

The top command shows the following:

load averages:  0.76,  0.77,  0.58;               up 4+03:49:27       11:31:11
33 processes: 31 sleeping, 2 on CPU
CPU0 states:  6.2% user,  0.0% nice, 18.8% system, 11.2% interrupt, 63.9% idle
CPU1 states:  5.0% user,  0.0% nice, 12.8% system,  3.6% interrupt, 78.6% idle
Memory: 279M Act, 153M Inact, 6036K Wired, 20M Exec, 152M File, 296M Free
Swap: 4506M Total, 4506M Free

   PID USERNAME PRI NICE   SIZE   RES STATE      TIME   WCPU    CPU COMMAND
     0 root       0    0     0K 6928K CPU/1     13:37  0.00%   277% [system]
   464 root      43    0   316M  238M parked/0  21.4H 32.47% 32.47% named
   .....

Any idea what the problem could be? The hardware is ok and the switch 
does not show any abnormal network traffic.

Thank you for your efforts

Regards
Uwe

Brian Buhrow | 3 May 2013 23:41

Question about pool(9) sizes

	Hello.  In my continuing quest to try and get i/o performance up on
some NetBSD-5.1 production boxes I have, I find I have a question about the
minimum and maximum sizes of a specific pool.
Given the following snippet of output from vmstat -m, does the size 164,
which I realize represents the number of objects in the pool, also
represent the maximum  number of objects in the pool?  That is, if more
than 164 instances of this object are needed, would the system be unable
to provide the 165th instance or can it grow the pool to accomodate the
request?  If it does grow the pool, would the size value in vmstat -m
change?
If I've got it completely wrong, could someone elaborate?

-thanks
-Brian

Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
scxspl       164 67714659    0 67714659  2101  2092     9     9     1   inf 9

Manuel Wiesinger | 3 May 2013 20:46
Picon

[GSoC 2013] Defragmentation for FFS

Hello,

I just finished my Google Summer of Code proposal for a defragmentation 
tool for FFS [1].

The wiki also asks for a CV. I will post a link here by tomorrow, as 
soon as I have time to translate it into English.

Regards,
Manuel

[1]
https://google-melange.appspot.com/gsoc/proposal/review/google/gsoc2013/meadow/1

dinesh thangavel | 3 May 2013 05:51
Picon
Gravatar

GSoC Eligibility Issue

Hello,
      I have been accepted for Master's Program in University of
Wisconsin-Madison for Fall'13. As accepted students can participate
inGSoC, I was interested in it. I will enter United States with F1
Visa by August. After consulting with my University's ISS I came to
know that I do not have work permit in US during August-September. So,
I cannot participate in this GSoC Edition.
I was planning to work on Generic LED/LCD API. I would like to thank
all the people who helped me with my doubts in mailing list
and IRC.
     Since I am not eligible for GSoC, If that project will not be
assigned to any student,I am happy to work on it.

Regards,
Dinesh Rathinasamy Thangavel.

Taylor R Campbell | 29 Apr 2013 03:50
Favicon

options VND_COMPRESSION

Only a few kernel configurations have options VND_COMPRESSION enabled
by default -- i386/GENERIC and a few evbarm kernels, mainly.  Any
reason we don't have it enabled in many others, e.g. amd64/GENERIC?

I haven't hammered on vnd(4) with compressed images, but it seems to
work in light testing.

Taylor R Campbell | 24 Apr 2013 03:30
Favicon

vfs transactions, suspension, and snapshots

I'm trying to understand how transactions, suspension, and snapshots
fit together in vfs and fss, and the man pages seem a little too
disjointed for me to figure it out.  Is there any high-level overview
of how all these things fit together?

dinesh thangavel | 23 Apr 2013 12:07
Picon
Gravatar

GSOC Generic LED/LCD API

Hello,
         My name is Dinesh. I am interested to work on "LED/LCD
Generic API" for GSOC'13. I am an Electronics undergraduate from
College Of Engineering, Guindy. I worked as a Research intern at
Integrated Systems Laboratory where I had exposure to real time DSP
applications. I have been accepted to Master's program in Computer
Engineering at University of Wisconsin-Madison for Fall'13. For past 2
years I have been working as software Engineer at Cluster Wireless ,
where I worked on developing network applications in ARM architecture.
         I am excited to work on developing a generic framework to
interface LED/LCD. For the GSOC Period i planed to do the following
tasks

1. Add a generic framework for LED/LCD device drivers.
2. Develop a sample Device driver.
3. Develop a test application to test the device and driver functionality

I have a Raspberry Pi board with me as a hardware. I have found the
NetBSD port for Raspberry PI here[1]. The current port has support of
I2C and I found out some LCD's with I2C support. I am comfortable with
working on Raspberry Pi and I2C LCDs. I would like to know about if
there's any specific preference for hardware ?  Also in the project
page there was a mention about OpenBSD API, it would be helpful if I
get some pointers on that.
I am open to ideas ans suggestions.

[1] http://wiki.netbsd.org/ports/evbarm/raspberry_pi/

Regards,
Dinesh Rathinasamy Thangavel.

Mouse | 18 Apr 2013 01:42

envsys, round two

Okay, I finally got the leisure to put together proplib-aware-enough
code to pick apart the dictionary returned by ENVSYS_GETDICTIONARY.
(Incidentally, for whoever it was that told me all the proplib types
are the same, I investigated, and it's not actually true.
prop_object_t is void *, but the rest are typedefs for various struct
types - _different_ struct types.  The documentation evidences other
confusion, too, such as one routine which is described as returning 8,
16, 32, 64, or NULL - and the description of its return value actually
could lead to any value from 0 up to some maximum not clearly defined
by the API as far as I can see.  Fortunately the implementation
actually returns 0 in the cases when the documentation says it returns
NULL.)

This is all talking about 5.2.  Perhaps the situation has improved
since then?

Now, I'm wondering if there's documentation on the available type
strings and what they mean.  So far, I've seen "Ampere hour", "Ampere",
"Battery capacity", "Battery charge", "Indicator", "Integer",
"Temperature", and "Voltage DC".  I've found no documentation on what
any of those mean, though as an anglophone I see them as having at
least a little implication of semantics embedded in the words.
However, most of them don't give any indication of units and even the
two that do ("Ampere hour" and "Ampere") are wrong; while I'm not sure,
I suspect they are actually microamps and microamp-hours.
sysmon_envsys, which is referred to, says (in a somewhat confusing
place) that "the user should convert the value returned by the driver
to the appropiate unit.  For example voltage sensors to mV, temperature
sensors to uK, Watts to mW, Ampere to mA, etc.".  That is not a
plausible match to what I see.  In the dictionary returned by
ENVSYS_GETDICTIONARY, the (sub)dictionary whose "description" is
"discharge rate" and whose "type" is "Ampere" has a "cur-value" of
3043000, which if taken as mA means it's drawing over three thousand
amperes, a completely ludicrous figure.  And this isn't just a driver
returning ridiculous results, because envstat(8) prints reasonable
values.

It's also not clear to what extent that text from sysmon_envsys (which
is in section 9) is supposed to be applicable to the dictionary which
crosses from kernel to userland (as opposed to the kernel-internal
interfaces it documents).

If this is going to be a people-are-supposed-to-write-code-to-this
published interface, it really needs clear and correct documentation
and a sanely constructed API.  The existing manpages are not clear, not
complete (unless I've missed something), and occasionally not even
correct, and the API is a confusing hybrid between OO and C.  And
that's not even going into all the underlying semantic issues.

So, where can I find the units of those type strings?  Do I have to
UTSL on envstat(8) and assume that it's doing it right?  Or did I miss
something somewhere?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

zhixiang yu | 14 Apr 2013 18:25
Picon

Re: [GSoC 2013] Interested in "Light weight precision user level time reading"

cc: tech-kern since it also touches kerneland


On Mon, Apr 15, 2013 at 12:17 AM, zhixiang yu <zxyu.core <at> gmail.com> wrote:
Hi List,

I'm a graduate student from China. I'm interested in the NetBSD's "Light weight precision user level time reading" project. I'd like to take it as my GSoC 2013 project.

But before sending the detailed proposal, I'd like listen to your advices/comments since my solution is a bit different: Allocate one special page on which the kernel and user-space process can share data such as bintime,etc. The kernel will update the shared data at some event point, the kernel will also need to tell which timecounter it's using. The userspace just reads out the bintime and read the timecounter to adjust the final result. Sure the concurrency between kernel and userspace should be resolved properly.

What do you think about this solution? Is it acceptable?  

Thanks in advance


Gmane