# HG changeset patch # User Josef 'Jeff' Sipek # Date 1565114809 14400 # Tue Aug 06 14:06:49 2019 -0400 # Node ID 8efd177e5dd04a77a3489b34659ed788b69b028e # Parent affc76f4b4b5f69f730ae71f6ef2f0283a7ca6f4 sastart: add ORB and IRB structs At the very least, they should be useful to the consumers to avoid having to define their own. Signed-off-by: Josef 'Jeff' Sipek diff --git a/include/sastart.h b/include/sastart.h new file mode 100644 --- /dev/null +++ b/include/sastart.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2019 Josef 'Jeff' Sipek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef __SASTART_H +#define __SASTART_H + +#include + +extern struct orb orb; +extern struct irb irb; + +#endif diff --git a/sastart/Makefile b/sastart/Makefile --- a/sastart/Makefile +++ b/sastart/Makefile @@ -21,7 +21,8 @@ # LIB= sastart -SRCS= setmode.s \ +SRCS= io.c \ + setmode.s \ stack.s BITS= 64 diff --git a/sastart/io.c b/sastart/io.c new file mode 100644 --- /dev/null +++ b/sastart/io.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019 Josef 'Jeff' Sipek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include + +struct orb orb = { + .param = 0x12345678, + .f = 1, + .lpm = 0xff, + .addr = 0xffffffff, /* to be filled it by consumers */ +}; + +struct irb irb;