Add an opaque parameter to boot_set API, move function to monitor.c