Основные работы по оболочке ввода-вывода выполнены

This commit is contained in:
Aren Elchinyan 2024-02-06 22:46:10 +03:00
parent b57b453332
commit 3bb064c9d9
6 changed files with 14 additions and 14 deletions

View File

@ -12,7 +12,7 @@
Модули:
- [ ] Оболочка ввода-вывода
- [X] Оболочка ввода-вывода
Драйвера:

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_BUILD 51
#define VERSION_BUILD 52

View File

@ -6,8 +6,8 @@
*
*/
#include <log.h>
#include <arch.h>
#include <log.h>
typedef struct __attribute__((packed)) {
uint16_t limit;

View File

@ -61,22 +61,22 @@ static void do_amd( ) {
LOG("cpu_family = [%u]\n", cpu_family);
}
static void do_intel() {
static void do_intel( ) {
uint32_t eax, ebx, ecx, edx;
uint32_t cpu_model;
uint32_t cpu_family;
uint32_t cpu_brand_id;
cpuid(0, &eax, &ebx, &ecx, &edx);
cpuid(0, &eax, &ebx, &ecx, &edx);
cpu_brand_id = ebx;
cpu_family = ((eax >> 8) & 0xFF) + ((eax >> 20) & 0xFF);
cpu_model = ((eax >> 4) & 0xF) | ((eax >> 12) & 0xF0);
cpu_brand_id = ebx;
cpu_family = ((eax >> 8) & 0xFF) + ((eax >> 20) & 0xFF);
cpu_model = ((eax >> 4) & 0xF) | ((eax >> 12) & 0xF0);
LOG("Используется процессор Intel\n");
LOG("cpu_brand_id = [%u]\n", cpu_brand_id);
LOG("cpu_family = [%u]\n", cpu_family);
LOG("cpu_model = [%u]\n", cpu_model);
LOG("Используется процессор Intel\n");
LOG("cpu_brand_id = [%u]\n", cpu_brand_id);
LOG("cpu_family = [%u]\n", cpu_family);
LOG("cpu_model = [%u]\n", cpu_model);
}
static void brandname( ) {

View File

@ -89,7 +89,7 @@ static void exception_handler(struct frame state) {
void isr_generic(struct frame state) {
if (state.int_number > 255) { return; }
if (state.int_number != 32) { LOG("Обработка прерывания %u\n", state.int_number); }
// if (state.int_number != 32) { LOG("Обработка прерывания %u\n", state.int_number); }
if (state.int_number < 32) {
exception_handler(state);

View File

@ -56,7 +56,7 @@ void ios_main( ) {
fb_printf("Запуск %s...\n", app_list[select].name);
int (*app)( ) = (int (*)( ))app_list[select].data;
int ret = (*app)( );
fb_printf("Приложение %s завершилось с кодом: %d\n", app_list[select].name, ret);
fb_printf("\nПриложение %s завершилось с кодом: %d\n", app_list[select].name, ret);
}
}