Skip to content

Commit

Permalink
[kernel] Small cleanups, add disasm to 1440k distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaerr committed Sep 16, 2024
1 parent e4c2bcb commit dad7fd7
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 51 deletions.
2 changes: 1 addition & 1 deletion elks/arch/i86/boot/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ _start:
mov %ax,%ss // SS=ES=DS
mov $tstack,%sp // can't use kernel interrupt stack, must have temp stack

call start_kernel // fall through into breakpoint if returns
call start_kernel // no return

.global int3
int3: int $3 // C breakpoint for emu86
Expand Down
4 changes: 3 additions & 1 deletion elks/arch/i86/drivers/block/bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,20 @@ int INITPROC bios_gethdinfo(struct drive_infot *drivep) {

void BFPROC bios_disk_park_all(void)
{
#ifdef CONFIG_ARCH_IBMPC
struct drive_infot *drivep;
unsigned int cyl;

for (drivep = drive_info; drivep < &drive_info[NUM_DRIVES]; drivep++) {
if (drivep->fdtype != -1) /* hard drives only */
continue;
cyl = drivep->cylinders - 1; /* expects zero-based cylinder */
BD_AX = 0x0C << 8;
BD_AX = BIOSHD_SEEK;
BD_CX = ((cyl & 0xFF) << 8) | ((cyl & 0x300) >> 2) | 1; /* 1 = sector */
BD_DX = bios_drive_map[drivep - drive_info];
call_bios(&bdt);
}
#endif
}

#endif
Expand Down
4 changes: 1 addition & 3 deletions elks/arch/i86/drivers/block/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ int boot_rootdev; /* set by /bootopts options if configured*/

void INITPROC device_init(void)
{
register struct gendisk *p;
struct gendisk *p;

chr_dev_init();
blk_dev_init();

set_irq();

for (p = gendisk_head; p; p = p->next)
setup_dev(p);

Expand Down
2 changes: 1 addition & 1 deletion elks/fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ include $(BASEDIR)/Makefile-rules
# Objects to be compiled.

OBJS = buffer.o super.o devices.o fcntl.o stat.o inode.o file_table.o \
block_dev.o namei.o ioctl.o filesystems.o open.o read_write.o \
block_dev.o namei.o ioctl.o open.o read_write.o \
readdir.o exec.o select.o pipe.o
ifdef CONFIG_EXEC_COMPRESS
OBJS += exodecr.o
Expand Down
28 changes: 0 additions & 28 deletions elks/fs/filesystems.c

This file was deleted.

5 changes: 0 additions & 5 deletions elks/fs/minix/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,3 @@ struct file_system_type minix_fs_type = {
minix_read_super,
FST_MINIX
};

int init_minix_fs(void)
{
return 1;
}
5 changes: 0 additions & 5 deletions elks/fs/msdos/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,3 @@ struct file_system_type msdos_fs_type = {
msdos_read_super,
FST_MSDOS
};

int init_msdos_fs(void)
{
return 1;
}
1 change: 1 addition & 0 deletions elks/include/linuxmt/biosparm.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct biosparms {
#define BIOSHD_WRITE 0x0300
#define BIOSHD_READ 0x0200
#define BIOSHD_DRIVE_PARMS 0x0800
#define BIOSHD_SEEK 0x0C00
#endif

int call_bios(struct biosparms *);
Expand Down
1 change: 0 additions & 1 deletion elks/include/linuxmt/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ struct drive_infot;
/* kernel init routines*/
extern int INITPROC buffer_init(void);
extern void INITPROC console_init(void);
extern void INITPROC fs_init(void);
extern void INITPROC inode_init(void);
extern void INITPROC irq_init(void);
extern void save_timer_irq(void);
Expand Down
2 changes: 0 additions & 2 deletions elks/include/linuxmt/minix_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ extern int minix_unlink(struct inode *,char *,size_t);
extern void minix_write_inode(register struct inode *);
extern void minix_write_super(register struct super_block *);

extern int init_minix_fs(void);

extern struct inode_operations minix_file_inode_operations;
extern struct inode_operations minix_dir_inode_operations;
extern struct inode_operations minix_symlink_inode_operations;
Expand Down
1 change: 0 additions & 1 deletion elks/include/linuxmt/msdos_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ extern int msdos_rename(struct inode *old_dir,const char *old_name,int old_len,
/* inode.c */

extern void msdos_read_inode(struct inode *inode);
extern int init_msdos_fs(void);

/* dir.c */

Expand Down
2 changes: 0 additions & 2 deletions elks/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ static void INITPROC kernel_init(void)
sock_init();
#endif

fs_init();

#ifdef CONFIG_BOOTOPTS
finalize_options();
if (!opts) printk("/bootopts not found or bad format/size\n");
Expand Down
2 changes: 1 addition & 1 deletion elkscmd/Applications
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ nano-X/bin/nxworld.map ::lib/nxworld.map :nanox :1232c :1440k
basic/basic :basic :1200k
advent/advent :other :1440c
advent/advent.db ::lib/advent.db :other :1440c
debug/disasm :other :1440c
debug/disasm :other :1440k
debug/nm :other :1440c
debug/system.sym ::lib/system.sym :other :1440c
debug/testsym :other :1440c

0 comments on commit dad7fd7

Please sign in to comment.