Switch int to sized types
This commit is contained in:
@ -56,8 +56,8 @@ void break_on_bluescreen() {
|
||||
}
|
||||
|
||||
// Cursor-Position
|
||||
int bs_xpos = 0;
|
||||
int bs_ypos = 0;
|
||||
uint8_t bs_xpos = 0;
|
||||
uint8_t bs_ypos = 0;
|
||||
|
||||
/*****************************************************************************
|
||||
* Funktion: bs_clear *
|
||||
@ -65,13 +65,13 @@ int bs_ypos = 0;
|
||||
* Beschreibung: Bildschirm loeschen. *
|
||||
*****************************************************************************/
|
||||
void bs_clear() {
|
||||
unsigned int x;
|
||||
unsigned int y;
|
||||
unsigned short* ptr = reinterpret_cast<unsigned short*>(0xb8000);
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
auto* ptr = reinterpret_cast<uint16_t*>(0xb8000);
|
||||
|
||||
for (x = 0; x < 80; x++) {
|
||||
for (y = 0; y < 25; y++) {
|
||||
*(ptr + y * 80 + x) = static_cast<short>(0x1F00);
|
||||
*(ptr + y * 80 + x) = static_cast<uint16_t>(0x1F00);
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,11 +155,11 @@ void bs_printReg(char* str, unsigned int value) {
|
||||
*---------------------------------------------------------------------------*
|
||||
* Beschreibung: Hauptroutine des Bluescreens. *
|
||||
*****************************************************************************/
|
||||
void bs_dump(unsigned int exceptionNr) {
|
||||
unsigned int* int_esp;
|
||||
unsigned int* sptr;
|
||||
unsigned int faultAdress;
|
||||
unsigned int has_error_code = 0;
|
||||
void bs_dump(uint8_t exceptionNr) {
|
||||
uint32_t* int_esp;
|
||||
uint32_t* sptr;
|
||||
uint32_t faultAdress;
|
||||
uint8_t has_error_code = 0;
|
||||
|
||||
bs_clear();
|
||||
bs_print_string("HHUos crashed with Exception \0");
|
||||
@ -210,7 +210,7 @@ void bs_dump(unsigned int exceptionNr) {
|
||||
get_int_esp(&int_esp);
|
||||
|
||||
// wir müssen den Inhalt auslesen und das als Zeiger verwenden, um den Stack auszulesen
|
||||
sptr = reinterpret_cast<unsigned int*>(*int_esp);
|
||||
sptr = reinterpret_cast<uint32_t*>(*int_esp);
|
||||
|
||||
bs_lf();
|
||||
|
||||
@ -277,7 +277,7 @@ void bs_dump(unsigned int exceptionNr) {
|
||||
bs_print_string("Calling Stack:\0");
|
||||
bs_lf();
|
||||
int x = 0;
|
||||
unsigned int* ebp = reinterpret_cast<unsigned int*>(*(sptr + 2));
|
||||
auto* ebp = reinterpret_cast<uint32_t*>(*(sptr + 2));
|
||||
unsigned int raddr;
|
||||
|
||||
// solange eip > 1 MB && ebp < 128 MB, max. Aufruftiefe 10
|
||||
@ -288,7 +288,7 @@ void bs_dump(unsigned int exceptionNr) {
|
||||
bs_lf();
|
||||
|
||||
// dynamische Kette -> zum Aufrufer
|
||||
ebp = reinterpret_cast<unsigned int*>(*ebp);
|
||||
ebp = reinterpret_cast<uint32_t*>(*ebp);
|
||||
|
||||
x++;
|
||||
}
|
||||
|
||||
@ -14,6 +14,6 @@
|
||||
#define Bluescreen_include__
|
||||
|
||||
// dump blue screen (will not return)
|
||||
void bs_dump(unsigned int exceptionNr);
|
||||
void bs_dump(uint8_t exceptionNr);
|
||||
|
||||
#endif
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include "kernel/system/Globals.h"
|
||||
#include "kernel/interrupt/Bluescreen.h"
|
||||
|
||||
extern "C" void int_disp(unsigned int vector);
|
||||
extern "C" void int_disp(uint8_t vector);
|
||||
|
||||
/*****************************************************************************
|
||||
* Prozedur: int_disp *
|
||||
@ -29,7 +29,7 @@ extern "C" void int_disp(unsigned int vector);
|
||||
* Parameter: *
|
||||
* vector: Vektor-Nummer der Unterbrechung *
|
||||
*****************************************************************************/
|
||||
void int_disp(unsigned int vector) {
|
||||
void int_disp(uint8_t vector) {
|
||||
|
||||
/* hier muss Code eingefuegt werden */
|
||||
|
||||
@ -56,7 +56,7 @@ void int_disp(unsigned int vector) {
|
||||
* *
|
||||
* Rueckgabewert: 0 = Erfolg, -1 = Fehler *
|
||||
*****************************************************************************/
|
||||
int IntDispatcher::assign(unsigned int vector, ISR& isr) {
|
||||
int IntDispatcher::assign(uint8_t vector, ISR& isr) {
|
||||
|
||||
/* hier muss Code eingefuegt werden */
|
||||
|
||||
@ -81,7 +81,7 @@ int IntDispatcher::assign(unsigned int vector, ISR& isr) {
|
||||
* *
|
||||
* Rueckgabewert: 0 = ISR wurde aufgerufen, -1 = unbekannte Vektor-Nummer *
|
||||
*****************************************************************************/
|
||||
int IntDispatcher::report(unsigned int vector) {
|
||||
int IntDispatcher::report(uint8_t vector) {
|
||||
|
||||
/* hier muss Code eingefuegt werden */
|
||||
|
||||
|
||||
@ -42,10 +42,10 @@ public:
|
||||
}
|
||||
|
||||
// Registrierung einer ISR. (Rueckgabewert: 0 = Erfolg, -1 = Fehler)
|
||||
int assign(unsigned int vector, ISR& isr);
|
||||
int assign(uint8_t vector, ISR& isr);
|
||||
|
||||
// ISR fuer 'vector' ausfuehren
|
||||
int report(unsigned int vector);
|
||||
int report(uint8_t vector);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user