Linux-Development-Sys Digest #823, Volume #6     Sat, 12 Jun 99 10:15:46 EDT

Contents:
  Re: Kernel Hacking...logo (Daniel Robert Franklin)
  Re: Testing a kernel, boot from floppy? (Villy Kruse)
  Re: Testing a kernel, boot from floppy? (Villy Kruse)
  Kernel Hacking...logo (Lenny Grosso)
  Re: Pinning a thread to a processor ("Karsten Scholtyssik")
  pentium instrumentation driver (gquinn)
  Re: Run time measurement with micro (or at least milli)-second  resolution help 
please (Riku Saikkonen)
  Re: TAOs: Much to do about nothing? (Christopher B. Browne)
  Re: Problems with Soundblaster 64 PCI (ES1370) (Andres Heinloo)
  Re: Pinning a thread to a processor ("Karsten Scholtyssik")
  Re: Configuration Manager for Linux (Jonathan Abbey)
  Re: power off after shutdown --> no more in 2.2.x ? (Igor Zlatkovic)
  Re: power off after shutdown --> no more in 2.2.x ? (Martin Wilhelm)
  Re: How can I use PCI board memory? ([EMAIL PROTECTED])
  SIGALRM and serial i/o

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (Daniel Robert Franklin)
Subject: Re: Kernel Hacking...logo
Date: 12 Jun 99 09:16:13 GMT

Lenny Grosso <[EMAIL PROTECTED]> writes:

>Hello,
>       I was hacking through some of the kernel source files, when i noticed
>this one. linux_logo.h .  It interested me, because i wanted to use this
>functionality.  

>Does anybody know where the heck it is called from, how to enable it, or
>how to use, or how to create a new image to be displayed.  Is the data
>in hexidecimal form.

This is for a frame-buffer console. When you compile support for a
frame-buffer console in the kernel, and enable it with the appropriate
boot paramters, you get the cute penguin at the top of your screen as you
boot. See Documentation/fb in the linux source tree.

Cheers,

- Daniel
--
******************************************************************************
*       Daniel Franklin - Postgraduate student in Electrical Engineering
*       [EMAIL PROTECTED]
******************************************************************************

------------------------------

From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: Testing a kernel, boot from floppy?
Date: 12 Jun 1999 11:14:04 +0200

In article <[EMAIL PROTECTED]>,
Medical Electronics Lab  <[EMAIL PROTECTED]> wrote:
>Lew Pitcher wrote:
> 
>> Sorry Dr. Mike, but I missed the first part of this conversation,
>> and chose this spot to jump in to.
>> 
>> Konrad: Why can't you
>> 
>>         make zdisk
>> 
>> to make a bootable floppy?
>> 
>
>I tried that, but it didn't work.  I think the floppy has to have
>a lot of other stuff on it as well as the (compressed) kernel image.
>


Make zdisk does nothing but dd the image to the floppy.  Once you do
that the floppy can hold only the boot image; no file system of any sort.

Works, as long as you don't need an inital ramdisk for any reason.
You do need to set the root disk and root readonly with the rdev
command.

Villy

------------------------------

From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: Testing a kernel, boot from floppy?
Date: 12 Jun 1999 11:20:58 +0200

In article <[EMAIL PROTECTED]>,
Medical Electronics Lab  <[EMAIL PROTECTED]> wrote:

>You ain't kidding it's dangerous!  I was reading the HOWTO
>manuals, and it said I could remove a bad boot block with
>dd.  After running lilo on my hard drive (which I shouldn't
>have, but the manual seemed like it was ok :(  I got the
>letters LIL-  and then my system would hang.  So I tried
>to use dd to put the original boot block back, but it
>wiped it out with garbage.  so now I've got a hard disk that
>can't boot itself, but I can boot my system from the
>backup floppy I made originally (whew!).



The proper way of doing this is to use the lilo command with -u option.
It will do some double check on the saved image before resoring it.

Also, the FAQ wasn't totally acurat on the name on the saved boot image.
The saved boot image from MBR on /dev/hda is named /boot/boot.0300
(major no 3 minor no 0).  A saved boot block from a dos file system on
/dev/hda1 is saved in /boot/boot.0301 and so on.  The lilo -u command
knows all that so it won't make a mistake.  Of cours you can use dos
fdisk /mbr to crate a new dos MBR loader, but it cant save a trashed
boot block from a dos partition in for example /dev/hda1.


Villy

------------------------------

From: Lenny Grosso <[EMAIL PROTECTED]>
Subject: Kernel Hacking...logo
Date: Fri, 11 Jun 1999 18:30:28 -0500

Hello,
        I was hacking through some of the kernel source files, when i noticed
this one. linux_logo.h .  It interested me, because i wanted to use this
functionality.  

Does anybody know where the heck it is called from, how to enable it, or
how to use, or how to create a new image to be displayed.  Is the data
in hexidecimal form.

Thanks!
Lenny Grosso

ps...its in /usr/src/linux/include/linux/linux_logo.h

------------------------------

From: "Karsten Scholtyssik" <[EMAIL PROTECTED]>
Subject: Re: Pinning a thread to a processor
Date: Sat, 12 Jun 1999 12:24:57 +0200
Reply-To: "Karsten Scholtyssik" <[EMAIL PROTECTED]>


Peter Samuelson <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
7jsp04$ici$[EMAIL PROTECTED]
>
>
[...]
>  I can think of a few
> situations where you really might know better than the schedule
> algorithm on this, but they are (IMHO) very few and specialized.
Yes, you are right. I am thinking of a scenario with dedicated machines
only running one singlethreaded program (e.g. MPI Applications).
During my performance measurements I noticed unpredictable
performance break-downs on SMP machines. On NT I could solve
the problem by using only one processor. But since my program is
to run on Unix/Linux either, I was looking for a way to verify this result
on Linux machines.
[...]
> As I think someone said, it wouldn't be all that hairy of a patch.  The
> hardest part would be userspace integration ... perhaps overload
> nice(2) with a different range?  *hack, hack*

Thank you all for your suggestions!
But it is not *that'* important and I don't have the time to hack
the the kernel.

 Karsten



------------------------------

From: gquinn <[EMAIL PROTECTED]>
Subject: pentium instrumentation driver
Date: Sat, 12 Jun 1999 09:55:33 +0000

There is a wealth of performance information available from pentium
processors.  The hard part is you need to run a privileged instruction
to get it.  For windows NT, there is a device driver to do this.  I was
wondering if
anyone knows of an equivalent for LINUX..... or is there a better way?


------------------------------

From: [EMAIL PROTECTED] (Riku Saikkonen)
Crossposted-To: comp.os.linux.misc
Subject: Re: Run time measurement with micro (or at least milli)-second  resolution 
help please
Date: Sat, 12 Jun 1999 09:55:51 GMT

Virasit Imtawil <[EMAIL PROTECTED]> writes:
>    I am sorry if this is not where I should write but I would like your
>help. I am a beginner here. I use Redhat linux (kernel 2.0.32). I would
>like to know how to measure CPU executing time within the C source code in
>micro (or at least milli)-second resolution. I tried clock() command but

If you run on a Pentium, you can use this:
   extern __inline__ unsigned long long int rdtsc()
   {
     unsigned long long int x;
     __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
     return x;
   }

which gives you the number of clock cycles elapsed since the last
reboot, using the RDTSC machine instruction. It should be accurate to
one clock cycle.

The length of a clock cycle is 1/x where x is the clock speed (in Hz)
of your processor; for example, for a 100 MHz processor, the length of
a clock cycle is 0.01 microseconds.

For slightly more information, see my I/O port programming mini-HOWTO at
<URL:http://metalab.unc.edu/pub/Linux/docs/HOWTO/mini/IO-Port-Programming>.

-- 
-=- Rjs -=- [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Christopher B. Browne)
Crossposted-To:  alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: TAOs: Much to do about nothing?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 11 Jun 1999 13:40:04 GMT

On Fri, 11 Jun 1999 13:11:50 +0200, Paolo Torelli
<[EMAIL PROTECTED]> posted:
>Also, the text is pretty chaotic in its contents (should be re-arranged
>in a better way) but what I wanted to do was to explain better the
>situation. 

I think it is quite successful at doing this, such as it is.

It nicely maintains the too-abstract-to-do-anything-about approach
of providing design constraints that do not have clear definitions.

The problem with this whole discussion has been that the claims of
"what should be" do not provide a specific model of what should be,
but merely touch at the edges to say vague things about what should
be.

The best analogy I can think of is that of a would-be sculptor who
proposes starting to cut away at a $50,000 chunk of marble to make a
sculpture of a beautiful woman.

A sculptor that *realistically* hopes to get that piece of marble should
draw sketches, and perhaps build a clay model.  Or perhaps try to justify
the access by saying: "Take a look at the other works I have made.
I have made some decent sculptures before, and based on my track record,
it is reasonable to expect something nice here."

Instead of providing that, we instead hear the plan:
  "Here's a big piece of marble; my plan is to chip away everything that
  doesn't look like a beautiful woman."

A design for an operating system should outline the major sets of
abstractions being used.

Instead of hearing what abstractions are actually supposed to be 
provided in the various areas of functionality, we see things like:

  "Thinking to the poor and bethrayed programmer, the programming
  interface will be studied to be as more powerful and abstract as
  possible..."

That's not design; that's mere platitudes; wishful thinking.  "We'll chip
away everything that isn't powerful and abstract."

How about instead writing an outline that parallels books that have
been written about OS designs?

Two that leap immediately to mind are The Design and Implementation of
the 4.4 BSD UNIX Operating System, which documents the BSD architecture,
and the Be Developer's Guide, Book 1.  I suspect that The QNX 4 Real-Time
Operating System would also represent a good reference in the same vein,
though I have not seen it.

They describe the major "modules" of functionality in the respective
systems, and how they interrelate.  Both are well written books about
designs that are clearly well-thought-out.

Major "kernel areas" that would need to be outlined for an OS that would
include a graphical component include:
- Memory management
- Process management
- Interprocess communications
- Device management
- Filesystem management
- Network management
- Security management
- The graphics rendering model
- The event management system
- Window management
- Interprocess communications as applied in the graphical environment
- Overall "desktop" management

This may not be a complete list of the sorts of abstractions that need
to be detailed; I was very interested to see that almost the first thing
the Be book describes is its message queueing model, which is apparently
very important with BeOS.

An operating system is composed of these sorts of things, and in order
to have any sort of picture of what the OS is supposed to look like, 
they need to be outlined, or, preferably, detailed.

Supposing the system is supposed to be "completely object oriented,"
then a major area needing to be elaborated on in *great* detail *early
on* would obviously be the "Object management model."

Descriptions of each of these dozen or so major areas of functionality
would represent a "design," at least to a trivial level of detail.

Merely commenting that "Oh, it'll be object oriented, and plug'n'play"
isn't design work; that represents meaningless platitudes.
-- 
Those who do not understand Unix are condemned to reinvent it, poorly.  
-- Henry Spencer          <http://www.hex.net/~cbbrowne/lsf.html>
[EMAIL PROTECTED] - "What have you contributed to free software today?..."

------------------------------

From: Andres Heinloo <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.sound
Subject: Re: Problems with Soundblaster 64 PCI (ES1370)
Date: Sat, 12 Jun 1999 15:27:56 +0300


On Sat, 12 Jun 1999, Peter T. Breuer wrote:

> alsa drivers work fine with my sb pci 128 on my 2.0.36 kernel (and every
> kernel from 2.0.25 up). I have a 1370 chip.
> 
> 
> : Now I suspect that there is something wrong with my hardware, rather than
> : with the sound drivers.
> 
> Recompile.
> 
> And recheck the alsa docs. It needs a few reads!

I just recompiled kernel 2.2.9 + ALSA drivers with gcc 2.7.2.3 (I used
egcs 2.91.57 before). Nothing went better. I'm desperate :-(


Andres.


------------------------------

From: "Karsten Scholtyssik" <[EMAIL PROTECTED]>
Subject: Re: Pinning a thread to a processor
Date: Fri, 11 Jun 1999 16:00:00 +0200
Reply-To: "Karsten Scholtyssik" <[EMAIL PROTECTED]>


bill davidsen <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
7jpdgk$d90$[EMAIL PROTECTED]
> In article <7jmjk5$ih9$[EMAIL PROTECTED]>,
> Karsten Scholtyssik <[EMAIL PROTECTED]> wrote:
>
> | I'm looking for a method to set the CPU affinity of a process/thread.
Under
> | Windows NT,  I use the function SetProcessAffinityMask() - what is the
Linux
> | and/or Solaris equivalent? (I hope there *is* a way at all)
> |
> | I searched the man pages (pthread etc.) to no avail.
>
> Out of curiousity, what do you think this binding with do for you?
It prevents the process from beeing scheduled on a different CPU
which increases the cache locality. It reduces the situations where
the process has to start with a cold cache.

> Also, does this NT call bind the process to the processor or the
> processor to the process?
It binds the process to the processor so that the process is only
scheduled on the given Processor(s).

 Karsten





------------------------------

From: [EMAIL PROTECTED] (Jonathan Abbey)
Subject: Re: Configuration Manager for Linux
Date: 10 Jun 1999 21:24:37 -0500

In article <NBY73.3912$[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:
| 
| Agreed.
| 
| I keep wondering why everyone has the need to continually recreate these
| wheels. 
| 
| - I am aware of about 40 distinct SQL DBMS implementations that are
| claimed to run on Linux. 
| 
| - There are about 5 DBM variants. 
| 
| - Nearly a dozen CORBA implementations. 
| 
| - Probably half a dozen LDAP access schemes. 

Eep.  Just got through reading through Christopher Browne's excellent
database guide pages.  Given all the stuff listed, I can understand
why the decision to produce software using YADB would raise eyebrows.

Nonetheless, the reasons I listed for not using an SQL/LDAP directory
database still hold, especially given the time frame (i.e., before
JDBC) in which Ganymede implementation began.  Ditto the decision to
use RMI rather than CORBA.

Were I to start implementing Ganymede today I guess I might try to
take advantage of some existing database (PostgreSQL?), but even then
making software of this type dependent on someone else's product does
introduce significant risks.

The only other software that I'm familiar with that has attempted to
fill the same ecological niche as Ganymede, UNameIt! by ESM, was built
using UniSQL.  Unfortunately, the company that produced UniSQL dropped
the product, and ESM was left with the responsibility of maintaining
the UniSQL code base for the working life of their product.

They chose instead to drop the product and leave the software business
entirely in favor of consulting.

Ganymede's database won't compare to a whole lot of the databases on
cbbrowne's database survey pages, but it does compare favorably to
many of them, and the ways in which it is strong or weak in comparison
to the others fits with the ways in which Ganymede will be used,
hopefully.  I would also plead that Ganymede is as much a distributed
application as it is a database per se, and that the programmability
of the server is where its value really comes from.

| -- 
| "Just because the code is intended to cause flaming death is no reason
| to get sloppy and leave off the casts." - Tim Smith, regarding sample
| (F0 0F C7 C8) Pentium Death code on comp.os.linux.advocacy
| [EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/framewrk.html>

-- 
===============================================================================
Jonathan Abbey                                        [EMAIL PROTECTED]
Applied Research Laboratories                 The University of Texas at Austin
===============================================================================

------------------------------

From: Igor Zlatkovic <[EMAIL PROTECTED]>
Subject: Re: power off after shutdown --> no more in 2.2.x ?
Date: Sat, 12 Jun 1999 13:01:18 +0000

Stefan Opperskalski wrote:

> Hi,
> does somebody know what have been done to the kernel?
> Since 2.2.x, the power-off function with my asus-boards doesn�t work any
> more.
> Kernel 2.0.36 had this functionality and it worked fine.
>
> I use ASUS TX-97, ASUS P2B-DS, ASUS P2B-S and its always the same... :-/
>
> Any ideas?
>
> Thanks,
> Stefan O.

Hello.

There are two things to consider:
1. Kernel 2.2.x needs a newer /sbin/shutdown than 2.0.36.
2. All this will not work on a multiprocessor machine. The apm driver
disables any power management as soon it detects more than one processor.
APM is not SMP safe.

--
Igor Zlatkovic                  mailto:[EMAIL PROTECTED]
University of Applied Sciences, Frankfurt, Germany, EU
    "If at first you don't succeed, redefine success."
                       -- /usr/bin/fortune, 12.5.1999.




------------------------------

From: Martin Wilhelm <[EMAIL PROTECTED]>
Subject: Re: power off after shutdown --> no more in 2.2.x ?
Date: Sat, 12 Jun 1999 14:11:24 +0200
Reply-To: [EMAIL PROTECTED]

Stefan Opperskalski wrote:
> 
> Hi,
> does somebody know what have been done to the kernel?
> Since 2.2.x, the power-off function with my asus-boards doesn�t work any
> more.
> Kernel 2.0.36 had this functionality and it worked fine.
> 
> I use ASUS TX-97, ASUS P2B-DS, ASUS P2B-S and its always the same... :-/
> 
> Any ideas?

Try to change "halt" to "halt -p" in the /sbin/init.d/halt script.

Another problem: On my Asus P5A board the PowerOff often fails
(mostly if the computer runs longer than one hour).
-> The screen blanks but my harddisks and the power supply are
not disabled.
What can I do to disable the *whole* computer using the power - off
function [halt -p]? :-)

Martin

-- 
martin wilhelm        \ thueringen netz e.V. \  cube e.V. (iG)
 [EMAIL PROTECTED] \ [EMAIL PROTECTED]         \  [EMAIL PROTECTED]
  ICQ: 2316518 (selten) \ [EMAIL PROTECTED]     \  [EMAIL PROTECTED]
   FAX: 089 6661 760496  \ www.thur.de          \  www.cube-ev.org

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: How can I use PCI board memory?
Date: Fri, 11 Jun 1999 13:04:07 GMT

?????? <[EMAIL PROTECTED]> wrote:
: I got  memory of PCI board by :

:   pcibios_read_config_dword(pci_bus, pci_device_fn, PCI_BASE_ADDRESS_0,
: &pci_memaddr);

: in device driver.

: Then, I want to read and write  "pci_memaddr".   How can I access that
: memory area within
: device driver?


You use readb/readw/readl and writeb/writew/writel after calling ioremap
(2.1.x or later) or vremap (2.0.x or earlier).

        Jeff






------------------------------

From: <[EMAIL PROTECTED]>
Subject: SIGALRM and serial i/o
Date: 12 Jun 1999 13:20:12 GMT

Hi everyone,

I'm trying to synchronize the start of reading from a serial port
using the sleep() call. But this seems to disable/wipeout the serial
port settings i.e. a blocking read() call never returns.

All is fine if I exclude the sleep() before reading. Strangely, the simple
thing of having the sleep() call in the code disables serial read ??!

I'm compiling with gcc 2.7.2.3, glibc 2.0.7 and kernel 2.2.9.

Here's the compile options:

CFLAGS  = -Wall -O2 -pedantic-errors -ansi

Here are the include files:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <termios.h>
#include <unistd.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <time.h>
#include <sys/time.h>

I initialize the serial port with:

  else{ /* non async mode */
    fd = open(devname, O_RDWR | O_NOCTTY );
    if( fd < 0 ){ perror("open"); return -1;}
  }

and set the termios structure etc.

All works well until I uncomment sleep() before the main loop.

sleep(obstime->tm_sec < 50 ? 50-obstime->tm_sec : 60-obstime->tm_sec+50);

while( !stop ){
  ret = read(fd, buf, MESLEN);
...
}




------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to