Re: sys_setup()

H. Peter Anvin (hpa@freya.yggdrasil.com)
15 Mar 1996 07:15:47 GMT


Followup to: <3148227F.2EE9BF1@cacofonix.nt.tuwien.ac.at>
By author: Klaus Kudielka <kkudielk@cacofonix.nt.tuwien.ac.at>
In newsgroup: linux.dev.kernel
>
> Hello,
>=20
> I'm currently debugging the MCA patches for Linux. I'm at 1.3.72.
>=20
> What I like to know is:
>=20
> 1.) Who calls sys_setup() (filesystems.c) during booting? Since the
> function is asmlinkage I assume it is called from an assembler file.
> Anyway, I could not find the call in ANY .S file in the source tree.
>=20

It's asmlinkage because it is a system call. It is run from the user
mode code in main.c (before it execs init.)

>=20
> 2.) What is the boot-up sequence of the assembler files -- up to the
> point where start_kernel() (main.c) is called? These files are very
> difficult to read.
>=20

For Linux/i386:

arch/i386/boot/bootsect.S i386 real mode code, only on raw floppy boots
arch/i386/boot/setup.S i386 real mode code (starts protected mode)
arch/i386/kernel/head.S i386 protected mode (enables paging)
arch/i386/kernel/setup.c i386-specific setup
init/main.c non-architecture specific setup

When booting with LILO, LOADLIN or SYSLINUX, bootsect.S is never
executed; the bootloader does the corresponding work and jumps
directly into setup.S.

-hpa
--=20
PGP public key available - finger hpa@zytor.com
"The earth is but one country, and mankind its citizens." -- Bah=E1'u=
'll=E1h
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.