linksos-commit Mailing List for Links OS: Swift, Secure, Straightforward (Page 4)
Status: Inactive
Brought to you by:
terencevs
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(135) |
Feb
(3) |
Mar
(86) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <smu...@us...> - 2003-03-15 23:30:27
|
Update of /cvsroot/linksos/bin/devel/x86/apps_n_tools In directory sc8-pr-cvs1:/tmp/cvs-serv13764/apps_n_tools Log Message: Directory /cvsroot/linksos/bin/devel/x86/apps_n_tools added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:30:15
|
Update of /cvsroot/linksos/bin/devel/x86 In directory sc8-pr-cvs1:/tmp/cvs-serv13700/x86 Log Message: Directory /cvsroot/linksos/bin/devel/x86 added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:30:07
|
Update of /cvsroot/linksos/bin/bin/linksos/img In directory sc8-pr-cvs1:/tmp/cvs-serv13549/img Log Message: Directory /cvsroot/linksos/bin/bin/linksos/img added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:30:07
|
Update of /cvsroot/linksos/bin/bin/linksos/iso In directory sc8-pr-cvs1:/tmp/cvs-serv13549/iso Log Message: Directory /cvsroot/linksos/bin/bin/linksos/iso added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:57
|
Update of /cvsroot/linksos/bin/bin/linksos In directory sc8-pr-cvs1:/tmp/cvs-serv13429/linksos Log Message: Directory /cvsroot/linksos/bin/bin/linksos added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:57
|
Update of /cvsroot/linksos/bin/bin/drivers In directory sc8-pr-cvs1:/tmp/cvs-serv13429/drivers Log Message: Directory /cvsroot/linksos/bin/bin/drivers added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:57
|
Update of /cvsroot/linksos/bin/bin/apps_n_tools In directory sc8-pr-cvs1:/tmp/cvs-serv13429/apps_n_tools Log Message: Directory /cvsroot/linksos/bin/bin/apps_n_tools added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:49
|
Update of /cvsroot/linksos/bin/stable In directory sc8-pr-cvs1:/tmp/cvs-serv13361/stable Log Message: Directory /cvsroot/linksos/bin/stable added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:49
|
Update of /cvsroot/linksos/bin/Other In directory sc8-pr-cvs1:/tmp/cvs-serv13361/Other Log Message: Directory /cvsroot/linksos/bin/Other added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:49
|
Update of /cvsroot/linksos/bin/devel In directory sc8-pr-cvs1:/tmp/cvs-serv13361/devel Log Message: Directory /cvsroot/linksos/bin/devel added to the repository |
|
From: <smu...@us...> - 2003-03-15 23:29:49
|
Update of /cvsroot/linksos/bin/bin In directory sc8-pr-cvs1:/tmp/cvs-serv13361/bin Log Message: Directory /cvsroot/linksos/bin/bin added to the repository |
|
From: <smu...@us...> - 2003-02-06 00:24:47
|
Update of /cvsroot/linksos/linksos/boot
In directory sc8-pr-cvs1:/tmp/cvs-serv30421/boot
Modified Files:
multiboot.h
Added Files:
testfile
Log Message:
Title: Added BSD License
Changes: Added BSD Licence to one file muliboot.h to see if I have now write acces with the cvs
Effects: Makes it more clear what is bsd and what isn't. In the future we may add a thrid party lib.
a=smurf975 b= yui
CVS: ----------------------------------------------------------------------
CVS: required {
CVS: title: Short description of the changes, should be indexable.
CVS: changes: What you actually changed (code differences)
CVS: effects: What effect these changes will have.
CVS: a: Username of approving leader or admin. MUST be filled in.
CVS: } // required
CVS: b: Fill this in if there is a corresponding bugzilla entry.
CVS: Warning: Check your code and log carefully. Are you missing anything?
CVS: ----------------------------------------------------------------------
--- NEW FILE: testfile ---
Index: multiboot.h
===================================================================
RCS file: /cvsroot/linksos/linksos/boot/multiboot.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** multiboot.h 26 Jan 2003 11:31:50 -0000 1.1
--- multiboot.h 6 Feb 2003 00:24:45 -0000 1.2
***************
*** 2,5 ****
--- 2,35 ----
Copyright (c) 2003, LinksOS Developer Team
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 LinksOS Developer Team 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.
+ */
+
+ /*
+ Copyright (c) 2003, LinksOS Developer Team
+ All rights reserved.
*/
/* The magic number for the Multiboot header. */
|
|
From: <bg...@us...> - 2003-02-05 17:03:05
|
Update of /cvsroot/linksos/CVSROOT
In directory sc8-pr-cvs1:/tmp/cvs-serv31309
Modified Files:
loginfo modules
Log Message:
Removing website from cvs
Index: loginfo
===================================================================
RCS file: /cvsroot/linksos/CVSROOT/loginfo,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** loginfo 3 Feb 2003 13:02:41 -0000 1.4
--- loginfo 5 Feb 2003 17:02:28 -0000 1.5
***************
*** 25,29 ****
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
! #CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} ke...@us...
#website/language/en.php $CVSROOT/CVSROOT/syncmail "TRANS %{sv}" lin...@li...
DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} lin...@li...
--- 25,29 ----
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
! CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} smu...@us...
#website/language/en.php $CVSROOT/CVSROOT/syncmail "TRANS %{sv}" lin...@li...
DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} lin...@li...
Index: modules
===================================================================
RCS file: /cvsroot/linksos/CVSROOT/modules,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** modules 29 Dec 2002 00:08:52 -0000 1.3
--- modules 5 Feb 2003 17:02:29 -0000 1.4
***************
*** 25,28 ****
# can be useful for creating a module that consists of many directories
# spread out over the entire source repository.
! website website
! kernel linksos
\ No newline at end of file
--- 25,27 ----
# can be useful for creating a module that consists of many directories
# spread out over the entire source repository.
! kernel linksos
|
|
From: <bg...@us...> - 2003-02-03 12:51:13
|
Update of /cvsroot/linksos/linksos
In directory sc8-pr-cvs1:/tmp/cvs-serv19578
Modified Files:
COPYING
Added Files:
INSTALL
Log Message:
Title: Install instructions
Changes: Added file INSTALL that contains the installation instructions
Effects: This field is redundant
t=n/a b=none
--- NEW FILE: INSTALL ---
First obtain, compile and install grub onto your system. (Install here
doesn't mean to use it as you bootloader but have its program files correctly
placed on your system)
Install grub of a floppy in the manner described below:
1. Format a floppy disk in FAT/EXT/ any supported format:
mkfs -V -t msdos /dev/fd0 <== use fd0 or fd1 as appropriate
2. Mount the floppy:
mount /dev/fd0 /mnt
3. Create a boot directory and a grub directory on the floppy:
mkdir /mnt/boot
mkdir /mnt/boot/grub
4. Copy stage1 & stage2 files to the floppy:
cp -pa /usr/local/share/grub/i386-pc/stage* /mnt/boot/grub
5. Unmount the floppy disk:
umount /mnt
6. Create /(wherever you want)/grubfd.conf file to look as follows:
root (fd0)
install /boot/grub/stage1 d (fd0) (fd0)/boot/grub/stage2 0x8000
quit
7. Install GRUB on the floppy disk(this has to be done as root):
grep -v ^# /(path to grubfd.conf)/grubfd.conf | grub --batch
The following is the output of the above command:
GRUB version x.x.xx (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (fd0)
Filesystem type is fat, using whole disk
grub> install /boot/grub/stage1 d (fd0) (fd0)/boot/grub/stage2 0x8000 p
(fd0)/boot/grub/menu.lst
grub> quit
8. Now in /boot/grub/ we need to create menu.lst to look as follows:
timeout 30
title LinksOS
kernel /boot/kernel.elf
9. Now make kernel.elf and copy it onto /boot/ on the floppy
10. Whenever you make chages to the kernel, you do not have to repeat all the
above processes, just make the kernel and repeat step 9.
And you are Done, pop the disk into your floppy, power up and links will boot.
-----------------------
Brian G. Muita
Index: COPYING
===================================================================
RCS file: /cvsroot/linksos/linksos/COPYING,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** COPYING 26 Jan 2003 11:46:12 -0000 1.1
--- COPYING 3 Feb 2003 12:51:00 -0000 1.2
***************
*** 2,12 ****
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 LinksOS Developer Team 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.
--- 2,27 ----
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 LinksOS Developer Team 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.
|
|
From: <bg...@us...> - 2003-01-26 11:46:15
|
Update of /cvsroot/linksos/linksos In directory sc8-pr-cvs1:/tmp/cvs-serv6231 Added Files: COPYING Log Message: Title: BSD License Changes: Added file COPYING which contains BSD license Effects: LinksOS is now properly licensed a=n/a b=n/a --- NEW FILE: COPYING --- Copyright (c) 2003, LinksOS Developer Team 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 LinksOS Developer Team 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. |
|
From: <bg...@us...> - 2003-01-26 11:31:54
|
Update of /cvsroot/linksos/linksos/main
In directory sc8-pr-cvs1:/tmp/cvs-serv2091/main
Modified Files:
Makefile kstdio.c
Added Files:
cmain.c io.c
Removed Files:
main.c strap.asm
Log Message:
Title: Rebuild of CVS
Changes: Added license and returned code that was removed
Effects: We now have a bootable hello world kernel with correct copyright notice
a=n/a b=n/a
--- NEW FILE: cmain.c ---
/*
Copyright (c) 2003, LinksOS Developer Team
All rights reserved.
*/
#include <multiboot.h>
#include "include/kstdio.h"
#include "include/gdt.h"
desc_table(GDT, 3)
{
{dummy:0},
stnd_desc(0, 0xFFFFF, (D_CODE + D_READ + D_BIG + D_BIG_LIM)),
stnd_desc(0, 0xFFFFF, (D_DATA + D_WRITE + D_BIG + D_BIG_LIM)),
};
struct
{
unsigned short limit __attribute__ ((packed));
union DT_entry *gdt __attribute__ ((packed));
} loadgdt = { (4096 * sizeof(union DT_entry) - 1), GDT };
void cmain(unsigned long magic, multiboot_info_t addr)
{
if(magic != MULTIBOOT_BOOTLOADER_MAGIC){
kprintf("Invalid bootloader magic number\n");
return;
}
/*Load GDT*/
asm ("pushl $2; popf"); /* Zero the flags */
asm volatile /* Load the GDT and the kernel stack */
( /* Loader has cleared ints */
"lgdtl (loadgdt) \n" /* Load our own GDT */
"movw $0x10,%%ax \n" /* Init data registers t_data */
"movw %%ax,%%ds \n"
"movw %%ax,%%es \n"
"movw %%ax,%%fs \n"
"movw %%ax,%%gs \n"
"ljmp $0x08,$next \n" /* Flush prefetch queue */
"nop\n"
"nop\n"
"next: \n" /* Continue here */
:
: "r" (GDT)
: "%eax"
);
kprintf("LinksOS v0.0.1a kernel booted.\nI'll loop forever now.\n");
}
Index: Makefile
===================================================================
RCS file: /cvsroot/linksos/linksos/main/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Makefile 1 Jan 2003 07:27:39 -0000 1.6
--- Makefile 26 Jan 2003 11:31:50 -0000 1.7
***************
*** 7,39 ****
GCC = gcc
- #The assembler
- ASM = nasm
-
- # The linker
- LD = ld
-
- # The kernel filename
- KERNELFN = kernel.bin
-
# The object files
! OBJS = kstdio.o main.o strap.o
#Compiler parameters
CFLAGS = -I$(INCLUDE) -Wall -O -fomit-frame-pointer -c -o
- ASMFLAGS = -f elf
-
-
- .SUFFIXES: .asm
-
- ALL: $(KERNELFN)
! $(KERNELFN): $(OBJS)
! $(LD) -Bstatic -o $(KERNELFN) $(OBJS) -Map kernel.map -T kernel.ls
.c.o:
$(CC) $(CFLAGS) $@ $<
-
- .asm.o:
- $(ASM) $(ASMFLAGS) $<
clean:
--- 7,23 ----
GCC = gcc
# The object files
! OBJS = kstdio.o cmain.o io.o
!
! #Include
! INCLUDE = ../include
#Compiler parameters
CFLAGS = -I$(INCLUDE) -Wall -O -fomit-frame-pointer -c -o
! ALL: $(OBJS)
.c.o:
$(CC) $(CFLAGS) $@ $<
clean:
Index: kstdio.c
===================================================================
RCS file: /cvsroot/linksos/linksos/main/kstdio.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** kstdio.c 1 Jan 2003 07:27:39 -0000 1.3
--- kstdio.c 26 Jan 2003 11:31:50 -0000 1.4
***************
*** 1,17 ****
! /****************************************************************************\
! ** filename: kstdio.c **
! ** creation date: 11/29/2002, 0109 MST **
! ** author: Charles Banas **
! ** version: 0.01 **
! ******************************************************************************
! ** revision history: **
! ** 11/29/2002 - 0109 MST - Charles **
! ** added kprintf(). let's see if this baby links, eh. **
! \****************************************************************************/
#include "include/kstdio.h"
!
! typedef unsigned char u_char; /* this needs to be moved to a "types"
! header file. */
void kprintf(char* text)
--- 1,10 ----
! /*
! Copyright (c) 2003, LinksOS Developer Team
! All rights reserved.
! */
+ #include <types.h>
#include "include/kstdio.h"
! #include "include/io.h"
void kprintf(char* text)
***************
*** 24,45 ****
{
/* write 'text' to screen. */
! static char* screen = (char*)0xB8000;
! int j;
! static int i = 0;
! static u_char prev;
- for(j=0;text[j]!=0;++i,j++) { /* don't be scared. it's kosher. :) */
- if (((text[j]==0xa) || (text[j]==0xd)) && ((prev==0xa) || (prev==0xd))) {
- continue;
- prev = text[j];
- }
- else if ((text[j]==0xa) || (text[j]==0xd)) {
- i = i + (0xa0);
- prev = text[j];
- continue;
- }
- prev = text[j];
- screen[i*2] = text[j];
- screen[i*2+1] = 7;
- }
}
--- 17,73 ----
{
/* write 'text' to screen. */
! static u_char *screen = (u_char*)0xB8000;
! static int curchar,off;
!
! /*First get the cursor's current position on screen*/
! outportb(0x3d4, 0x0e); /* Get cursor Y position */
! off = inportb(0x3d5);
! off <<= 8;
! outportb(0x3d4, 0x0f); /* And add cursor X position */
! off += inportb(0x3d5);
! off <<= 1;
!
! while((curchar = *text++)){ /*Process text char by char*/
! switch(curchar){
!
! case '\n': /*It is a carriage return*/
! off = 160 + (off/160)*160;
! break;
!
! default: /*Just spit character onto screen*/
! screen[off++] = curchar;
! screen[off++] = 0x07;
! }
! }
!
! /*Move cursor to new screen position*/
! off >>= 1;
! outportb(0x3d4,0x0f);
! outportb(0x3d5,off & 0x0ff);
! outportb(0x3d4,0x0e);
! outportb(0x3d5,off >> 8);
! }
!
!
! /*
! l2str: Converts long or int (if you cast) to a string.
! */
! void l2str(unsigned char *dest, unsigned long num)
! {
! unsigned char j=0,i;
! u_char tmp;
!
! do{
! dest[j++]=48+(num%10); /*Get the ascii code of the digit*/
! num = num / 10;
! }while(num);
! dest[j--]='\0'; /*Null terminate the string*/
!
! /*But now dest is reversed so reverse it*/
! for(i=0;i<=j;--j,i++){
! tmp=dest[i];
! dest[i]=dest[j];
! dest[j]=tmp;
! }
}
--- main.c DELETED ---
--- strap.asm DELETED ---
|
|
From: <bg...@us...> - 2003-01-26 11:31:54
|
Update of /cvsroot/linksos/linksos/main/include
In directory sc8-pr-cvs1:/tmp/cvs-serv2091/main/include
Modified Files:
kstdio.h
Added Files:
gdt.h io.h
Log Message:
Title: Rebuild of CVS
Changes: Added license and returned code that was removed
Effects: We now have a bootable hello world kernel with correct copyright notice
a=n/a b=n/a
--- NEW FILE: gdt.h ---
/*
Copyright (c) 2003, LinksOS Developer Team
All rights reserved.
*/
#ifndef __GDT_H
#define __GDT_H
/*
* The desc_table, stnd_desc and gate_desc macros piece together a descriptor
* table.
*
* Example usage:
*
* desc_table(GDT, 2) {
* stnd_desc(0, 0, 0),
* stnd_desc(0, 0xfffff, (D_CODE + D_READ + D_BIG + D_BIG_LIM))
* };
*
* gate_desc(offset, selector, control) ;For gate descriptors
* stnd_desc(base, limit, control) ;For all other descriptors
*
* base is the full 32 bit base address of the segment
* limit is one less than the segment length in 1 or 4K byte units
* control the sum of all the "D_" equates which apply (for call gates, you
* also add the "parameter dword count" to flags).
*
* desc_table(symbol, size) ;Start a descriptor table
*
* symbol is the C symbol that is used for this descriptor table
* size is the amount of descriptors defined in this table
*
* The descriptor table can be accessed in the code through the symbol [symbol],
* which is defined as an array of DT_entry unions. Every DT_entry union can
* contain either a normal descriptor, gate descriptor, or some other value
* which is 64 bits in size (this could be used to store custom info in the
* dummy descriptor of the GDT, for instance.)
*
* The dummy value can be inserted like this:
*
* desc_table(GDT, 2) {
* {dummy: 0x1234567890123456},
* ...
* };
*/
/*
* Each descriptor should have exactly one of next 8 codes to define the
* type of descriptor
*/
#define D_LDT 0x200 /* LDT segment */
#define D_TASK 0x500 /* Task gate */
#define D_TSS 0x900 /* TSS */
#define D_CALL 0x0C00 /* 386 call gate */
#define D_INT 0x0E00 /* 386 interrupt gate */
#define D_TRAP 0x0F00 /* 386 trap gate */
#define D_DATA 0x1000 /* Data segment */
#define D_CODE 0x1800 /* Code segment */
/*
* Descriptors may include the following as appropriate:
*/
#define D_DPL3 0x6000 /* DPL3 or mask for DPL */
#define D_DPL2 0x4000 /* DPL2 or mask for DPL */
#define D_DPL1 0x2000 /* DPL1 or mask for DPL */
#define D_PRESENT 0x8000 /* Present */
#define D_NOT_PRESENT 0x8000 /* Not Present */
/* Note, the PRESENT bit is set by default */
/* Include NOT_PRESENT to turn it off */
/* Do not specify D_PRESENT */
/*
* Segment descriptors (not gates) may include:
*/
#define D_ACC 0x100 /* Accessed (Data or Code) */
#define D_WRITE 0x200 /* Writable (Data segments only) */
#define D_READ 0x200 /* Readable (Code segments only) */
#define D_BUSY 0x200 /* Busy (TSS only) */
#define D_EXDOWN 0x400 /* Expand down (Data segments only) */
#define D_CONFORM 0x400 /* Conforming (Code segments only) */
#define D_BIG 0x40 /* Default to 32 bit mode */
#define D_BIG_LIM 0x80 /* Limit is in 4K units */
/*
* Now we define the structures for descriptors and gates:
*/
struct x86_desc {
unsigned short limit_low; /* limit 0..15 */
unsigned short base_low; /* base 0..15 */
unsigned char base_med; /* base 16..23 */
unsigned char access; /* access byte */
unsigned int limit_high:4; /* limit 16..19 */
unsigned int granularity:4; /* granularity */
unsigned char base_high; /* base 24..31 */
} __attribute__ ((packed));
struct x86_gate {
unsigned short offset_low; /* offset 0..15 */
unsigned short selector; /* selector */
unsigned short access; /* access flags */
unsigned short offset_high; /* offset 16..31 */
} __attribute__ ((packed));
/*
* Descriptor tables are basically arrays of either standard or gate
* descriptors; The exception is the first descriptor, which is a
* 'dummy' and can be filled with anything without crashing the machine.
*
* We define the union DT_entry as a general type of entry in a descriptor
* table; It can contain a normal descriptor, a gate descriptor, or any
* 64-bit number (for defining the dummy entries, if neccessary.)
*/
union DT_entry {
struct x86_desc desc; /* Normal descriptor */
struct x86_gate gate; /* Gate descriptor */
unsigned long long dummy; /* Any other info */
};
/*
* Now we perform the macro magic of the day.
*/
#define desc_table(name,length) union DT_entry name[length] =
#define stnd_desc(base, limit, control) {desc: {(limit & 0xffff), (base & 0xffff), ((base >> 16) & 0xff), \
((control+D_PRESENT) >> 8), (limit >> 16), \
((control & 0xff) >> 4), (base >> 24)}}
#define gate_desc(offset, selector, control) {gate: {(offset & 0xffff), selector, \
(control+D_PRESENT), (offset >> 16) }}
/* These are bound to look a bit cryptic, so I'll just show what the result
* would look like:
*
* desc_table(GDT, 3) {
* stnd_desc(base, limit, control),
* stnd_desc(base, limit, control),
* gate_desc(offset, selector, control)
* };
*
* ... would produce something looking like:
*
* union DT_entry GDT[3] = {
* {desc: {limit_low, base_low, base_med, access, limit_high, granularity, base_high}},
* {desc: {limit_low, base_low, base_med, access, limit_high, granularity, base_high}},
* {gate: {offset_low, selector, word_count, access, offset_high}}
* };
*
* The values are conveted using a bit of cryptic, but straightforward magic.
*/
#endif
Index: kstdio.h
===================================================================
RCS file: /cvsroot/linksos/linksos/main/include/kstdio.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** kstdio.h 24 Dec 2002 00:00:47 -0000 1.1
--- kstdio.h 26 Jan 2003 11:31:50 -0000 1.2
***************
*** 1,21 ****
! /****************************************************************************\
! ** filename: kstdio.h **
! ** creation date: 11/29/2002, 0103 MST **
! ** author: Charles Banas **
! ** version: 0.01 **
! ******************************************************************************
! ** revision history: **
! ** 11/29/2002 - 0103 MST - Charles **
! ** added kprintf(). let's see if this baby links, eh. **
! \****************************************************************************/
!
! #ifndef __DOORS_KSTDIO_H__
! #define __DOORS_KSTDIO_H__
! //extern 'c' {
void kprintf(char* text);
! //};
!
! #endif
--- 1,11 ----
! /*
! Copyright (c) 2003, LinksOS Developer Team
! All rights reserved.
! */
! #ifndef __KSTDIO_H__
! #define __KSTDIO_H__
void kprintf(char* text);
! #endif /* __KSTDIO_H__ */
|
|
From: <bg...@us...> - 2003-01-26 11:31:53
|
Update of /cvsroot/linksos/linksos/include In directory sc8-pr-cvs1:/tmp/cvs-serv2091/include Added Files: types.h Log Message: Title: Rebuild of CVS Changes: Added license and returned code that was removed Effects: We now have a bootable hello world kernel with correct copyright notice a=n/a b=n/a --- NEW FILE: types.h --- /* Copyright (c) 2003, LinksOS Developer Team All rights reserved. */ #ifndef _TYPES_H typedef unsigned char u_char; #endif // ! _TYPES_H |
|
From: <bg...@us...> - 2003-01-26 11:31:53
|
Update of /cvsroot/linksos/linksos In directory sc8-pr-cvs1:/tmp/cvs-serv2091 Modified Files: Makefile Log Message: Title: Rebuild of CVS Changes: Added license and returned code that was removed Effects: We now have a bootable hello world kernel with correct copyright notice a=n/a b=n/a Index: Makefile =================================================================== RCS file: /cvsroot/linksos/linksos/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 17 Nov 2002 07:45:48 -0000 1.2 --- Makefile 26 Jan 2003 11:31:49 -0000 1.3 *************** *** 1,2 **** ! #The main Makefile goes here ! # --- 1,31 ---- ! #No comment ! ! # The linker ! LD = ld ! ! #The target filename ! KERNELFN = kernel.elf ! ! # The object files ! OBJS = main/kstdio.o main/cmain.o main/io.o boot/multiboot.o ! ! #Include ! INCLUDE = ../include ! ! #Compiler parameters ! CFLAGS = -I$(INCLUDE) -Wall -O -fomit-frame-pointer -c -o ! ! ALL: $(KERNELFN) ! ! $(KERNELFN): ! (cd main;$(MAKE)) ! (cd boot;$(MAKE)) ! $(LD) -o $@ $(OBJS) -Map kernel.map -Ttext 0x100000 ! ! clean: ! $(RM) -f $(KERNELFN) kernel.map ! (cd main;$(MAKE) clean) ! (cd boot;$(MAKE) clean) ! ! ! |
|
From: <bg...@us...> - 2003-01-26 11:31:53
|
Update of /cvsroot/linksos/linksos/boot
In directory sc8-pr-cvs1:/tmp/cvs-serv2091/boot
Added Files:
Makefile multiboot.S multiboot.h
Log Message:
Title: Rebuild of CVS
Changes: Added license and returned code that was removed
Effects: We now have a bootable hello world kernel with correct copyright notice
a=n/a b=n/a
--- NEW FILE: Makefile ---
#No comment
# Programs to delete and copy files with
RM = rm -f
# The C compiler
GCC = gcc
# The object files
OBJS = multiboot.o
#Include
INCLUDE = ../include
#Compiler parameters
CFLAGS = -I$(INCLUDE) -Wall -O -fomit-frame-pointer -c -o
ALL: $(OBJS)
.S.o:
$(CC) $(CFLAGS) $@ $<
clean:
$(RM) $(KERNELFN) *~ *.o
--- NEW FILE: multiboot.S ---
/*
Copyright (c) 2003, LinksOS Developer Team
All rights reserved.
*/
#define ASM 1
#include "multiboot.h"
.text
.globl start, _start
start:
_start:
jmp multiboot_entry
/* Align 32 bits boundary. */
.align 4
/* Multiboot header. */
multiboot_header:
/* magic */
.long MULTIBOOT_HEADER_MAGIC
/* flags */
.long MULTIBOOT_HEADER_FLAGS
/* checksum */
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
#if !defined(__ELF__)
/* header_addr */
.long multiboot_header
/* load_addr */
.long _start
/* load_end_addr */
.long _edata
/* bss_end_addr */
.long _end
/* entry_addr */
.long multiboot_entry
#endif /* ! __ELF__ */
multiboot_entry:
/* Initialize the stack pointer. */
movl $(stack + STACK_SIZE), %esp
/* Reset EFLAGS. */
pushl $0
popf
/* Push the pointer to the Multiboot information structure. */
pushl %ebx
/* Push the magic value. */
pushl %eax
/* Now enter the C main function... */
call EXT_C(cmain)
/* Halt. */
pushl $halt_message
call EXT_C(kprintf)
loop: hlt
jmp loop
halt_message:
.asciz "Halted."
/* Our stack area. */
.comm stack, STACK_SIZE
--- NEW FILE: multiboot.h ---
/*
Copyright (c) 2003, LinksOS Developer Team
All rights reserved.
*/
/* The magic number for the Multiboot header. */
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
/* The flags for the Multiboot header. */
#ifdef __ELF__
# define MULTIBOOT_HEADER_FLAGS 0x00000003
#else
# define MULTIBOOT_HEADER_FLAGS 0x00010003
#endif
/* The magic number passed by a Multiboot-compliant boot loader. */
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
/* The size of our stack (16KB). */
#define STACK_SIZE 0x4000
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
#ifdef HAVE_ASM_USCORE
# define EXT_C(sym) _ ## sym
#else
# define EXT_C(sym) sym
#endif
#ifndef ASM
/* Do not include here in boot.S. */
/* Types. */
/* The Multiboot header. */
typedef struct multiboot_header
{
unsigned long magic;
unsigned long flags;
unsigned long checksum;
unsigned long header_addr;
unsigned long load_addr;
unsigned long load_end_addr;
unsigned long bss_end_addr;
unsigned long entry_addr;
} multiboot_header_t;
/* The symbol table for a.out. */
typedef struct aout_symbol_table
{
unsigned long tabsize;
unsigned long strsize;
unsigned long addr;
unsigned long reserved;
} aout_symbol_table_t;
/* The section header table for ELF. */
typedef struct elf_section_header_table
{
unsigned long num;
unsigned long size;
unsigned long addr;
unsigned long shndx;
} elf_section_header_table_t;
/* The Multiboot information. */
typedef struct multiboot_info
{
unsigned long flags;
unsigned long mem_lower;
unsigned long mem_upper;
unsigned long boot_device;
unsigned long cmdline;
unsigned long mods_count;
unsigned long mods_addr;
union
{
aout_symbol_table_t aout_sym;
elf_section_header_table_t elf_sec;
} u;
unsigned long mmap_length;
unsigned long mmap_addr;
} multiboot_info_t;
/* The module structure. */
typedef struct module
{
unsigned long mod_start;
unsigned long mod_end;
unsigned long string;
unsigned long reserved;
} module_t;
/* The memory map. Be careful that the offset 0 is base_addr_low
but no size. */
typedef struct memory_map
{
unsigned long size;
unsigned long base_addr_low;
unsigned long base_addr_high;
unsigned long length_low;
unsigned long length_high;
unsigned long type;
} memory_map_t;
#endif /* ! ASM */
|
|
From: <bg...@us...> - 2003-01-26 11:19:07
|
Update of /cvsroot/linksos/linksos/include In directory sc8-pr-cvs1:/tmp/cvs-serv30755/include Log Message: Directory /cvsroot/linksos/linksos/include added to the repository |
|
From: <ke...@to...> - 2003-01-21 00:11:20
|
Update of /cvsroot/linksos/CVSROOT In directory rix.tossell.net:/tmp/cvs-serv32180 Modified Files: loginfo Log Message: Title: Mailing list change Changes: Moved commits to main mailinglist Effects: No longer using dead SF list. a=kennyt Index: loginfo =================================================================== RCS file: /cvsroot/linksos/CVSROOT/loginfo,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** loginfo 31 Dec 2002 21:52:47 -0000 1.7 --- loginfo 21 Jan 2003 00:11:11 -0000 1.8 *************** *** 25,28 **** # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT $CVSROOT/CVSROOT/syncmail -f tossell.net %{sVv} lin...@li... ALL $CVSROOT/CVSROOT/dolog.pl -r /cvsroot/linksos bon...@to... --- 25,28 ---- # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT $CVSROOT/CVSROOT/syncmail -f tossell.net %{sVv} os...@to... ALL $CVSROOT/CVSROOT/dolog.pl -r /cvsroot/linksos bon...@to... |
|
From: <ke...@to...> - 2003-01-21 00:10:04
|
Update of /cvsroot/linksos/kernel/hal/x86 In directory rix.tossell.net:/tmp/cvs-serv32113/hal/x86 Added Files: gdt.h Log Message: Title: gdt.h Changes: Moved gdt.h out of the prototypes dir and into the x86 dir. Effects: Minimizing pollution to other arch's. a=kennyt --- NEW FILE: gdt.h --- #ifndef __GDT_H #define __GDT_H /* * The desc_table, stnd_desc and gate_desc macros piece together a descriptor * table. * * Example usage: * * desc_table(GDT, 2) { * stnd_desc(0, 0, 0), * stnd_desc(0, 0xfffff, (D_CODE + D_READ + D_BIG + D_BIG_LIM)) * }; * * gate_desc(offset, selector, control) ;For gate descriptors * stnd_desc(base, limit, control) ;For all other descriptors * * base is the full 32 bit base address of the segment * limit is one less than the segment length in 1 or 4K byte units * control the sum of all the "D_" equates which apply (for call gates, you * also add the "parameter dword count" to flags). * * desc_table(symbol, size) ;Start a descriptor table * * symbol is the C symbol that is used for this descriptor table * size is the amount of descriptors defined in this table * * The descriptor table can be accessed in the code through the symbol [symbol], * which is defined as an array of DT_entry unions. Every DT_entry union can * contain either a normal descriptor, gate descriptor, or some other value * which is 64 bits in size (this could be used to store custom info in the * dummy descriptor of the GDT, for instance.) * * The dummy value can be inserted like this: * * desc_table(GDT, 2) { * {dummy: 0x1234567890123456}, * ... * }; */ /* * Each descriptor should have exactly one of next 8 codes to define the * type of descriptor */ #define D_LDT 0x200 /* LDT segment */ #define D_TASK 0x500 /* Task gate */ #define D_TSS 0x900 /* TSS */ #define D_CALL 0x0C00 /* 386 call gate */ #define D_INT 0x0E00 /* 386 interrupt gate */ #define D_TRAP 0x0F00 /* 386 trap gate */ #define D_DATA 0x1000 /* Data segment */ #define D_CODE 0x1800 /* Code segment */ /* * Descriptors may include the following as appropriate: */ #define D_DPL3 0x6000 /* DPL3 or mask for DPL */ #define D_DPL2 0x4000 /* DPL2 or mask for DPL */ #define D_DPL1 0x2000 /* DPL1 or mask for DPL */ #define D_PRESENT 0x8000 /* Present */ #define D_NOT_PRESENT 0x8000 /* Not Present */ /* Note, the PRESENT bit is set by default */ /* Include NOT_PRESENT to turn it off */ /* Do not specify D_PRESENT */ /* * Segment descriptors (not gates) may include: */ #define D_ACC 0x100 /* Accessed (Data or Code) */ #define D_WRITE 0x200 /* Writable (Data segments only) */ #define D_READ 0x200 /* Readable (Code segments only) */ #define D_BUSY 0x200 /* Busy (TSS only) */ #define D_EXDOWN 0x400 /* Expand down (Data segments only) */ #define D_CONFORM 0x400 /* Conforming (Code segments only) */ #define D_BIG 0x40 /* Default to 32 bit mode */ #define D_BIG_LIM 0x80 /* Limit is in 4K units */ /* * Now we define the structures for descriptors and gates: */ struct x86_desc { unsigned short limit_low; /* limit 0..15 */ unsigned short base_low; /* base 0..15 */ unsigned char base_med; /* base 16..23 */ unsigned char access; /* access byte */ unsigned int limit_high:4; /* limit 16..19 */ unsigned int granularity:4; /* granularity */ unsigned char base_high; /* base 24..31 */ } __attribute__ ((packed)); struct x86_gate { unsigned short offset_low; /* offset 0..15 */ unsigned short selector; /* selector */ unsigned short access; /* access flags */ unsigned short offset_high; /* offset 16..31 */ } __attribute__ ((packed)); /* * Descriptor tables are basically arrays of either standard or gate * descriptors; The exception is the first descriptor, which is a * 'dummy' and can be filled with anything without crashing the machine. * * We define the union DT_entry as a general type of entry in a descriptor * table; It can contain a normal descriptor, a gate descriptor, or any * 64-bit number (for defining the dummy entries, if neccessary.) */ union DT_entry { struct x86_desc desc; /* Normal descriptor */ struct x86_gate gate; /* Gate descriptor */ unsigned long long dummy; /* Any other info */ }; /* * Now we perform the macro magic of the day. */ #define desc_table(name,length) union DT_entry name[length] = #define stnd_desc(base, limit, control) {desc: {(limit & 0xffff), (base & 0xffff), ((base >> 16) & 0xff), \ ((control+D_PRESENT) >> 8), (limit >> 16), \ ((control & 0xff) >> 4), (base >> 24)}} #define gate_desc(offset, selector, control) {gate: {(offset & 0xffff), selector, \ (control+D_PRESENT), (offset >> 16) }} /* These are bound to look a bit cryptic, so I'll just show what the result * would look like: * * desc_table(GDT, 3) { * stnd_desc(base, limit, control), * stnd_desc(base, limit, control), * gate_desc(offset, selector, control) * }; * * ... would produce something looking like: * * union DT_entry GDT[3] = { * {desc: {limit_low, base_low, base_med, access, limit_high, granularity, base_high}}, * {desc: {limit_low, base_low, base_med, access, limit_high, granularity, base_high}}, * {gate: {offset_low, selector, word_count, access, offset_high}} * }; * * The values are conveted using a bit of cryptic, but straightforward magic. */ #endif |
|
From: <ke...@to...> - 2003-01-21 00:10:04
|
Update of /cvsroot/linksos/kernel/hal/prototypes In directory rix.tossell.net:/tmp/cvs-serv32113/hal/prototypes Removed Files: gdt.h Log Message: Title: gdt.h Changes: Moved gdt.h out of the prototypes dir and into the x86 dir. Effects: Minimizing pollution to other arch's. a=kennyt --- gdt.h DELETED --- |
|
From: <bl...@to...> - 2003-01-17 23:14:39
|
Update of /cvsroot/linksos/kernel/hw/video In directory rix.tossell.net:/tmp/cvs-serv31305 Added Files: vga.cpp Log Message: Title: vga.cpp // basic 13h driver . Will use vga.h and later svgalib Changes: first commit Effects: None, commented enough for later a= blokkie (tfe...@wa... b= --- NEW FILE: vga.cpp --- /* This program set the video mode to 13h , later it must use SVGALIB /usr/local/include/ should be in the path. So, <vga.h> works */ #include <stdio.h> //should be in the CVS-tree ASAP #include <vga.h> // this is needed .. but as vga.h is not done yet bare with me int main(void) { int prevMode; //holds the preveus video mode. int myMode = G320x240x256; //holds the new mode 13h. prevMode = vga_getcurrentmode(); //puts the current mode into prevMode. vga_init(); //initizalizes the vga function. if(vga_hasmode(myMode)) vga_setmode(myMode); //returns if a video mode is saported. else return 1; //sets mode 13h. while(!vga_getkey()); //wates for a key to be pressed. vga_setmode(prevMode); //sets the video mode to the previus mode. return 0; } |