Hi,
I tried to build Rolands oskit-mach Debian package with the latest OSKit
(0.97.20000505).
i386-gnu-gcc -nostdlib -nostartfiles -r -o kernel.o \
-Wl,-\( /usr/i386-gnu/lib/oskit/multiboot.o ipc_entry.o ipc_hash.o ipc_init.o
ipc_kmsg.o ipc_marequest.o ipc_mqueue.o ipc_notify.o ipc_object.o ipc_port.o
ipc_pset.o ipc_right.o ipc_space.o ipc_splay.o ipc_table.o ipc_target.o ipc_thread.o
mach_msg.o mach_port.o mach_rpc.o mach_debug.o fipc.o act.o ast.o bootstrap.o
counters.o eventcount.o exception.o host.o ipc_host.o ipc_kobject.o ipc_mig.o
ipc_sched.o ipc_tt.o kalloc.o lock.o lock_mon.o mach_clock.o mach_factor.o machine.o
pc_sample.o priority.o processor.o profile.o queue.o sched_prim.o startup.o strings.o
syscall_emulation.o syscall_subr.o syscall_sw.o task.o thread.o thread_swap.o
time_stamp.o timer.o zalloc.o elf-load.o vm_debug.o vm_external.o vm_fault.o vm_init.o
vm_kern.o vm_map.o vm_object.o vm_pageout.o vm_resident.o vm_user.o memory_object.o
device_init.o dev_pager.o net_io.o osenv_mem.o osenv_log.o osenv_irq.o osenv_sleep.o
osenv_synch.o osenv_timer.o osenv_bell.o main.o ds_osenv.o ds_request.o ds_routines.!
o kmsg.o ds_block.o ds_partition.o ds_mem.o ds_bus.o ds_net.o ds_stream.o ds_asyncio.o
version.o memory_object_user_user.o memory_object_default_user.o
memory_object_reply_user.o device_reply_user.o device_error_reply_user.o
device_server.o device_pager_server.o mach_port_server.o mach_server.o mach4_server.o
mach_debug_server.o mach_host_server.o int_init.o pic_isa.o fpu.o gdt.o idt.o ldt.o
mp_desc.o pcb.o phys.o pic.o pit.o trap.o user_ldt.o hardclock.o pmap.o read_fault.o
interrupt.o cswitch.o idt_inittab.o locore.o spl.o mach_i386_server.o -loskit_kern
-loskit_lmm -loskit_com -loskit_unsupp -loskit_dev -loskit_linux_dev -loskit_diskpart
-Wl,-\) -lgcc
/usr/i386-gnu/lib/liboskit_dev.a(synch.o): In function `osenv_intr_enable':
synch.o(.text+0x0): multiple definition of `osenv_intr_enable'
osenv_synch.o(.text+0x38): first defined here
/usr/i386-gnu/bin/ld: Warning: size of symbol `osenv_intr_enable' changed from 41 to 6
in synch.o
/usr/i386-gnu/lib/liboskit_dev.a(synch.o): In function `osenv_intr_disable':
synch.o(.text+0x8): multiple definition of `osenv_intr_disable'
osenv_synch.o(.text+0x0): first defined here
/usr/i386-gnu/bin/ld: Warning: size of symbol `osenv_intr_disable' changed from 55 to
6 in synch.o
/usr/i386-gnu/lib/liboskit_dev.a(synch.o): In function `osenv_intr_enabled':
synch.o(.text+0x10): multiple definition of `osenv_intr_enabled'
osenv_synch.o(.text+0x64): first defined here
/usr/i386-gnu/bin/ld: Warning: size of symbol `osenv_intr_enabled' changed from 22 to
12 in synch.o
collect2: ld returned 1 exit status
make[1]: *** [kernel.o] Error 1
rm i386asm.symc.o i386asm.symc
make[1]: Leaving directory
/mnt/marcus/gnu/hurd/gnumach-oskit/oskit-mach-1:1.2.91/build'
make: *** [stamp-build] Error 2
make: Leaving directory
/mnt/marcus/gnu/hurd/gnumach-oskit/oskit-mach-1:1.2.91'
And indeed, osenv_intr_disable and _enable and _enabled are in
oskit-0.97.20000505/dev/x86/synch.o and linked into liboskit_dev.a
Thosse are the definitions in oskits synch.o:
/*
* Enable/disable interrupts.
*/
inline void
osenv_intr_enable(void)
{
sti();
}
inline void
osenv_intr_disable(void)
{
cli();
}
/*
* Return the current interrupt enable flag.
*/
inline int
osenv_intr_enabled(void)
{
return get_eflags() & EFL_IF;
}
/*
* Disable interrupts returning the old value. Combo of:
* save = osenv_intr_enabled();
* osenv_intr_disable();
*/
inline int
osenv_intr_save_disable(void)
{
int enabled;
if ((enabled = get_eflags() & EFL_IF) != 0)
cli();
return enabled;
}
And these are the ones in oskit-mach:
extern spl_t curr_ipl;
/*
* Enable/disable interrupts.
*/
static spl_t osenv_intr_spl;
void
osenv_intr_disable(void)
{
/* We can be called with interrupts already disabled! */
if (curr_ipl > SPLIO)
/* We are already at higher priority than oskit code normally runs.
I think this only happens in the calls from oskit_rtc_{get,set}.
On the assumption that osenv_intr_enable will be called in
parity from the same interrupt level, we will want to stay at the
same high interrupt level. */
osenv_intr_spl = curr_ipl;
else if (curr_ipl < SPLIO)
/* We are at a level where oskit interrupts are enabled, so we must go
to splio. osenv_intr_enable we will return to the current level. */
osenv_intr_spl = splio ();
}
void
osenv_intr_enable(void)
{
/* We assume we are at splio or higher. */
spl_t s = osenv_intr_spl;
osenv_intr_spl = SPL0;
splx (s);
}
/*
* Return the current interrupt enable flag.
*/
int
osenv_intr_enabled(void)
{
return curr_ipl < SPLIO;
}
Any pointers?
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server
Marcus Brinkmann GNU http://www.gnu.org for public PGP Key
[EMAIL PROTECTED], [EMAIL PROTECTED] PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ [EMAIL PROTECTED]