Page 1 of 1

Bad Data segment

Posted: Wed Feb 05, 2014 1:44 pm
by Yazimat
Hi , Osdever
i recently download a simple kernel , named boreal
i compile that kernel with succes , but when im boot with qemu ,
i get a bad result with grub , it shows me a 'D' also i reread the code and i find
his (in the code)
:shock:

Code: Select all

/* display a blinking white-on-blue 'D' if bad data segment */
	movw $0x9F44,(0xB8000)
	jmp .
ds_ok:
but i don't understand this error , if you can help me

(sorry for my bad english i'm fr :oops: )

Re: Bad Data segment

Posted: Wed Feb 05, 2014 2:10 pm
by qw
This code isn't very helpful. It is only displaying the error message (as far as a blinking D is called a message). How did you end up there? There must be some test somewhere.

Re: Bad Data segment

Posted: Wed Feb 05, 2014 3:49 pm
by VolTeK
Yazimat wrote:but i don't understand this error , if you can help me
Just by looking at the comment you already know why it is triggered. Why don't you ask the author of the code you are using what a bad data segment is, or look it up yourself? This isn't a question where good experience can answer, and a Google search cannot. So this is where Google comes in.


A Software Developer suggestion would be, to step through and find out just how it gets called (where is the condition?), or at what point of execution defines a "Bad Data Segment". That requires knowledge of debugging, and Google can help with that as well.