Building x86 uberapp

Ok as a first step, I would recommend replacing an existing extension (starting with xh_ prefix) within UOBJLIST.in instead of adding a new one. This will help us get the shortest path towards getting your new extension in the mix.

So, perhaps replace xh_hyperdep with xh_uhcalltest

Here is what I had attempted to do to register a new hypapp:

  • added XMHFGEEC_SLAB_XH_app to include/xmhf-config.h
  • added xh_app to /uxmhf/xmhf-uobjs/UOBJLIST.in

I will replace an existing app and try that.

Well after you replace an existing app within UOBJLIST.in you will need to take the following steps:

  1. replace XMHFGEEC_SLAB_XH_HYPERDEP with XMHFGEEC_SLAB_XH_UHCALLTEST within include/xmhf-config.h; keep the numbering as is (13 in this case)

  2. replace XMHFGEEC_SLAB_XH_HYPERDEP with XMHFGEEC_SLAB_XH_UHCALLTEST in the static xc_hypapp_info_t _xcihub_hypapp_info_table[] definition within xmhf-uobjs/include/xc.h

  3. add xh_uhcalltest.hwithin xmhf-uobjs/include/; use xmhf-uobjs/include/xh_hyperdep.h as a reference and adapt and change definitions to have the UHCALLTEST/uhcalltest prefix where appropriate. Ensure you use non-conflicting hypercall ids (e.g., 0xC0, 0xC1 should be changed to something else so that if we use hyperdep and uhcalltest they wont conflict)

  4. use xmhf-uobjs/xh_hyperdep/* as a template for your uhcalltest extension. Ensure you edit the .gsm file and change uobj-name, uobj-callees and uobj-uapicallees based on whether your extension calls other uobjs or provides APIs for other uobjs.

That should be it

@amitvasudevan, thanks!

I’m currently running into a build issue. for target '_uobjs_configureandgenerateuobjinfo'.
build.log (6.6 KB)

Can you post the full build log?

Can you post contents of your UOBJLIST file and the output of ls -l within uxmhf-uobjs?

UOBJLIST:

	"uobj-list": 	"	
						geec_sentinel
						geec_prime
						xc_init
						xc_exhub
						xc_ihub
						xc_nwlog
						uapi_gcpustate
						uapi_hcpustate
						uapi_slabmempgtbl
						uapi_sysdata
						uapi_iotbl
						uapi_uhmpgtbl
						xh_syscalllog
						xh_uhcalltest
						xh_ssteptrace
						xg_richguest
                                        "
}

ls -l xmhf-ubojs:

drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 geec_prime
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 geec_sentinel
drwxrwxr-x 2 slab slab 4096 Nov 13 13:13 include
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 uapi_gcpustate
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 uapi_hcpustate
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 uapi_iotbl
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 uapi_slabmempgtbl
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 uapi_sysdata
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 uapi_uhmpgtbl
-rw-rw-r-- 1 slab slab  344 Nov 13 14:34 UOBJLIST
-rw-rw-r-- 1 slab slab  343 Nov 13 14:34 UOBJLIST.in
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 xc_exhub
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 xc_ihub
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 xc_init
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 xc_nwlog
drwxrwxr-x 2 slab slab 4096 Nov 13 14:39 xg_richguest
drwxrwxr-x 2 slab slab 4096 Apr  8  2020 xh_aprvexec
drwxrwxr-x 3 slab slab 4096 Nov 13 14:33 xh_hyperdep
drwxrwxr-x 2 slab slab 4096 Nov 13 14:39 xh_ssteptrace
drwxrwxr-x 3 slab slab 4096 Nov 13 14:39 xh_syscalllog
drwxrwxr-x 2 slab slab 4096 Nov 13 14:39 xh_uhcalltest

Can you link me to your xmhf-uobjs/xh_uhcalltest/xh_uhcalltest.gsm ?

here you go: https://github.com/slab14/uberxmhf/blob/feature-x86-newuhcalltest/uxmhf/xmhf-uobjs/xh_uhcalltest/xh_uhcalltest.gsm

Revise your .gsm to have the following for uobj-callees and uobj-uapicallees node:

"uobj-callees": " ",
"uobj-uapicallees" : [],

same error as before

Just want to make sure your UOBJLIST is a correctly formed JSON file. In your post above, I did not see the trailing " and } after xg_richguest

yes, sorry I forgot to include those. I will edit the post

Ok. Lets try this:

Edit src/tools/umf/umf.ml within uberspark.git:develop and change line 739 from:

Uslog.current_level := Uslog.ord Uslog.Info;

to

Uslog.current_level := Uslog.ord Uslog.Debug;

Rebuild and re-install uberspark current-generation toolchain and try to build the micro-hypervisor again. Post the resulting build log.

hmmm…, I rebuild uberspark but I don’t see any additional output from the build failure.
build.log (6.2 KB)

Did you reinstall the uberspark tool-chain via sudo make install? The above kludge should spew out more verbose debug info during the build process…

I did, and I just re-ran make install. And I’m still getting the same outputs.

When I remove my xh_uhcalltest and replace it with xh_hyperdep in UOBJECTS.in, the build succeeds. The step that occurs after my build failure is

[umf] Parsed all uobjs
[umfparse]  Proceeding to compute memory map

Found the issue.

There were missing entries in some of the *.gsm files that can call the new hypapp. Specifically, xh_uhcalltest needed to be added to xc_init.gsm and xc_ihub.gsm

Coolio. So are you able to build successfully now?