summaryrefslogtreecommitdiff
path: root/microkernel/mach/gnumach
diff options
context:
space:
mode:
Diffstat (limited to 'microkernel/mach/gnumach')
-rw-r--r--microkernel/mach/gnumach/boot_trace.mdwn191
-rw-r--r--microkernel/mach/gnumach/debugging.mdwn5
-rw-r--r--microkernel/mach/gnumach/hardware_compatibility_list.mdwn7
-rw-r--r--microkernel/mach/gnumach/ports/xen.mdwn87
4 files changed, 146 insertions, 144 deletions
diff --git a/microkernel/mach/gnumach/boot_trace.mdwn b/microkernel/mach/gnumach/boot_trace.mdwn
index ea999a9b..e2de4a28 100644
--- a/microkernel/mach/gnumach/boot_trace.mdwn
+++ b/microkernel/mach/gnumach/boot_trace.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2007, 2008, 2011, 2013 Free Software Foundation,
-Inc."]]
+[[!meta copyright="Copyright © 2007, 2008, 2011, 2013, 2015 Free Software
+Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
@@ -11,190 +11,187 @@ License|/fdl]]."]]"""]]
`if NCPUS > 1` stuff is not being considered so far.
+grub starts the execution at boot\_entry
-> i386/i386at/boothdr.S: \_start
+> i386/i386at/boothdr.S: boot\_entry: sets up C environment, i.e. sets up a basic stack and clears BSS, fixes ifunc.
-> i386/i386at/boothdr.S: boot\_entry
+> i386/i386at/model\_dep.c: c\_boot\_entry: gets multiboot parameters
->> i386/i386at/model\_dep.c: c\_boot\_entry
+>> i386/i386at/boothdr.S: discover\_x86\_cpu\_type: detect processor type
->>> i386/i386at/boothdr.S: discover\_x86\_cpu\_type
+>> i386/i386at/model\_dep.c: i386at\_init: initialize PC-specific stuff
->>> i386/i386at/model\_dep.c: i386at\_init
+>>> i386/i386/pic.c: picinit: initialize 8259 PIC
->>>> i386/i386/pic.c: picinit
+>>> i386/i386at/model\_dep.c: mem\_size\_init: compute memory size
->>>> i386/i386at/model\_dep.c: mem\_size\_init
+>>> i386/intel/pmap.c: pmap\_bootstrap: initialize x86 page table
->>>> i386/intel/pmap.c: pmap\_bootstrap
+>>> i386/i386/gdt.c: gdt\_init: initialize x86 segmentation
->>>> i386/i386/gdt.c: gdt\_init
+>>> i386/i386/idt.c: idt\_init: initialize x86 traps
->>>> i386/i386/idt.c: idt\_init
+>>> i386/i386at/int\_init.c: int\_init: initialize PC interrupts
->>>> i386/i386at/int\_init.c: int\_init
+>>> i386/i386/ldt.c: ldt\_init: initialize x86 segmentation
->>>> i386/i386/ldt.c: ldt\_init
+>>> i386/i386/ktss.c: ktss\_init: initialize x86 task switching
->>>> i386/i386/ktss.c: ktss\_init
+>> kern/startup.c: setup\_main: set up non-hardware specific stuff
->>> kern/startup.c: setup\_main
+>>> kern/debug.c: panic\_init: initialize panic data
->>>> kern/debug.c: panic\_init
+>>> kern/printf.c: printf\_init: initialize printf
->>>> kern/printf.c: printf\_init
+>>> kern/sched\_prim.c: sched\_init: initialize scheduler
->>>> kern/sched\_prim.c: sched\_init
+>>>> kern/processor.c: pset\_sys\_bootstrap: initialize processor sets
->>>>> kern/sched\_prim.c: wait\_queue\_init
+>>>> kern/ast.c: ast\_init: initialize Asychronous System Traps
->>>>> kern/processor.c: pset\_sys\_bootstrap
+>>> vm/vm\_init.c: vm\_mem\_bootstrap: initialize virtual memory
->>>>> kern/ast.c: ast\_init
+>>>> vm/vm\_resident.c: vm\_page\_bootstrap: turn physical pages into virtually allocatable pages
->>>> vm/vm\_init.c: vm\_mem\_bootstrap
+>>>>> vm/vm\_resident.c: pmap\_startup: initialize pages
->>>>> vm/vm\_resident.c: vm\_page\_bootstrap
+>>>> kern/slab.c: slab\_bootstrap: early-initialize SLAB
->>>>>> vm/vm\_resident.c: pmap\_startup
+>>>> vm/vm\_object.c: vm\_object\_bootstrap: initialize VM object management
->>>>> kern/zalloc.c: zone\_bootstrap
+>>>>> vm/vm\_external.c: vm\_external\_module\_initialize: initialize VM external object management
->>>>> vm/vm\_object.c: vm\_object\_bootstrap
+>>>> vm/vm\_map.c: vm\_map\_init: initialize VM maps
->>>>>> vm/vm\_external.c: vm\_external\_module\_initialize
+>>>> vm/vm\_kern.c: kmem\_init: initialize kernel's virtual memory
->>>>> vm/vm\_map.c: vm\_map\_init
+>>>> i386/intel/pmap.c: pmap\_init: initialize remainder of x86 page table
->>>>> vm/vm\_kern.c: kmem\_init
+>>>> kern/slab.c: slab\_init: initialize remainder of SLAB
->>>>> i386/intel/pmap.c: pmap\_init
+>>>> kern/kalloc.c: kalloc\_init: initialize kallocator
->>>>> kern/zalloc.c: zone\_init
+>>>> vm/vm\_fault.c: vm\_fault\_init: initialize VM fault management
->>>>> kern/kalloc.c: kalloc\_init
+>>>> vm/vm\_resident.c: vm\_page\_module\_init: initialize remainder of virtual memory
->>>>> vm/vm\_fault.c: vm\_fault\_init
+>>>> vm/memory\_object.c: memory\_manager\_default\_init: initialize remainder of VM object management
->>>>> vm/vm\_resident.c: vm\_page\_module\_init
+>>> ipc/ipc\_init.c: ipc\_bootstrap: initialize IPC
->>>>> vm/memory\_object.c: memory\_manager\_default\_init
+>>>> ipc/ipc\_table.c: ipc\_table\_init: initialize IPC tables
->>>> ipc/ipc\_init.c: ipc\_bootstrap
+>>>> ipc/ipc\_notify.c: ipc\_notify\_init: initialize IPC notification
->>>>> ipc/ipc\_table.c: ipc\_table\_init
+>>>> ipc/ipc\_hash.c: ipc\_hash\_init: initialize IPC reverse hash table
->>>>> ipc/ipc\_notify.c: ipc\_notify\_init
+>>>> ipc/ipc\_marequest.c: ipc\_marequest\_init: initialize msg-accepted request
->>>>> ipc/ipc\_hash.c: ipc\_hash\_init
+>>> vm/vm\_init.c: vm\_mem\_init: finish initializing VM
->>>>> ipc/ipc\_marequest.c: ipc\_marequest\_init
+>>>> vm/vm\_object.c: vm\_object\_init: finish initializing kernel object
->>>> vm/vm\_init.c: vm\_mem\_init
+>>>> vm/memory\_object\_proxy: memory\_object\_proxy\_init: initialize memory object proxy
->>>>> vm/vm\_object.c: vm\_object\_init
+>>> ipc/ipc\_init.c: ipc\_init: finish initializing IPC
->>>> ipc/ipc\_init.c: ipc\_init
+>>>> kern/ipc\_host.c: ipc\_host\_init: initialize host IPC
->>>>> kern/ipc\_host.c: ipc\_host\_init
+>>>>> kern/ipc\_host.c: ipc\_pset\_init: initialize processor sets ports
->>>>>> kern/ipc\_host.c: ipc\_pset\_init
+>>>>> kern/ipc\_host.c: ipc\_processor\_init: initialize processor ports
->>>>>> kern/ipc\_host.c: ipc\_pset\_enable
+>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL: activate kernel page table
->>>>>> kern/ipc\_host.c: ipc\_processor\_init
+>>> kern/timer.c: init\_timers: initialize timers
->>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL
+>>> kern/mach\_clock.c: init\_timeout: initialize timeout
->>>> kern/timer.c: init\_timers
+>>> kern/xpr.c: xprbootstrap: initialize xpr buffer
->>>> kern/mach\_clock.c: init\_timeout
+>>> kern/time\_stamp.c: timestamp\_init: initialize tick
->>>> kern/xpr.c: xprbootstrap
+>>> kern/mach\_clock.c: [[mapable\_time\_init|interface/device/time]]
->>>> kern/time\_stamp.c: timestamp\_init
+>>> i386/i386at/model\_dep.c: machine\_init: initialize x86 machine
->>>> kern/mach\_clock.c: [[mapable\_time\_init|interface/device/time]]
+>>>> device/cons.c: cninit: initialize console
->>>> i386/i386at/model\_dep.c: machine\_init
+>>>> i386/i386/fpu.c: init\_fpu: initialize 8087 FPU
->>>>> device/cons.c: cninit
+>>>> linux/dev/init/main.c: linux\_init: initialize linux drivers
->>>>> i386/i386/fpu.c: init\_fpu
+>>>>> linux/dev/arch/i386/kernel/irq.c: init\_IRQ: initialize IRQs
->>>>> linux/dev/init/main.c: linux\_init
+>>>>>> linux/dev/arch/i386/kernel/irq.c: reserve\_mach\_irqs: register IRQs to mach
->>>>>> linux/dev/arch/i386/kernel/irq.c: init\_IRQ
+>>>>> linux/dev/kernel/sched.c: linux\_sched\_init: initialize dumb scheduler
->>>>>>> linux/dev/arch/i386/kernel/irq.c: reserve\_mach\_irqs
+>>>>> linux/dev/init/main.c: calibrate\_delay: calibrate delay loop
->>>>>> linux/dev/kernel/sched.c: linux\_sched\_init
+>>>>> linux/dev/glue/kmem.c: linux\_kmem\_init: initialize memory management
->>>>>> linux/dev/init/main.c: calibrate\_delay
+>>>>> linux/src/drivers/pci/pci.c: pci\_init: initialize PCI bus
->>>>>> linux/dev/glue/kmem.c: linux\_kmem\_init
+>>>>>> linux/src/arch/i386/kernel/bios32.c: pcibios\_init: call PCI BIOS32 initialization
->>>>>> linux/src/drivers/pci/pci.c: pci\_init
+>>>>>> linux/src/drivers/pci/pci.c: scan\_bus: enumerate PCI devices
->>>>>>> linux/src/arch/i386/kernel/bios32.c: pcibios\_init
+>>>>>> linux/src/arch/i386/kernel/bios32.c: pcibios\_fixup: apply platform-specific fixes
->>>>>>> linux/src/drivers/pci/pci.c: scan\_bus
+>>>>> linux/dev/glue/net.c: linux\_net\_emulation\_init: initialize network glue
->>>>>>> linux/src/arch/i386/kernel/bios32.c: pcibios\_fixup
+>>>>> linux/dev/drivers/block/genhd.c: device\_setup: initialize block devices
->>>>>> linux/dev/glue/net.c: linux\_net\_emulation\_init
+>>>>>> linux/dev/glue/block.c: blk\_dev\_init: initialize linux block devices
->>>>>> linux/dev/drivers/block/genhd.c: device\_setup
+>>>>>>> linux/src/drivers/block/ide.c: ide\_init: initialize IDE driver
->>>>>>> linux/dev/glue/block.c: blk\_dev\_init
+>>>>>>> linux/dev/drivers/block/floppy.c: floppy\_init: initialize floppy driver
->>>>>>>> linux/src/drivers/block/ide.c: ide\_init
+>>>>>> linux/src/drivers/scsi/scsi.c: scsi\_dev\_init: initialize SCSI drivers
->>>>>>>> linux/dev/drivers/block/floppy.c: floppy\_init
+>>>>>> linux/dev/net/core/dev.c: net\_dev\_init: initialize network drivers
->>>>>>> linux/src/drivers/scsi/scsi.c: scsi\_dev\_init
+>>>>> linux/pcmcia-cs/glue/pcmcia.c: pcmcia\_init: initialize PCMCIA drivers
->>>>>>> linux/dev/net/core/dev.c: net\_dev\_init
+>>>> i386/i386at/autoconf.c: probeio: probe mach-managed devices (com, lpr)
->>>>>> linux/pcmcia-cs/glue/pcmcia.c: pcmcia\_init
+>>>> i386/i386at/model\_dep.c: inittodr: get RTC time
->>>>> i386/i386at/autoconf.c: probeio
+>>>> i386/intel/pmap.c: pmap\_unmap\_page\_zero: unmap address 0
->>>>> i386/i386at/model\_dep.c: inittodr
+>>>> kern/mach\_clock.c: mapable\_time\_init: initialize mappable time
->>>>> i386/intel/pmap.c: pmap\_unmap\_page\_zero
+>>> kern/task.c: task\_init: initialize gnuamch atsk
->>>> kern/task.c: task\_init
+>>>> kern/syscall\_emulation.c: eml\_init: initialize user space emulation code
->>>>> kern/syscall\_emulation.c: eml\_init
+>>> kern/thread.c: thread\_init: initialize thread management
->>>> kern/thread.c: thread\_init
+>>>> i386/i386/pcb.c: pcb\_module\_init: initialize PCB management
->>>>> i386/i386/pcb.c: pcb\_module\_init
+>>>>> i386/i386/fpu.c: fpu\_module\_init: initialize FPU management
->>>>>> i386/i386/fpu.c: fpu\_module\_init
+>>> kern/thread\_swap.c: swapper\_init: initialize thread swapper
->>>>>> i386/i386/iopb.c: iopb\_init
+>>> kern/sched\_prim.c: recompute\_priorities: initial priorities computation
->>>> kern/thread\_swap.c: swapper\_init
+>>> kern/mach\_factor.c: compute\_mach\_factor: initial mach factor computation
->>>> kern/sched\_prim.c: recompute\_priorities
+>>> kern/startup.c: thread\_start: create initial kernel thread
->>>> kern/mach\_factor.c: compute\_mach\_factor
+>>> kern/startup.c: cpu\_launch\_first\_thread: start first user thread
->>>> kern/startup.c: start\_kernel\_threads
+>>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL: activate kernel page table
-[...]
-
->>>> kern/startup.c: cpu\_launch\_first\_thread
-
->>>>> i386/i386at/model\_dep.c: startrtclock
+>>>> i386/i386at/model\_dep.c: startrtclock: start clock
->>>>>> i386/i386/pit.c: clkstart
+>>>>> i386/i386/pit.c: clkstart: start 8254 PIT
->>>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL
+>>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL: activate user page table
->>>>> i386/i386/pcb.c: load\_context
+>>>> i386/i386/pcb.c: load\_context: load first context
[...]
@@ -224,7 +221,7 @@ License|/fdl]]."]]"""]]
>> [...]
->> vm\_pageout
+>> vm\_pageout: run the paging out daemon
>> Does not return.
diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn
index a5daf4f1..c14f6111 100644
--- a/microkernel/mach/gnumach/debugging.mdwn
+++ b/microkernel/mach/gnumach/debugging.mdwn
@@ -65,9 +65,12 @@ Another interesting feature is watching a variable, by using
watch 0x123400
-and then type continue, to let Mach continue execution. The debugger will be entered again on any change in that variable. The watch is implemented in hardware, so it does not disturb or slow down execution at all.
+and then type continue, to let Mach continue execution. The debugger will be entered again on any change in that variable. The watch is implemented in hardware, so it does not disturb or slow down execution at all. The same can be achieved programmatically, e.g. using
+ struct db_watchpoint watch = { .task = NULL, .loaddr= 0x40e, .hiaddr = 0x40e+2, .link = NULL};
+ db_set_hw_watchpoint(&watch, 0);
+
# GDB in QEMU
When you're [[running_a_system_in_QEMU|hurd/running/qemu]] you can directly
diff --git a/microkernel/mach/gnumach/hardware_compatibility_list.mdwn b/microkernel/mach/gnumach/hardware_compatibility_list.mdwn
index 32e712c9..460c8aba 100644
--- a/microkernel/mach/gnumach/hardware_compatibility_list.mdwn
+++ b/microkernel/mach/gnumach/hardware_compatibility_list.mdwn
@@ -96,6 +96,11 @@ on the hardware devices they support.
[[hurd/DDE]] provides more up-to-date network device drivers, based on Linux
2.6.29 code, running as user-space processes.
+# BIOS32 Service Directory
+
+GNU Mach is not yet compatible with mmconfig, and PCI access requires the presence of the BIOS32 Service Directory.
+You can check for its presence by running a Linux 32 bits kernel with the kernel parameter "pci=bios" and checking if PCI devices work.
+
# User Success Reports
These boards are known to work. Gnumach/Hurd has been installed and run on these board successfully.
@@ -115,7 +120,7 @@ These boards are known to work. Gnumach/Hurd has been installed and run on these
Some people couldn't get these hardware combinations to work with Hurd.
-Note: The Debian GNU/Hurd installer actually runs on Linux, so it (almost) always works. The critical bit is booting after installation.
+The present Debian GNU/Hurd installer itself runs on Hurd, so failure on the installer may mean that the hardware is uncompatible with Hurd.
* ASUS P5A motherboard and AMD K6-2 333MHz CPU - doesn't boot
* ASUS P2B-LS motherboard with an Intel PII-MMX 400 MHz CPU - this board had a defective onboard NIC (that could not be disable in BIOS) and working 3COM Etherlink III NIC in a PCI bus slot. This combination worked with GNU/Linux. The 3COM NIC is known to work with the Hurd. However, while gnumach/Hurd will boot on this system, it is confused by the defective onboard NIC and unable to use the 3COM NIC. Attempting to start networking generates a continous stream of eth0 and eth1 reset messages on the console that renders the system unusable.
diff --git a/microkernel/mach/gnumach/ports/xen.mdwn b/microkernel/mach/gnumach/ports/xen.mdwn
index a8a1fcbf..1af19257 100644
--- a/microkernel/mach/gnumach/ports/xen.mdwn
+++ b/microkernel/mach/gnumach/ports/xen.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2007, 2008, 2009, 2011, 2013, 2014 Free Software
-Foundation, Inc."]]
+[[!meta copyright="Copyright © 2007, 2008, 2009, 2011, 2013, 2014, 2015 Free
+Software Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
@@ -34,23 +34,46 @@ Replace /dev/sda4 with your partition. Install and use crosshurd to setup a GNU/
# /etc/xen/hurd configuration
+There are two ways to boot a Hurd system: either directly boot gnumach, or boot it through PV-Grub. The former is a bit more complex.
+
+## Directly booting gnumach
+
Here is a sample /etc/xen/hurd configuration
kernel = "/boot/gnumach-xen-pae"
- memory = 256
+ memory = 512
disk = ['phy:sda4,hda,w']
extra = "root=device:hd0"
vif = [ '' ]
ramdisk = "/boot/hurd-modules"
-Do not give more than 580MB memory (due to bootstrap limitations, it's not easy
-to map more).
+`hurd-modules` from http://youpibouh.thefreecat.org/hurd-xen/ was built from a specific libc version,
+/!\ This means that when using this image, your GNU/Hurd system also needs to have the same version!
+
+It is preferrable to rebuild your own hurd-modules, using your own libc version, by using the
+http://youpibouh.thefreecat.org/hurd-xen/build_hurd-modules script.
Suggestions about [[networking_configuration]] are available.
If you need stable MAC addresses, use a syntax like `vif = [
'mac=00:16:3e:XX:XX:XX, bridge=br0' ]`.
+## Booting through pv-grub
+
+# `pv-grub`
+
+Starting from Xen 4.0, you can run the GNU Hurd using `pv-grub`.
+
+Download http://youpibouh.thefreecat.org/hurd-xen/pv-grub.gz into /boot, and use the following for instance:
+
+ kernel = "/boot/pv-grub.gz"
+ memory = 512
+ disk = ['phy:sda4,hda,w']
+ extra = "(hd0)/boot/grub/menu.lst"
+ vif = [ '' ]
+
+extra is now the path to the grub config file, which must contain the usual grub
+command to boot a hurd system.
# Running Hurd with Xen
@@ -66,36 +89,30 @@ and gnumach should get started. Proceed with native-install.
- If `xm` complains about networking (`vif could not be connected`), it's Xen scripts' fault, see Xen documentation for how to configure the network. The simplest way is network-bridge with fixed IPs (note that you need the bridge-utils package for this). You can also just disable networking by commenting the vif line in the config.
- If `xm` complains `Error: (2, 'Invalid kernel', 'xc_dom_compat_check: guest type xen-3.0-x86_32 not supported by xen kernel, sorry\n')`, you most probably have a PAE-enabled hypervisor and a non-PAE gnumach. Either install and boot non-PAE hypervisor and kernel, or rebuilt gnumach in PAE mode.
+# Partitions
-# Building from sources
+You will need the following notation for the gnumach root= parameter:
-If you want to generate these images, first get the `gnumach-1-branch-Xen-branch` branch from gnumach CVS.
-Then look for "Ugly" in `kern/bootstrap.c`, how to generate `hurd-modules` is explained there, and you'll have to fix `EXT2FS_SIZE` and `LD_SO_SIZE` by hand.
-Then use
+root=part:2:device:hd0
- ./configure --enable-platform=xen
- make
+to access the second partition of hd0, for instance.
-The current `hurd-modules` was built from the debian packages `hurd 20070606-2` and `libc0.3 2.6.1-1`.
-/!\ This means that when using this image, your GNU/Hurd system also needs to be a glibc version 2.6 or later-based one!
+You will also need to use the parted storeio module for the /dev entries, for instance:
-# `pv-grub`
+settrans -fgap /dev/hd0s1 /hurd/storeio -T typed part:1:device:hd0
-From Xen 4.0 on you can run the GNU Hurd directly using `pv-grub`,
-without the need to [prepare a special bootstrap
-image](http://youpibouh.thefreecat.org/hurd-xen/build_hurd-modules) (like an
-initrd).
+# Miscellaneous
-Download http://youpibouh.thefreecat.org/hurd-xen/pv-grub.gz into /boot, and use the following for instance:
+[[Internals]].
- kernel = "/boot/pv-grub.gz"
- memory = 256
- disk = ['phy:sda4,hda,w']
- extra = "(hd0,1)/boot/grub/menu.lst"
- vif = [ '' ]
+[[!GNU_Savannah_task 5468]], [[!GNU_Savannah_task 6584]].
-extra is now the path to the grub config file.
+# Building from sources
+If you want to generate your own gnumach kernel, see [[microkernel/mach/gnumach/building]], and use
+
+ ./configure --enable-platform=xen
+ make
## IRC, freenode, #hurd, 2013-11-09
@@ -266,19 +283,6 @@ extra is now the path to the grub config file.
<youpi> we didn't have to care about that in grub1 indeed :)
-# Partitions
-
-You will need the following notation for the gnumach root= parameter:
-
-root=part:2:device:hd0
-
-to access the second partition of hd0, for instance.
-
-You will also need to use the parted storeio module for the /dev entries, for instance:
-
-settrans -fgap /dev/hd0s1 /hurd/storeio -T typed part:1:device:hd0
-
-
## IRC, freenode, #hurd, 2013-11-09
<phcoder> youpi: now I get "hd0: dom0's VBD 768
@@ -295,13 +299,6 @@ settrans -fgap /dev/hd0s1 /hurd/storeio -T typed part:1:device:hd0
[[hurd/libstore/part]].
-# Miscellaneous
-
-[[Internals]].
-
-[[!GNU_Savannah_task 5468]], [[!GNU_Savannah_task 6584]].
-
-
# Host-side Writeback Caching
Optimization possible as it is with