mirror of
https://github.com/0Nera/BMOSP.git
synced 2025-02-16 17:14:00 +03:00
Основные работы по оболочке ввода-вывода выполнены
This commit is contained in:
parent
b57b453332
commit
3bb064c9d9
2
TODO.md
2
TODO.md
@ -12,7 +12,7 @@
|
||||
|
||||
Модули:
|
||||
|
||||
- [ ] Оболочка ввода-вывода
|
||||
- [X] Оболочка ввода-вывода
|
||||
|
||||
Драйвера:
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_BUILD 51
|
||||
#define VERSION_BUILD 52
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <log.h>
|
||||
#include <arch.h>
|
||||
#include <log.h>
|
||||
|
||||
typedef struct __attribute__((packed)) {
|
||||
uint16_t limit;
|
||||
|
@ -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( ) {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user