Subject: Hiccups in UVM Code integration!!!
To: None <>
From: Sumantra Kundu <>
List: tech-kern
Date: 07/23/2006 12:03:43

   I am experiencing some difficulties while trying to rearrange my
code to be added as a hook inside the uvm.
Here is a description of what I am doing :

(i) I have two files : uvm_cca.h and uvm_cca.c. Inside uvm_cca.h,
there is a function called uvm_cca_attach () which is called from
uvm_init (after  link_pool_init()).

(ii) I modified "struct uvm "  to include a pointer "struct uvm_cca
Inside uvm_cca.c I have
    static struct uvm_cca uvm_cca_object;
and in uvm_attach(),
       uvm.uvm_cca_object = &uvm_cca_object;

(iii) Modified Makefile to include "uvm_cca.h"

(iv) Now whenever, I call "uvm_cca_attach()"  inside uvm_init(), I am
getting the following error message:
/usr/src/sys/uvm/uvm_init.c: In function `uvm_init':
/usr/src/sys/uvm/uvm_init.c:90: error: invalid application of `sizeof'
to an incomplete type
/usr/src/sys/uvm/uvm_init.c:116: warning: implicit declaration of
function `uvm_km_init'
/usr/src/sys/uvm/uvm_init.c:149: warning: implicit declaration of
function `uvm_loan_init'
/usr/src/sys/uvm/uvm_init.c:159: error: `UAO_FLAG_KERNSWAP' undeclared
(first use in this function)
/usr/src/sys/uvm/uvm_init.c:159: error: (Each undeclared identifier is
reported only once
/usr/src/sys/uvm/uvm_init.c:159: error: for each function it appears in.)
/usr/src/sys/uvm/uvm_init.c: At top level:
/usr/src/sys/uvm/uvm_init.c:61: error: storage size of `uvm' isn't known

(v) If I remove uvm_attach (),, the error messages are not there but
then the uvm_cca is not properly initialized and the kernel
experiences page fault...

(vi) Also, I am not seeing any uvm_cca.o files being created
indicating that probably the Makefile (inside uvm) is not the only
place which needs to be modified to include my code. Also, there is no
more any "file.uvm" file in the latest check out of the code...

I am stuck with this stupid problem for the last three days now?