Skip to content

Commit

Permalink
Fix boot errors, fix rapid crashes, tweak font
Browse files Browse the repository at this point in the history
  • Loading branch information
portasynthinca3 committed Feb 12, 2020
1 parent d34bfd2 commit 83ee37b
Show file tree
Hide file tree
Showing 19 changed files with 86 additions and 1,382 deletions.
2 changes: 1 addition & 1 deletion builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def execute(cmd):
path_obj = 'build/' + os.path.basename(path) + '.o'
c_obj.append(path_obj)
print(' Compiling: ' + path)
execute('x86_64-w64-mingw32-gcc -ffreestanding -mcmodel=large -mno-red-zone -m64 -msse2 -Ignu-efi/inc -Ignu-efi/lib -Ignu-efi/inc/x86_64 -Ignu-efi/inc/protocol -nostdlib -c -o ' + path_obj + ' ' + path)
execute('x86_64-w64-mingw32-gcc -ffreestanding -mcmodel=large -mno-red-zone -m64 -mno-sse -Ignu-efi/inc -Ignu-efi/lib -Ignu-efi/inc/x86_64 -Ignu-efi/inc/protocol -nostdlib -c -o ' + path_obj + ' ' + path)

print_status('Linking')
execute('x86_64-w64-mingw32-gcc -mcmodel=large -mno-red-zone -m64 -nostdlib -Wl,-dll -shared -Wl,--subsystem,10 -e efi_main -o build/BOOTX64.EFI ' + ' '.join(c_obj))
Expand Down
Empty file modified gfx/NeutronFontConv.exe
100644 → 100755
Empty file.
Empty file modified gfx/NeutronFontConv.pdb
100644 → 100755
Empty file.
Binary file added gfx/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified gfx/logo_cut.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,188 changes: 0 additions & 1,188 deletions gfx/logo_cut.xbm

This file was deleted.

Binary file modified gfx/neutral.nfnt
100644 → 100755
Binary file not shown.
131 changes: 0 additions & 131 deletions gfx/neutral.nfnt.asm

This file was deleted.

Binary file modified gfx/neutral.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed gfx/new_logo_candidate.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/drivers/gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typedef struct {

//Structure defining a 32bpp color
typedef struct {
uint8_t r, g, b, a;
uint8_t b, g, r, a;
} __attribute__((packed)) color32_t;

#define GFX_BUF_VBE 1
Expand Down
7 changes: 7 additions & 0 deletions src/drivers/timr.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ void timr_init(void){
apic_reg_wr(LAPIC_REG_TIMR_INITCNT, ticks_in_50ms * 10); //Set the initial counter value
}

/*
* Stops the timer
*/
void timr_stop(void){
apic_reg_wr(LAPIC_REG_LVT_TIM, apic_reg_rd(LAPIC_REG_LVT_TIM) & ~0x20000);
}

/*
* Increment the millisecond counter
*/
Expand Down
1 change: 1 addition & 0 deletions src/drivers/timr.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "../stdlib.h"

void timr_init(void);
void timr_stop(void);
void timr_tick(void);

uint64_t timr_ms(void);
Expand Down
112 changes: 64 additions & 48 deletions src/fonts/font_neutral.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,70 @@
#define FONT_NEUTRAL_H

static const unsigned char font_neutral[] = {
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F,
0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F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x18, 0x00, 0x00, 0x05, 0x02, 0x05, 0x00, 0x00, 0x00, 0x08, 0x08, 0x3E, 0x08,
0x08, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x40,
0x00, 0x00, 0x00, 0x00, 0x60, 0x18, 0x06, 0x00, 0x00, 0x00, 0x3E, 0x41, 0x41, 0x3E, 0x00, 0x00,
0x42, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x62, 0x51, 0x49, 0x46, 0x00, 0x00, 0x22, 0x41, 0x49, 0x36,
0x00, 0x00, 0x0F, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x4F, 0x49, 0x49, 0x31, 0x00, 0x00, 0x3C, 0x4A,
0x49, 0x31, 0x00, 0x00, 0x61, 0x19, 0x05, 0x03, 0x00, 0x00, 0x36, 0x49, 0x49, 0x36, 0x00, 0x00,
0x46, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x00, 0x00,
0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x41, 0x22,
0x14, 0x08, 0x00, 0x00, 0x02, 0x51, 0x09, 0x06, 0x00, 0x00, 0x3C, 0x42, 0x5A, 0x5C, 0x00, 0x00,
0x7E, 0x11, 0x11, 0x7E, 0x00, 0x00, 0x7F, 0x49, 0x49, 0x36, 0x00, 0x00, 0x3E, 0x41, 0x41, 0x22,
0x00, 0x00, 0x7F, 0x41, 0x41, 0x3E, 0x00, 0x00, 0x7F, 0x49, 0x49, 0x41, 0x00, 0x00, 0x7F, 0x09,
0x09, 0x01, 0x00, 0x00, 0x3E, 0x41, 0x51, 0x71, 0x00, 0x00, 0x7F, 0x08, 0x08, 0x7F, 0x00, 0x00,
0x41, 0x7F, 0x41, 0x00, 0x00, 0x00, 0x41, 0x41, 0x3F, 0x01, 0x00, 0x00, 0x7F, 0x08, 0x14, 0x63,
0x00, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x00, 0x00, 0x7F, 0x02, 0x04, 0x02, 0x7F, 0x00, 0x7F, 0x08,
0x10, 0x7F, 0x00, 0x00, 0x3E, 0x41, 0x41, 0x3E, 0x00, 0x00, 0x7F, 0x09, 0x09, 0x06, 0x00, 0x00,
0x3E, 0x41, 0x61, 0x7E, 0x00, 0x00, 0x7E, 0x09, 0x09, 0x76, 0x00, 0x00, 0x46, 0x49, 0x49, 0x31,
0x00, 0x00, 0x01, 0x7F, 0x01, 0x00, 0x00, 0x00, 0x3F, 0x40, 0x40, 0x3F, 0x00, 0x00, 0x1F, 0x20,
0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, 0x41, 0x22, 0x1C, 0x22, 0x41, 0x00,
0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x45, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41,
0x00, 0x00, 0x06, 0x18, 0x60, 0x00, 0x00, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x04, 0x02,
0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x00, 0x00, 0x7F, 0x48, 0x48, 0x30, 0x00, 0x00, 0x30, 0x48, 0x48, 0x48,
0x00, 0x00, 0x30, 0x48, 0x48, 0x7F, 0x00, 0x00, 0x38, 0x54, 0x54, 0x58, 0x00, 0x00, 0x7E, 0x09,
0x09, 0x01, 0x00, 0x00, 0x48, 0x54, 0x54, 0x3C, 0x00, 0x00, 0x7F, 0x08, 0x08, 0x70, 0x00, 0x00,
0x00, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44,
0x00, 0x00, 0x3F, 0x40, 0x40, 0x00, 0x00, 0x00, 0x78, 0x04, 0x08, 0x04, 0x78, 0x00, 0x7C, 0x04,
0x04, 0x78, 0x00, 0x00, 0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0xFC, 0x24, 0x24, 0x18, 0x00, 0x00,
0x18, 0x24, 0x24, 0xFC, 0x00, 0x00, 0x7C, 0x08, 0x04, 0x00, 0x00, 0x00, 0x48, 0x54, 0x54, 0x24,
0x00, 0x00, 0x04, 0x7F, 0x04, 0x00, 0x00, 0x00, 0x3C, 0x40, 0x40, 0x7C, 0x00, 0x00, 0x1C, 0x20,
0x40, 0x3C, 0x00, 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x50, 0x50, 0x3C, 0x00, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x00, 0x00, 0x08, 0x36, 0x41, 0x41,
0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x41, 0x41, 0x36, 0x08, 0x00, 0x10, 0x08,
0x10, 0x08, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00,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08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x60, 0x18, 0x06, 0x00, 0x00, 0x00, 0x3E, 0x41, 0x41, 0x3E, 0x00, 0x00,
0x42, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x62, 0x51, 0x49, 0x46, 0x00, 0x00,
0x22, 0x41, 0x49, 0x36, 0x00, 0x00, 0x07, 0x08, 0x08, 0x7F, 0x00, 0x00,
0x4F, 0x49, 0x49, 0x31, 0x00, 0x00, 0x3C, 0x4A, 0x49, 0x31, 0x00, 0x00,
0x41, 0x31, 0x0D, 0x03, 0x00, 0x00, 0x36, 0x49, 0x49, 0x36, 0x00, 0x00,
0x46, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00,
0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x00,
0x02, 0x51, 0x09, 0x06, 0x00, 0x00, 0x3C, 0x42, 0x5A, 0x5C, 0x00, 0x00,
0x7E, 0x11, 0x11, 0x7E, 0x00, 0x00, 0x7F, 0x49, 0x49, 0x36, 0x00, 0x00,
0x3E, 0x41, 0x41, 0x22, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x3E, 0x00, 0x00,
0x7F, 0x49, 0x49, 0x41, 0x00, 0x00, 0x7F, 0x09, 0x09, 0x01, 0x00, 0x00,
0x3E, 0x41, 0x51, 0x71, 0x00, 0x00, 0x7F, 0x08, 0x08, 0x7F, 0x00, 0x00,
0x41, 0x41, 0x7F, 0x41, 0x41, 0x00, 0x41, 0x41, 0x3F, 0x01, 0x00, 0x00,
0x7F, 0x08, 0x14, 0x63, 0x00, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x00, 0x00,
0x7F, 0x02, 0x04, 0x02, 0x7F, 0x00, 0x7F, 0x10, 0x20, 0x7F, 0x00, 0x00,
0x3E, 0x41, 0x41, 0x3E, 0x00, 0x00, 0x7F, 0x09, 0x09, 0x06, 0x00, 0x00,
0x3E, 0x41, 0x61, 0x7E, 0x00, 0x00, 0x7E, 0x09, 0x09, 0x76, 0x00, 0x00,
0x46, 0x49, 0x49, 0x31, 0x00, 0x00, 0x01, 0x01, 0x7F, 0x01, 0x00, 0x00,
0x3F, 0x40, 0x40, 0x3F, 0x00, 0x00, 0x3F, 0x40, 0x40, 0x3F, 0x00, 0x00,
0x3F, 0x40, 0x20, 0x40, 0x3F, 0x00, 0x67, 0x18, 0x18, 0x67, 0x00, 0x00,
0x43, 0x34, 0x0C, 0x03, 0x00, 0x00, 0x61, 0x51, 0x4D, 0x43, 0x00, 0x00,
0x7F, 0x41, 0x41, 0x41, 0x00, 0x00, 0x06, 0x18, 0x60, 0x00, 0x00, 0x00,
0x41, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x00, 0x00, 0x7F, 0x48, 0x48, 0x30, 0x00, 0x00,
0x38, 0x44, 0x44, 0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x7F, 0x00, 0x00,
0x38, 0x54, 0x54, 0x44, 0x00, 0x00, 0x7E, 0x09, 0x09, 0x01, 0x00, 0x00,
0x48, 0x54, 0x54, 0x3C, 0x00, 0x00, 0x7F, 0x08, 0x08, 0x70, 0x00, 0x00,
0x40, 0x7A, 0x40, 0x00, 0x00, 0x00, 0x40, 0x3A, 0x00, 0x00, 0x00, 0x00,
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x3F, 0x40, 0x40, 0x00, 0x00, 0x00,
0x78, 0x04, 0x08, 0x04, 0x78, 0x00, 0x7C, 0x04, 0x04, 0x78, 0x00, 0x00,
0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0xFC, 0x24, 0x24, 0x18, 0x00, 0x00,
0x18, 0x24, 0x24, 0xFC, 0x00, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x00, 0x00,
0x48, 0x54, 0x54, 0x24, 0x00, 0x00, 0x04, 0x7F, 0x04, 0x00, 0x00, 0x00,
0x3C, 0x40, 0x40, 0x7C, 0x00, 0x00, 0x3C, 0x40, 0x40, 0x3C, 0x00, 0x00,
0x3C, 0x40, 0x20, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x50, 0x50, 0x3C, 0x00, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x00, 0x00,
0x08, 0x36, 0x41, 0x41, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00,
0x00, 0x41, 0x41, 0x36, 0x08, 0x00, 0x10, 0x08, 0x10, 0x08, 0x00, 0x00,
0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

#endif
6 changes: 3 additions & 3 deletions src/gui/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ void gui_update(void){
//Append seconds
strcat(time, sprintu(temp, s, 2));
}

//Print them
gfx_puts((p2d_t){.x = gfx_res_x() - gfx_text_bounds(date).x - 4, .y = 2}, color_scheme.time, COLOR32(0, 0, 0, 0), date);
gfx_puts((p2d_t){.x = gfx_res_x() - gfx_text_bounds(time).x - ((gfx_text_bounds(date).x - gfx_text_bounds(time).x) / 2) - 4, .y = 12},
color_scheme.time, COLOR32(0, 0, 0, 0), time);
gfx_puts((p2d_t){.x = gfx_res_x() - gfx_text_bounds(date).x, .y = 2}, color_scheme.time, COLOR32(0, 0, 0, 0), date);
gfx_puts((p2d_t){.x = gfx_res_x() - gfx_text_bounds(time).x - 4, .y = 12}, color_scheme.time, COLOR32(0, 0, 0, 0), time);

//Draw the power icon
gfx_draw_xbm((p2d_t){.x = gfx_res_x() - 60 - 16, .y = 2}, power_bits, (p2d_t){.x = power_width, .y = power_height},
Expand Down
2 changes: 1 addition & 1 deletion src/gui/stdgui.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void stdgui_create_system_win(void){
(p2d_t){.x = (system_win_size.x - neutron_logo_width) / 2, .y = 13}, (p2d_t){.x = neutron_logo_width, .y = neutron_logo_height},
GUI_IMAGE_FORMAT_XBM, neutron_logo_bits, COLOR32(0, 0, 0, 0), COLOR32(255, 255, 255, 255), NULL);
//Add the name label to it
char* name_label_text = "Neutron Project. 2019, Andrey Antonenko";
char* name_label_text = "Neutron Project. 2019-2020, Andrey Antonenko";
uint32_t name_label_width = gfx_text_bounds(name_label_text).x;
gui_create_label(window, (p2d_t){.x = (system_win_size.x - name_label_width) / 2, .y = 13 + neutron_logo_height + 2},
(p2d_t){.x = name_label_width, .y = 8}, name_label_text, COLOR32(255, 255, 255, 255), COLOR32(0, 0, 0, 0), NULL);
Expand Down
12 changes: 5 additions & 7 deletions src/krnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void krnl_exc(void){
//Load exception address into RBX for ease of debugging too
__asm__ volatile("mov %0, %%rbx" : : "m" (ip));
//Abort
abort();
while(1);
}

/*
Expand Down Expand Up @@ -242,15 +242,13 @@ void krnl_boot_status(char* str, uint32_t progress){
* GUI task code
*/
void gui_task(void){
/*
gfx_fill(COLOR32(255, 0, 0, 0));
gfx_flip();
while(1){
//ps2_poll();
ps2_poll();
gui_update();
//mouse_frame_end();
mouse_frame_end();
}
*/
}

uint64_t dummy_var = 0;
Expand All @@ -263,8 +261,8 @@ void dummy(void){
* Multitasking entry point
*/
void mtask_entry(void){
mtask_create_task(65536, "System GUI", gui_task);
mtask_create_task(65536, "Dummy task", dummy);
mtask_create_task(131072, "System UI", gui_task);
//mtask_create_task(65536, "Dummy task", dummy);

mtask_stop_task(mtask_get_uid());
while(1);
Expand Down
3 changes: 2 additions & 1 deletion src/mtask/mtask.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ task_t* mtask_get_task_list(void){
* Stops the scheduler, effectively freezing the system
*/
void mtask_stop(void){
mtask_enabled = 1;
mtask_enabled = 0;
timr_stop();
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#endif

//The kernel version
#define KRNL_VERSION_STR "v0.4.4"
#define KRNL_VERSION_STR "v0.4.5"

//Use WC for memcpy() transfers?
//#define STDLIB_MEMCPY_WC
Expand Down

0 comments on commit 83ee37b

Please sign in to comment.