If your disk devices don't support this then you'll need to enable the
CONFIG_LEGACY_EXEC option and fix the target. (This probably will get renamed
because if we get to stuff like 68000 it may be we have a cache big enough to
make execve via it useful)
This makes execve much faster, way faster on slow memory devices. The remaining
performance killer is the lack of vfork.
if (blk == NULLBLK)
uzero((uint8_t *)base, 512);
else {
+#ifdef CONFIG_LEGACY_EXEC
buf = bread(i->c_dev, blk, 0);
if (buf == NULL) {
kprintf("bload failed.\n");
uput(buf, (uint8_t *)base, cp);
bufdiscard((bufptr)buf);
brelse((bufptr)buf);
+#else
+ /* Might be worth spotting sequential blocks and
+ merging ? */
+ udata.u_offset = blk << 9;
+ udata.u_count = 512;
+ udata.u_base = (uint8_t *)base;
+ if (cdread(i->c_dev, 0) < 0) {
+ kprintf("bload failed.\n");
+ return -1;
+ }
+#endif
}
base += cp;
len -= cp;