diff options
Diffstat (limited to 'src/sys/include')
-rw-r--r-- | src/sys/include/arch/amd64/i8042var.h | 11 | ||||
-rw-r--r-- | src/sys/include/io/cons/cons.h | 2 | ||||
-rw-r--r-- | src/sys/include/sys/fbdev.h | 2 | ||||
-rw-r--r-- | src/sys/include/sys/spawn.h | 46 |
4 files changed, 57 insertions, 4 deletions
diff --git a/src/sys/include/arch/amd64/i8042var.h b/src/sys/include/arch/amd64/i8042var.h index ec2c36e..53f5029 100644 --- a/src/sys/include/arch/amd64/i8042var.h +++ b/src/sys/include/arch/amd64/i8042var.h @@ -67,10 +67,15 @@ #define I8042_AUX_DISABLE 0xF5 #define I8042_AUX_RESET 0xFF +/* LED shifts */ +#define SCROLL_LED_SHIFT 0 +#define NUM_LED_SHIFT 1 +#define CAPS_LED_SHIFT 2 + /* LED bits */ -#define I8042_LED_SCROLL BIT(0) -#define I8042_LED_NUM BIT(1) -#define I8042_LED_CAPS BIT(2) +#define I8042_LED_SCROLL (1 << SCROLL_LED_SHIFT) +#define I8042_LED_NUM (1 << NUM_LED_SHIFT) +#define I8042_LED_CAPS (1 << CAPS_LED_SHIFT) /* Extended scancode types */ #define I8042_XSC_ENDPR 0 /* End pressed */ diff --git a/src/sys/include/io/cons/cons.h b/src/sys/include/io/cons/cons.h index 4ae99a0..6b5c4f1 100644 --- a/src/sys/include/io/cons/cons.h +++ b/src/sys/include/io/cons/cons.h @@ -39,6 +39,8 @@ struct cons_scr { struct bootvar_fb fbvars; size_t text_x; size_t text_y; + size_t cursor_x; + size_t cursor_y; size_t max_col; size_t max_row; uint32_t scr_bg; diff --git a/src/sys/include/sys/fbdev.h b/src/sys/include/sys/fbdev.h index 2acddbf..e6f5d8f 100644 --- a/src/sys/include/sys/fbdev.h +++ b/src/sys/include/sys/fbdev.h @@ -35,7 +35,7 @@ #include <stdint.h> #endif /* !_KERNEL */ -#define FBDEV_NSO "video:attr" +#define FBDEV_NSO "output.fbdev.attr" struct fb_info { uint32_t width; diff --git a/src/sys/include/sys/spawn.h b/src/sys/include/sys/spawn.h new file mode 100644 index 0000000..d15439d --- /dev/null +++ b/src/sys/include/sys/spawn.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2025 Ian Marco Moffett and L5 engineers + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SYS_SPAWN_H_ +#define _SYS_SPAWN_H_ 1 + +#include <sys/types.h> + +/* + * Spawn a process + * + * @path: Path of program image to spawn + * @argv: Argument list + * + * Returns the PID on success, otherwise a less than + * zero value on failure. + */ +int spawn(const char *path, char **argv); + +#endif /* !_SYS_SPAWN_H_ */ |