From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 3B2AEBC69 for ; Mon, 14 Jan 2008 10:58:01 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAPbAikdQDPIba2dsb2JhbACQCgsEBhASB5Z0ghU X-IronPort-AV: E=Sophos;i="4.24,281,1196636400"; d="scan'208";a="7772381" Received: from smtp20.orange.fr ([80.12.242.27]) by mail3-smtp-sop.national.inria.fr with ESMTP; 14 Jan 2008 10:58:00 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2009.orange.fr (SMTP Server) with ESMTP id 4D6F11C000A0 for ; Mon, 14 Jan 2008 10:58:00 +0100 (CET) Received: from [192.168.1.5] (ASt-Lambert-152-1-6-59.w82-124.abo.wanadoo.fr [82.124.36.59]) by mwinf2009.orange.fr (SMTP Server) with ESMTP id 263771C00086 for ; Mon, 14 Jan 2008 10:58:00 +0100 (CET) X-ME-UUID: 20080114095800156.263771C00086@mwinf2009.orange.fr Message-ID: <478B335F.4050804@pragmadev.com> Date: Mon, 14 Jan 2008 11:03:11 +0100 From: David LONY Organization: PRAGMADEV User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Multiboot problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 ocaml:01 libc:01 pointer:01 statically:01 mlvalues:01 argv:01 argv:01 freezes:01 implements:01 char:01 char:01 functions:01 functions:01 callback:02 Hi all, I'm currently trying to make a multiboot sector with ocaml code. Unfortunately, it doesn't work bu I don't know why... To do that, I made a small program in ocaml : let test_char a = a+1 let _ = Callback.register "caml_test_char" test_char;; I also made a dummy libc (all functions return 0 or NULL pointer) because I have to provide all these functions if a wants to statically link a C objects.. This is my main file with the entry point of the kernel : /* Include definitions of the multiboot standard */ #include #include #include #include /* This is the entry point of the kernel */ void sos_main(unsigned long magic, unsigned long addr) { static char * argv[]={ "ocaml", NULL }; multiboot_info_t *mbi; /* Retrieve grub information (memory...etc) */ mbi = (multiboot_info_t *) addr; caml_startup(argv); /* Clean the screen and put a 'A' on it */ sos_x86_videomem_setup(); sos_x86_videomem_cls(SOS_X86_VIDEO_BG_BLACK); sos_x86_videomem_putchar(1, 0, SOS_X86_VIDEO_FG_WHITE | SOS_X86_VIDEO_BG_BLACK,'A'); /* An operatig system never ends */ for (;;) continue; return; } But qemu freezes when I call the caml_startup function (If I removed it, it works well...)...Perhaps the caml_startup function relies on C function that I don't implements ? If someone have an idea.... Because I must call this function (caml_startup) in order to call my ocaml function (test_char)... Thanks a lot. Regards, David LONY