00:00:00 --- log: started osdev/02.09.01 00:00:10 but I also frequently work with multiple cpus 00:00:21 and I always use at&t, so intel looks strange to me 00:04:16 geist, have you ever seen anything that makes a general introduction to it? 00:05:43 or make that 'gentle' introduction 00:06:32 nope 00:06:51 there may be, but I dont know 00:06:57 I never looked for an intro 00:07:07 how does at&t syntax go from one platform to another when the instructions are different per processor? 00:07:52 the syntax is roughly the same 00:07:57 the instructions just change 00:08:10 like the encoding of constants or registers 00:08:23 and the direction of data flow is usually the same for similar instructions 00:09:00 who defines the instructions? (intel made their assembly language i assume, and thus chose the instruction names, but at&t are somewhat different) 00:09:38 I dont know 00:09:51 look I'm not an expert on it or anything 00:09:58 I dont care what format you like 00:15:43 this might be a dumb question but.. are there any operating systems (or filesystems?) that allow you to _insert_ data into the middle of a large file without physically shifting the end half of the file? (like a "quicksave" but at the OS / FileSystem level) ? 00:16:05 i don't think so 00:16:10 why would you want to 00:16:18 pengo: nope 00:16:28 jdrake: convinience. 00:16:28 you could implement something like that in a fat file system fairly easily 00:16:54 jdrake: only if it was aligned on a block boundary and multiple of the block size 00:17:04 pengo, fragmentation is evil, encouraging fragmentation is hellish 00:17:06 geist: that's what i was thinking 00:17:20 geist, good point 00:17:32 pengo: *maybe* a long time ago, back when filesystems tended to be record based 00:17:35 but I doubt it 00:17:38 jdrake: better to encourage it at the OS level, so you could have standard tools to clean it up i thought. 00:17:43 that'd be really really hard to do effectively 00:17:52 pengo: nah, I disagree totally 00:18:05 dont cram stuff like that in the os 00:18:23 no one really gains anything from it, since it'd be a very specialized use anyway 00:19:01 I can't think of a good use of doing anything like that in a situation where you dont already have some sort of index and could just as easily do it otherwise 00:19:15 oh yeah, and it'd have serious problems with memory mapping a file 00:19:24 how can you insert memory there? :) 00:19:50 geist: i'm working on a fragmented memory model too :) :) 00:20:07 but it's a good thought 00:20:25 geist, for a memory mapped file could you map the file to something outside of physical ram and mark it as not present, and catch the page faults and give the file data? 00:20:45 geist: actually i'm writing a hex editor. so want to allow you to insert data. just wondering if i could optimise the saving on any platform for very large files. 00:21:28 was thinking that for a very large file (say one that fills up most the drive), it would be impossible to write it back after inserting something at the beginning 00:21:50 jdrake: but what about it being mapped into your address space. what do you do? 00:22:17 pengo: why would it be impossible? 00:22:18 theoretical question, given that a few platforms have that feature 00:23:02 geist: because there's no space for the edited file on the drive.. assuming the entire file doesn't fit in memory either. 00:23:07 jdrake: you could invalidate all the pages after the insertion and remove them from all mappings of the file, but what if another cpu is touching the page at the same time, etc 00:23:11 it'd really suck 00:23:32 pengo: you'd have that problem anyway, if there's not enough space to store the new file, you'ld be out of space 00:23:48 geist: but if i could just save the CHANGES there would be enough space. 00:24:16 well anyway, you cant do it unless you have some filesystem that has arbitrary block sizes 00:24:27 example: insert "Hello World" at the beginning of a 4gb file, and then save it. 00:24:40 geist: can you think of any off hand? reiser? 00:25:02 nope, I know of no filesystem that is arbitrarily block sized 00:25:08 it's terribly ineffecient to do that 00:25:20 hmm i suppose it would be 00:25:22 at the minimum you have to read and write to the disk in physical block sizes anyway 00:25:41 I wrote a filesystem at Be for BeIA that used 8 byte boundaries, and that was hard enough 00:26:05 and it was terribly slow, but it wasn't designed to be fast, just be space-efficient 00:26:11 I am getting an invalid expression as operand on this line, I copied it from another os, but not sure about it. __asm__ __volatile__ ("lgdt (%0)": :"p" (((char *)tmp_val )+2)); 00:26:18 but i'm still thinking that it's more efficient to write "Hello world" than to write an entire 4 gig file with "Hello world" prepended 00:26:29 pengo: sure. write an os and code that 00:26:32 I'd love to see it 00:26:42 since it'd be pretty much impossible to do efficiently 00:26:48 geist: damn. i guess i have to do all the work. 00:27:10 and there'd be some edge cases (like the memory mapping of the file) that would make it pretty much impossible to do anyway 00:27:13 geist: i might start by writing a little ftp server that will deliver two files as one. 00:27:27 and that doesn't even consider the implications from the file system point of view 00:27:41 geist: (or deliver a file combined with a .diff) 00:27:53 anyway, back to work 00:27:57 another gin & tonic for me 00:27:59 geist: i'd have to write my own memory mapping too i guess :) 00:29:06 i really was hoping i wouldn't have to write an entire OS but i guess i might 00:29:39 pengo, call it yaos (yet another operating system) 00:29:54 damn, that bottle of gin is cold 00:29:58 I have it in the freezer to keep it cold 00:30:07 and since it's 40% alcohol 00:30:12 which has a much lower freezing point 00:30:20 it's actually below 0C 00:30:29 would you actually drink that stuff? 00:30:29 freezes my hand 00:30:45 mmmm, bombay gin, mmmm 00:30:47 jdrake: there must already be a YAOS ?? 00:30:57 probably 00:31:00 geist: tasty :) 00:31:09 geist, straight? 00:31:21 no no, with tonic and some lime juice 00:31:31 sometimes with ruby red grapefruit 00:31:34 what is the effective alcohol % 00:31:46 probably 15% 00:32:02 I usually do about a 1/3 or a 1/4 of a glass with gin 00:32:07 but it has ice in it, so it's hard to tell 00:32:14 16 pages on google with: yaos "yet another operating system" 00:32:24 back to work 00:33:23 * jdrake doesn't drink 00:34:16 good for you 00:34:17 * pengo just doesn't drink on sundays. much. 00:34:20 it's bad for you 00:34:35 beer makes you fat 00:35:20 the internet makes me fat 00:35:36 that too 00:36:07 beer makes me thinner.. cause i always get lost or can't find a cab and walk for an hour to get home. 00:37:48 geist, do you know what the "p" stands for on the input part to the asm statement? 00:38:49 what statement? 00:39:25 ("lgdt (%0)": :"p" (((char *)tmp_val )+2)) 00:39:46 i can't seem to find anything saying what the p is standing for 00:39:58 pointer 00:42:31 shouldn't that "p" part be right after the first : for the input section? 00:43:01 nevermind 00:43:23 sorry, I'm in the middle of something anyway 00:50:24 writing that vt100 parser 00:57:02 --- join: DorkPunk (~rajiv@cs6625167-251.austin.rr.com) joined #osdev 00:57:16 Greetings, fellow technophiles. 00:57:46 * geist waves 00:58:12 I am an artificially intelligent agent, representing an alien confederation. 00:58:47 Beware! DorkPunk is a microsoft representative! 00:59:12 pengo - Please refrain from flinging insults at me in the future. ;-) 01:00:41 ah har! how do you like getting FUD thrown back at you, microsoft scum! 01:00:59 pengo - LoL 01:01:50 state machines are fun 01:02:13 yes. yes they are. 01:02:40 arg! cvs is just pausing on me 01:03:03 I am going to port my kernel to the quantum computer, as well as to the human brain. 01:03:11 Unfortunately, human brain assembly is quite difficult... 01:03:26 It seems that human brain RAM gets corrupted quite frequently. 01:03:37 DorkPunk: you're just not accessing it correctly 01:03:52 pengo - Perhaps. 01:04:37 i'd like to do some quantum stuff too 01:05:08 I am quantum, hear me roar! 01:05:10 * DorkPunk makes fists. 01:05:34 yes, that is one theory of human thinkingness. 01:06:01 (which i happen to believe absolutely) 01:06:14 I believe that consciousness is an illusion. 01:06:56 --- nick: dax__ -> dax 01:06:57 what are illusions? 01:07:32 pengo - Consciousness, rationality. 01:07:36 Freedom. 01:08:06 Freedom is no illusion! 01:08:21 merely a difficult to define and somewhat subjective abstraction. 01:08:45 --- join: HuntrCkr (~root@myr53-01-p143.gt.saix.net) joined #osdev 01:10:30 i need a faster link. i spend all day downloading 12 minutes of zim. back in 12. 01:11:22 hi guys!! 01:11:29 Greetings, HuntrCkr. 01:11:47 hey dax :) 01:12:00 finally got my gentoo system up and running :) 01:12:23 hi HuntrCkr. 01:12:32 and? 01:15:13 hehe... i like :) 01:15:56 had a lot of trouble getting kde installed though... must be because they are busy with the 1.4 tree 01:16:06 hmm kde :( 01:18:40 thanx for all the help today guys (most of whom are gone now :-) 01:19:16 I hate DMA. 01:19:19 --- quit: jdrake () 01:21:27 What is the URL to air's website? 01:22:05 qzx.com 01:22:33 air - Thank you. 01:22:46 or qzx.com/docs/ 01:25:39 * DorkPunk does more research on air's site. 01:28:01 * air is now sleeping 01:29:24 nitey nite 01:29:29 --- join: crg (~crg@server.sisk.reset.net.pl) joined #osdev 01:29:29 sweet dreams 01:32:55 Has anybody here implemented sleep() or some such function in a kernel, to pause? 01:32:59 sure 01:33:30 DorkPunk: i've only implemented it in my braaaaaain 01:33:51 geist - Okay, usually, when a task wants to "pause," so that the user can view information on the screen, before going on... If you want to "sleep" for two seconds, does that mean that the routine should just eat its CPU cycles? Or yield to the next process, until two seconds have passed? 01:34:15 yield 01:34:24 here it is in newos: 01:34:24 void thread_snooze(bigtime_t time) 01:34:24 { 01:34:24 sem_acquire_etc(snooze_sem, 1, SEM_FLAG_TIMEOUT, time, NULL); 01:34:24 } 01:34:26 :) 01:34:49 anyway, you want to block the thread for the period 01:34:54 geist - Also, do you maintain uptime in seconds? 1/100ths of a second? 01:35:04 microseconds 01:35:10 bigtime_t is a 64-bit number 01:35:23 geist - What is the advantage of maintaining uptime in microseconds? 01:35:35 may as well 01:35:52 a 32-bit number isn't good enough if you are going to maintain it with a reasonable amount of accuracy 01:35:59 so you need to use a 64-bit number 01:36:11 Why isn't a 32 bit number good enough? Too small? 01:36:20 and even with microseconds, it'll never wrap around in a forseeable future 01:36:23 too small 01:36:33 you need to at least track milliseconds probably 01:36:42 hmm... sleeping in daxos is performed by a null-ipc with a timeout 01:36:45 and a 32-bit number in milliseconds only last a few weeks I think 01:36:51 geist - Is a microsecond 1/1000th? 01:37:03 microsecond == 1/1000000 01:37:12 1 millionth 01:37:17 10^-6 01:37:22 what's milli then? 1/1000th ? 01:37:24 geist - You have timer interrupts every 1/1000000 seconds? 01:37:37 nope, I look at the cpu's time stamp counter 01:37:39 rdtsc 01:37:50 geist - How often do you have timer interrupts? 01:38:00 as often as they're needed 01:38:06 I set it to the next event in the timer queue 01:38:17 I think the minimum value is 1ms or maybe 500us 01:38:18 geist - I see. You use the "programmable one-shot" mode for the PIT? 01:38:29 yes, and mostly I use the local apic 01:38:41 geist - Isn't the local APIC only present on SMP machines? 01:38:51 nope, it's present on pentiums and above 01:38:59 the ioapic is the one that's only present on smp machines 01:39:05 geist - Why use the APIC and not the PIT? 01:39:13 apic > pit. 01:39:14 the apic is a lot faster to set up 01:39:21 it's a lot more accurate too 01:39:23 dax - How so? 01:39:32 it has a 32-bit counter that counts at bus speed 01:39:42 the local apic is local to the cpu 01:39:44 Hmm... Maybe I can use the PIT for only time routines... And the APIC for multitasking... 01:39:55 so writing to it's registers takes no time 01:40:01 it produces no external bus cycles 01:40:12 whereas writing to the PIT takes hundreds of cycles 01:40:14 geist - So you use the PIT for nothing? 01:40:18 dax - And you use the PIT for nothing? 01:40:25 uhm 01:40:27 I use it to time the local apic and the cpu 01:40:34 i don't use it alot either 01:40:55 I think of everything that I have implemented so far, I enjoyed programming the PIT the most... 01:40:59 well the timer part of daxos is something needing a rewrite :) 01:41:14 anyway, as soon as you go smp you should look at the local apic 01:41:22 --- quit: stormbind (Remote closed the connection) 01:41:28 geist: yea i know... 01:41:31 unless you want to do a lameass hack like run a single timer and have the receiver cpu interrupt the other one 01:41:38 which I think freebsd or linux did for a while 01:41:40 --- join: stormbind (~stormbind@p50834B93.dip.t-dialin.net) joined #osdev 01:42:08 geist - I want to go SMP! :-) I must first acquire an SMP machine though, which may take a long time in my current financial state. :-( 01:42:22 well, learn about it up front, and design for it 01:42:24 my apic code is crap. 01:42:28 and my irq code too 01:42:30 I went a while before getting smp working 01:42:34 waaaay to much overhead. 01:42:37 but I designed for it 01:42:44 Can the PIT [somewhat] accurately count 1/1000ths of a second? 01:42:55 yes 01:43:07 What is the smallest quantum that the PIT can handle? 01:43:10 it runs a 1.19 Mhz if I recall correctly 01:43:16 so the smallest quantum is one tick of that 01:43:25 1/1190? 01:43:34 have you gone to school? 01:43:37 mega, milli 01:43:41 geist - No. :-( 01:43:45 dont they teach that shit? 01:43:48 I want to go to school... 01:44:01 lemme see 01:44:10 void thread_snooze(bigtime_t time) 01:44:10 { 01:44:10 sem_acquire_etc(snooze_sem, 1, SEM_FLAG_TIMEOUT, time, NULL); 01:44:10 } 01:44:13 oops 01:44:15 hold on 01:44:18 1193180 01:44:24 per second 01:44:26 geist - I am sorry if I am asking stupid questions. :-( 01:44:32 Please do not become frustrated. 01:44:56 and you set the PIT by setting the start count 01:45:02 and when it hits zero it triggers the interrupt 01:45:06 Yes. 01:45:09 I have already done it. 01:45:10 so the fastest you can set it to is 1 over and over again 01:45:20 which means 1193180 times per second 01:45:28 216kb of i386 dependant code :( 01:45:30 which is 1/1193180 seconds 01:45:33 I do not use the "programmable one-shot" mode though. 01:45:42 same thing 01:45:52 anyway, that's a bit under one microsecond 01:45:58 geist - Well, I don't think it will actually reach 1/1193180 seconds... Because the ISR may take longer than 1/1193180 seconds. 01:46:09 but you really dont want interrupts that fast 01:46:15 probably not faster than a millisecond 01:46:15 Unless it is just a do-nothing ISR... 01:46:26 even then there's not much time 01:46:28 think about it 01:46:34 if you have a cpu running at 500Mhz 01:46:46 a 1Mhz, it would only have 500 cycles to do the ISR 01:46:47 And all it has to do is iret in the ISR... 01:46:51 Ah. 01:47:10 When a timer interrupt interrupts a timer interrupt, does the world end? LoL 01:47:20 Are the results of such a case unpredictable? 01:47:28 nope, because the interrupts are disabled upon taking the interrupt 01:47:42 or at least they should be if you set the IDT entry to be an interrupt gate 01:47:46 geist - But they have to be disabled manually within the ISR with cli, right? 01:47:55 nope 01:48:06 they are disabled automatically if it's an interrupt gate 01:48:14 which you normally set it to in the IDT entry 01:48:16 geist - Oh, I see... All interrupts are disabled automatically? 01:48:25 if the vector is set up that way yes 01:48:33 it's configurable by you 01:48:35 So then you can get "interrupt pileup?" 01:48:45 Or are the interrupts simply ignored? 01:48:46 it'll only pile one deep 01:48:52 one is queued up 01:48:55 After one deep, it ignores the others? 01:48:58 and all subsequent ones are ignored 01:49:02 Oh okay. 01:49:06 I understand now. 01:49:31 If the timer ISR is set up as an interrupt gate, then implicitly cli;sti are issued upon entering and leaving the top-half handler... 01:49:33 --- part: geqo left #osdev 01:49:59 * DorkPunk writes it down. 01:50:25 And one interrupt is queued... And subsequent interrupts that occur during the execution of the ISR are ignored... 01:50:36 It's a good thing that I can't type 1,000,000,000 words per minute. ;-) 01:50:39 will cli is implicitly done, and the interrupt enabled bit is restored at the iret 01:52:02 What does "output will be low" and "output will be high" mean, when referring to the PIT? 01:52:11 I am trying to understand the different modes of operation. 01:52:36 * dax is cleaning daxos 01:53:59 I dont know 01:54:05 I learned just enough of the PIT to get it to work 01:54:14 geist - Me too. I want to learn more now. :-) 01:54:21 I choose not to fill my head with worthless knowledge like how the PIT works in detail 01:54:33 what's PIT stand for anyway? P1 timer? 01:54:34 some things are worth learning, some are not 01:54:39 Programmable Interval Timer. 01:54:41 programmable interrupt timer 01:54:43 er interval 01:54:47 geist - Everything is worth learning, my friend. :-) 01:55:00 anyway, stuff like how the pit or pic works is best answered by a web page 01:55:05 that stuff has been covered a lot 01:55:07 DorkPunk: einstein never learned his own phone number. 01:55:29 pengo - Lovely. And Brittney Spears never learned how to think. ;-) 01:55:53 DorkPunk: I dunno, she's playing the system pretty well 01:56:02 DorkPunk: maybe if spears didn't learn her phone number she would have enough space in her head left for thought. 02:12:15 --- join: Aardappel (wvo96r@p508C7DAF.dip.t-dialin.net) joined #osdev 02:19:59 --- quit: Aardappel ("http://wouter.fov120.com/") 02:20:21 --- join: Aardappel (wvo96r@p508C7DAF.dip.t-dialin.net) joined #osdev 02:23:55 --- quit: Aardappel (Client Quit) 02:24:13 --- join: Aardappel (wvo96r@p508C7DAF.dip.t-dialin.net) joined #osdev 02:28:54 suprisingly I'm having a tough time finding any info about the attribute byte in vga text mode 02:28:57 any links? 02:29:09 I've searched all the osdev sites I have links to, and I haven't see anything yet 02:29:17 * DorkPunk wishes that he could help... 02:29:23 I figured that would be the first thing that would be written 02:30:35 --- join: cookin (~jrydberg@d212-151-96-239.swipnet.se) joined #osdev 02:30:43 howdy cookin 02:31:14 howdy 02:31:24 so, how'd it go? 02:31:55 pretty good. 02:31:59 great! 02:32:09 So I'm moving today. 02:33:23 cool 02:34:32 feels good to start studying again 02:35:24 * geist found a site on the graphics attributes 02:37:44 --- join: eirikn (~eirik@ipv6.eirikn.net) joined #osdev 02:38:30 --- part: HuntrCkr left #osdev 02:40:40 --- quit: crg (".") 02:40:43 --- quit: cookin ("Client Exiting") 02:42:16 --- join: root (~root@myr53-01-p143.gt.saix.net) joined #osdev 02:44:03 --- quit: root (Client Quit) 02:44:34 --- quit: nbsp ("-_-.zZ") 02:45:58 --- join: HuntrCkr (~root@myr53-01-p143.gt.saix.net) joined #osdev 02:46:06 --- part: HuntrCkr left #osdev 02:47:33 --- join: Penaforte (~mariobron@CPE0080c6fe432b-CM001095129670.cpe.net.cable.rogers.com) joined #osdev 02:47:45 --- join: HuntrCkr (~root@myr53-01-p143.gt.saix.net) joined #osdev 02:47:51 --- quit: HuntrCkr (Client Quit) 02:48:25 I wish I could attend a university... 02:50:56 --- quit: HeavyJoost (Read error: 104 (Connection reset by peer)) 02:51:23 DorkPunk: why can't you? 02:52:05 pengo - Because my parents kicked me out, and I cannot afford it... I am working and saving money. 02:53:33 ahh bugger 02:59:55 isn't there any way to borrow some money from the government to go to uni? 03:00:03 it's possible here 03:04:55 hmm 03:05:00 somehow i like belgium. 03:05:07 uni doesn't cost alot 03:05:16 like $400 or so 03:05:32 Joey_ - I have looked into it. I do not quality for such loans... 03:10:29 --- quit: pengo (Read error: 104 (Connection reset by peer)) 03:12:34 --- join: mur (jukka@baana-62-165-187-227.phnet.fi) joined #osdev 03:23:26 --- join: smaffy (smaffy@d212-151-34-218.swipnet.se) joined #osdev 03:25:52 --- quit: Penaforte () 03:36:17 --- join: zensox (~zensox@pD9E2C11E.dip.t-dialin.net) joined #osdev 03:44:56 --- join: Penaforte (~mariobron@CPE0080c6fe432b-CM001095129670.cpe.net.cable.rogers.com) joined #osdev 03:49:08 --- join: crg (~crg@server.sisk.reset.net.pl) joined #osdev 03:55:20 hey 03:55:53 yo 03:56:17 j00! 03:56:18 ;) 03:56:31 :P 03:57:16 j00 1 00nwz 03:57:21 hows going,c? 03:58:15 :P 03:58:16 ok 03:58:20 going on holidays 03:58:36 k 03:58:41 have a nice vacation 03:58:48 --- join: eks (~eks@h24-82-197-140.wp.shawcable.net) joined #osdev 03:59:42 hex 03:59:49 hello mur 04:03:12 --- quit: dax (Remote closed the connection) 04:03:48 --- nick: gab|dfxxxxxxxxxx -> gab[gdb] 04:09:40 --- join: Mathis (Mathis@gstw-d9b89f36.pool.mediaWays.net) joined #osdev 04:09:49 --- quit: Mathis (Remote closed the connection) 04:13:46 --- join: HuntrCkr (~huntrckr@myr53-01-p143.gt.saix.net) joined #osdev 04:18:15 --- quit: geist () 04:21:54 --- quit: HuntrCkr (SendQ exceeded) 04:23:13 --- quit: DorkPunk ("BitchX: the quilted quicker picker upper") 04:23:19 --- join: HuntrCkr (~huntrckr@myr53-01-p143.gt.saix.net) joined #osdev 04:29:40 --- quit: HuntrCkr (SendQ exceeded) 04:34:41 --- join: corsairk8 (~Stealthy@pc-62-30-121-110-cr.blueyonder.co.uk) joined #osdev 04:34:49 --- quit: corsairk8 (Remote closed the connection) 04:38:04 --- quit: crg (".") 04:55:33 --- join: dax (~you@u212-239-163-14.adsl.pi.be) joined #osdev 04:55:38 reassembling my smp rig 05:00:30 --- quit: smaffy ("0xBOB15DEAD") 05:10:34 --- quit: darkito ("User abort with 5 Ctrl-C's") 05:11:36 --- join: MeFui (darkito@62-37-122-210.dialup.uni2.es) joined #osdev 05:12:40 hihi 05:12:44 --- join: Javanx (~javanx@213.45.18.185) joined #osdev 05:14:24 heyehy 05:18:35 heh :) 05:31:21 --- nick: gab[gdb] -> gab[gdb--] 05:43:00 --- quit: miro_ (Remote closed the connection) 05:43:19 --- join: lynx_ (~lynx@pD9544B77.dip.t-dialin.net) joined #osdev 05:48:34 --- join: pavlovski (TimRobinso@modem-762.blotto.dialup.pol.co.uk) joined #osdev 05:49:02 --- join: tirloni (gpt@neutron.tirloni.org) joined #osdev 05:51:06 anyone awake? 05:51:13 me! 05:51:43 hey lynx_ 05:51:49 hi pavlovski 05:52:14 woo pavlovski 06:00:19 --- quit: lynx (Read error: 110 (Connection timed out)) 06:01:35 --- join: xargoon (xargoon@ti400720a064-0340.dialup.online.no) joined #osdev 06:01:48 --- join: miro (~miro@pD9E4C1E6.dip.t-dialin.net) joined #osdev 06:03:01 --- join: draq (~norm1111a@ESS-p-144-138-43-228.mega.tmns.net.au) joined #osdev 06:03:34 evening folks 06:03:53 well it is here 11 pm 06:05:11 hey draq 06:05:17 here it is 2pm ;) 06:06:39 lazy sunday after noon? 06:06:51 yep 06:06:59 * pavlovski practices at topcoder.com 06:07:00 --- nick: gab[gdb--] -> gab 06:13:22 --- quit: dax (Remote closed the connection) 06:18:29 --- join: kemu (~kemu@52.124-136-217.adsl.skynet.be) joined #osdev 06:20:52 --- quit: tirloni ("bbl") 06:23:58 topcoder.com? 06:24:29 hmm 06:32:48 --- quit: MeFui (Read error: 113 (No route to host)) 06:40:21 --- join: dax (~you@u212-239-163-14.adsl.pi.be) joined #osdev 06:40:22 hmm 06:40:48 that attempt of booting my smp rig was uhm... VERY unsuccessful 06:41:19 when I booted mine for the first time it shorted everything out and the power supply tripped 06:41:34 it took me some time to work out that a small capacitor had blown and was shorting out 06:42:15 hmm 06:42:27 took me one hour to figure out why it didn't boot 06:42:35 the floppy drive si b0rken 06:45:04 this capacitor had sprayed its charred contents over the top of the keyboard controller 06:45:21 --- quit: Javanx ("I don't feel a thing, and i stopped remembering. The days are just like moments tourned to hours") 06:46:02 that tops booting problems 06:47:30 --- quit: draq ("my worst boot up problem: any of my customers running me!!") 06:52:21 --- quit: lynx_ (Read error: 110 (Connection timed out)) 06:54:07 --- join: _avlovski (TimRobinso@modem-762.blotto.dialup.pol.co.uk) joined #osdev 06:54:08 --- quit: pavlovski (Connection reset by peer) 06:58:35 --- nick: _avlovski -> pavlovski 07:08:31 --- quit: kemu (Remote closed the connection) 07:10:04 time 07:10:06 for 07:10:08 great 07:10:12 america! 07:10:16 =) 07:10:25 later 07:11:11 it's always time for Great America! ;) 07:12:35 http://kverka.org/~osdev is broken 07:18:58 that's Ethernet's fault 07:19:36 --- quit: dax (Remote closed the connection) 07:32:34 my ride isn't here yet =P, anyways whish port in the back of my comp is a serial port 07:32:47 afaik i think they are shappedl ike a d and have 9 or 25 pins 07:32:51 is this correct? 07:33:31 yes 07:33:35 like the main plug going into my computer from the outlet is a serial port? 07:33:48 if you've got an ATX board, you'll have two 9-pin D-type connectors 07:34:01 they're both male 07:34:08 yeah 07:34:09 the parallel port is 25-pin D-type female 07:34:21 oo is serial is only 9? 07:34:28 i swear i thought it was also 25 07:34:39 it can be either, but afaik modern PCs use 9-pin 07:34:56 hehe well my comp is a bit old like 3 years 07:35:04 anyways thanks for the info, time to go =) 07:36:12 --- quit: pavlovski ("Client Exiting") 07:38:01 --- join: acme (acme@pD9E639A2.dip.t-dialin.net) joined #osdev 07:49:44 --- quit: ctkrohn (Read error: 110 (Connection timed out)) 07:57:44 --- join: HuntrCkr (~huntrckr@myr53-01-p143.gt.saix.net) joined #osdev 07:58:02 hehe... how is this for sucks :) 07:58:12 running mIRC in linux :p 07:58:49 well, at least i know now wine works :) 07:58:55 CYa later! 07:59:01 --- part: HuntrCkr left #osdev 08:01:56 --- quit: xargoon () 08:03:33 --- quit: file ("My damn controlling terminal disappeared!") 08:03:34 --- join: cash (~cash@ppp-67-48.25-151.libero.it) joined #osdev 08:06:49 --- join: Javanx (~javanx@213.45.18.185) joined #osdev 08:12:26 --- join: kemu (~kemu@134.199-136-217.adsl.skynet.be) joined #osdev 08:26:58 --- join: darkito_ (darkito@62-36-144-226.dialup.uni2.es) joined #osdev 08:28:47 --- join: Robert_ (~Robert@robost86.tsps1.freenet6.net) joined #osdev 08:29:08 --- quit: Robert (Read error: 104 (Connection reset by peer)) 08:29:22 --- nick: Robert_ -> Robert 08:29:32 hey rober 08:29:33 :) 08:30:08 Hi xD 08:32:49 --- join: trash (~trash@pe196.zgora.cvx.ppp.tpnet.pl) joined #osdev 08:41:51 --- quit: trash ("leaving") 08:47:25 --- join: miro_ (~miro@pD9E4CBCC.dip.t-dialin.net) joined #osdev 08:55:27 --- quit: miro (Read error: 60 (Operation timed out)) 09:07:00 --- join: pavlovski (TimRobinso@modem-1263.abra.dialup.pol.co.uk) joined #osdev 09:07:20 hey all 09:11:57 --- quit: kemu (Remote closed the connection) 09:14:48 --- join: rob___ (~cash@ppp-95-30.25-151.libero.it) joined #osdev 09:15:15 --- join: jdrake (jptd@CPE014410113717.cpe.net.cable.rogers.com) joined #osdev 09:19:55 --- quit: cash (Read error: 110 (Connection timed out)) 09:20:53 --- join: tirloni (gpt@neutron.tirloni.org) joined #osdev 09:24:42 --- join: lynx_ (~lynx@pD9E638B8.dip.t-dialin.net) joined #osdev 09:28:30 --- join: file (joshnet@65.166.122.14) joined #osdev 09:37:38 moo 09:37:45 mooooo 09:37:49 MOOOOOO 09:38:40 * indigo takes a nap 09:39:29 i am having a lot of trouble with the lgdt instruction in at&t syntax inside of gcc 09:44:19 --- quit: lynx_ (Read error: 110 (Connection timed out)) 09:44:22 muu muu vaan 09:44:54 jdrake: what problems? 09:45:15 this works: 09:45:23 gdtr->base = (addr_t) gdt; 09:45:23 gdtr->limit = sizeof(arch_gdt) - 1; 09:45:23 __asm__("lgdt (%0)" : : "r" (gdtr)); 09:47:35 what gcc are you using? 09:48:33 what is the definition of gdtr 09:49:31 --- join: rr (~cash@ppp-146-22.25-151.libero.it) joined #osdev 09:51:27 2.95.soemthing 09:51:42 here's gdtr: 09:51:43 struct dtr_t 09:51:43 { 09:51:43 uint16_t limit; 09:51:43 uint32_t base; 09:51:43 }; 09:51:47 typedef struct dtr_t gdtr_t; /* GDTR register definition */ 09:51:49 typedef struct dtr_t idtr_t; /* IDTR register definition */ 09:52:19 'gdt' is a pointer holding the physical address of the arch_gdt array 09:53:05 i think that is my gdt_location (i am borrowing code) 09:53:37 is the gdt limit the the max size * size of the gdt entry? 09:54:17 it's the ([number of descriptors] * 8) - 1 09:54:33 if you implement the GDT as a C array, it's sizeof(the_array) - 1 09:57:04 that seems to work 09:57:18 now I get an assembler problem with some previous code 09:57:41 it is some code that has a label in it, and it is complaining about the label being defined already, it doesn't matter what I name the label 09:57:50 it is at the assembler stage (past parsing the C) 10:01:54 can you code it without the label? 10:02:07 i.e. do the labelling/branching stuff at the C level 10:05:51 "pushl $cs_jump\n" 10:05:51 "lret \n" 10:05:51 "cs_jump:\n" 10:06:09 (just before that... "pushl %0\n" 10:06:22 its refreshing the cs register 10:06:45 that looks wrong anyway 10:06:47 better: 10:07:03 pavlovski: congrats on the virus :) 10:07:04 __asm__("ljmp %0,$_paging\n" 10:07:04 "_paging:" 10:07:04 : 10:07:04 : "i" (KERNEL_FLAT_CODE)); 10:07:26 air: 'Bloodshed'? :) 10:07:29 ya 10:07:46 dunno what that's about... looks like a false alarm 10:07:49 may i paste the entire asm block for your review, a broader view might be better 10:07:56 either that, or the first Mobius virus ;) 10:08:19 air: thanks for reminding me though 10:10:23 the multiline thing on a single line. the way things are being passed are different i think: __asm__ __volatile__ ( "pushl %0\n" "pushl $cs_jump\n" "lret \n" "cs_jump:\n" " mov %1, %%eax\n" "mov %%ax, %%ds\n" "mov %%ax, %%es\n" "mov %%ax, %%fs\n" "mov %%ax, %%gs\n" "mov %%ax, %%ss\n" : : "g" (new_code), "g" (new_data) ); 10:11:19 what does the output from the compiler look like? 10:11:26 can I use your ljmp thing with that new_code parameter as it looks now? 10:11:32 do gcc -E ...[the usual options]... 10:11:33 i haven't looked at that 10:11:35 ok 10:12:25 --- quit: rob___ (Connection timed out) 10:12:47 is that just supposted to parse it or something, it doesn't look any different 10:14:07 argh 10:14:08 gcc -S 10:14:14 -E is the preprocessor :) 10:15:01 --- quit: file ("My damn controlling terminal disappeared!") 10:15:37 movzwl system_data_segment, %edx 10:15:37 movzwl system_code_segment, %ecx 10:15:37 #APP 10:15:37 pushl %ecx 10:15:37 pushl $cs_jump 10:15:37 lret 10:15:39 cs_jump: 10:15:41 mov %edx, %eax 10:15:43 mov %ax, %ds 10:15:45 mov %ax, %es 10:15:47 mov %ax, %fs 10:15:49 mov %ax, %gs 10:15:51 mov %ax, %ss 10:16:55 what happens if you assemble that listing with gas? 10:17:10 --- quit: rr ("Client Exiting") 10:17:42 i don't have 'gas' 10:18:00 but i do have as 10:18:02 gdt.s: Assembler messages: 10:18:02 gdt.s:246: Error: symbol `cs_jump' is already defined 10:18:02 you run gas with the as command 10:18:15 is there anything called cs_jump anywhere else in that file? 10:18:26 (gas is not very clever) 10:19:06 yes 10:19:11 it is almost a repeat of the code 10:19:22 right, then that's the other definition 10:20:11 it seems like it is inlining the function once and having the function once 10:20:29 yes, gcc does that 10:20:43 why, that can cause all sorts of trouble like this 10:20:52 for inline functions, it provides one static expansion, in case you want to call the function through a pointer 10:20:57 and one expansion per call 10:21:25 why do you have the function inline if it's only called from one place? 10:22:20 i am almost starting to like this syntax 10:22:57 it isn't line, i just said it looks like it is doing that 10:23:03 like an automatic thing 10:24:03 what kinda tools does unix have for telling me how many times each word in a file occurs? 10:24:11 do you have lots of optimization turned on 10:24:12 ? 10:24:33 * jdrake can't answer that question because the response might incriminate him 10:25:16 i have the highest level on that I know of 10:25:32 i can find the option to disable automatic inlining 10:26:19 i have updated the function to use that method you showed me 10:26:20 optimization is usually bad for this kind of system-level code 10:26:38 it doesn't like the operand constraints 10:26:39 at least turn optimization off if you're trying to outwit the compiler, until you're sure things work 10:27:04 -O0 should turnit off right? 10:27:09 yes 10:27:28 the key parts to this function where it doesn't like the way the operands are going... 10:27:29 void gdt_updateSegments(uint32 new_code, uint32 new_data) 10:27:36 "ljmp %[codeseg],$_paging\n" 10:27:43 : : [codeseg] "i" (new_code), 10:27:43 [dataseg] "i" (new_data) ); 10:27:56 wtf is the [codeseg] thing 10:27:59 are you using gcc 3.x? 10:28:14 gdt.c:21: warning: asm operand 0 probably doesn't match constraints 10:28:17 yes 10:28:21 hmm 10:28:26 its a new thing 10:28:30 I assume that's the same as saying %0 10:28:33 you can do that instead of %0 10:28:39 yes it is 10:28:46 ah! you can't do that 10:28:50 "i" is Immediate 10:29:00 As of GCC version 3.1, it is also possible to specify input and output operands using symbolic names which can be referenced within the assembler code. These names are specified inside square brackets preceding the constraint string, and can be referenced inside the assembler code using %[name] instead of a percentage sign followed by the operand number. Using named operands the above example could look like: 10:29:00 so you can't use a variable there 10:29:00 asm ("fsinx %[angle],%[output]" 10:29:00 : [output] "=f" (result) 10:29:00 : [angle] "f" (angle)); 10:29:13 i also tried g but it didn't work also 10:29:14 in mine, KERNEL_FLAT_CODE is a #define 10:29:26 this is a fundamental constraint of the x86 instruction set 10:29:48 in mine it is just an int32... 10:30:26 "cmpb $0,%0\n\t" \ 10:30:26 "rep;nop\n\t" \ 10:30:26 "jle 2b\n\t" \ 10:30:38 anybody can explain to me that 3 lines of code? 10:30:44 rep;nop doesn't make sense in my books 10:31:18 it kind of repeats cx times doing nothing 10:31:47 it looks like a delay of specific clocks 10:31:55 nop always takes 1 clock afaik 10:32:15 lame ass code in the linux kernel 10:32:38 if the lock is not free it should switch thread or something, not do nop until the lock becomes green 10:34:28 eks, linux is not known for absolute design nirvana 10:34:51 indeed 10:35:30 pavlovski, that 'fundamental constraint' might be the reason for the hackish look before 10:36:11 --- join: Mathis (Mathis@gstw-d9b89f2c.pool.mediaWays.net) joined #osdev 10:36:31 heh all 10:36:54 hi mathis 10:37:01 hi jdrake 10:38:24 could someone here please hack 12.254.48.152 and format the hdd? 10:38:34 air: why? 10:38:59 it has nimda and hit my server 9064 times in august 10:39:10 hehe 10:39:18 air, you could change the port to another one 10:39:21 should be easy to hack with that big hole in it 10:39:37 jdrake: no i cant 10:41:14 is the server not at your location? 10:41:33 it is 10:41:50 --- join: Ubel (~Ubel@arnarson.is) joined #osdev 10:41:52 are you just complaining that it hit you or hacked you? 10:42:03 just hit me 10:42:14 don't complain too much then 10:42:28 my anti-nimba script prevented it from wasting upstream but still... 10:42:35 nimda 10:43:30 I once put up a webserver at port 80, not IIS mind you, and in the space of an hour I had between 150k and 300k of a log file 10:44:33 want a list of 558 infected hosts? :) 10:44:37 what is the instruction name to a far return? (my intel reference only has 'ret') 10:44:50 nah, i don't actively run one 10:45:13 air, if you really don't like it - track them down and sue their asses for $xxx per incident 10:45:24 cant 10:45:33 why not 10:46:28 but i can make sure script kiddies know of them, root em, remove nimda and install a DDoS client, then watch as at&t cancells their accounts for DoS attacks 10:46:54 do that... 10:47:07 unless nimda secures the holes it gained access thru 10:47:51 it depends on how far it has evolved 10:55:39 do you guys know how to specify a comment in a linker script? 10:55:59 * eks suggests using the # symbol 10:56:20 tried 11:02:28 that whole thing about setting up the gdt seems to be triple faulting it now (... trying to narrow it down ...) 11:04:07 --- quit: Robert (Remote closed the connection) 11:04:35 --- join: Robert (~Robert@robost86.tsps1.freenet6.net) joined #osdev 11:07:18 this is triple faulting at the same type of situation as before... accessing global data (specifcally in this case assigning to it) 11:09:50 --- join: ctkrohn_ (~ctkrohn@ip68-100-176-44.nv.nv.cox.net) joined #osdev 11:10:04 --- join: kemu (~kemu@134.199-136-217.adsl.skynet.be) joined #osdev 11:10:48 --- nick: ctkrohn_ -> ctkrohn 11:10:56 --- quit: mur ("*( )3:o -[mur mur]") 11:13:27 --- quit: pavlovski (Read error: 104 (Connection reset by peer)) 11:25:23 --- quit: kemu ("leaving") 11:43:22 --- quit: Mathis ("User pushed the X - because it's Xtra, baby") 11:45:10 --- quit: zensox (Read error: 110 (Connection timed out)) 11:50:48 i think i should drop my boot sector and go with grub 11:54:05 --- join: KeLlEr (k2arlz@200.193.178.192) joined #osdev 12:11:50 --- quit: Javanx ("I don't feel a thing, and i stopped remembering. The days are just like moments tourned to hours") 12:36:07 --- join: geist (~geist@dsl-65-191-44-105.telocity.com) joined #osdev 12:36:13 --- join: HeavyJoost (HeavyJoost@a213-84-139-110.adsl.xs4all.nl) joined #osdev 12:41:07 hey geist 12:43:17 --- nick: KeLlEr -> KeLlEr-away 12:54:02 hi 13:06:03 clear 13:06:05 er 13:10:52 grub calls me 13:12:00 --- quit: HeavyJoost ("Connection reset by a button :D") 13:12:26 --- quit: darkito_ ("indemidelofthenaij we're going to drink a lot of wine and beer") 13:18:51 --- quit: KeLlEr-away (Read error: 104 (Connection reset by peer)) 13:20:48 --- join: EtherNet (~ethernet@lu9dcn.ampr.org) joined #osdev 13:22:11 hello 13:23:29 hola 13:23:32 how are you 13:23:45 jdrake: I am fine, thanks how about you ? 13:24:07 i little frustrated, but that is the price we pay for developing kernels 13:24:26 i am switching over to grub, hopefully that shall ease me :-) 13:24:26 ahh hehe.. 13:24:31 that's true 13:25:11 anytime I was accessing global data i triple faulted 13:25:51 its probably something to do with my boot sector, but grub provides some info I won't have to worry about scanning for at least 13:35:52 jdrake: maybe, just maybe I'll take a look at your code later on if you're still having problems 13:36:06 I just want to make sure you've exhausted your options 13:36:45 --- join: sliv3r (doc@phenix.rootshell.be) joined #osdev 13:36:47 hi 13:37:07 hello kind sir 13:37:19 what's up ? 13:38:18 just doin my thang 13:38:18 i guess nothing ... :) 13:43:49 pretty quiet 13:45:45 --- join: jbreker (~jbreker@HSE-Ottawa-ppp236719.sympatico.ca) joined #osdev 13:46:17 yep 13:46:28 --- quit: miro_ (Remote closed the connection) 13:46:38 i wonder why ... 13:49:37 it's labor day weekend in the US 13:50:36 aaa 13:50:42 picnics .. 13:50:51 yeah, I guess 13:50:52 do you live in US ? 13:50:55 yes 13:51:11 ahaa... 13:51:23 I guess later on i'll find more info on fox news 13:51:32 this is the only us channel i have 13:51:39 oh that sucks 13:51:43 fox news is garbage 13:52:08 yea.. with Shepard smith :) 13:52:35 but is the only one , and i can watch time again from nbc on a retransmition 13:54:32 are you and newos related somehow ... ? 13:55:18 --- quit: ctkrohn (Remote closed the connection) 13:57:16 sliv3r: geist is the author of newos 13:57:26 ahhha 13:57:47 nice to meet you geist 13:57:54 --- join: ctkrohn (~ctkrohn@ip68-100-176-44.nv.nv.cox.net) joined #osdev 13:58:39 did anyone of you used slab mm in your oses ? 13:58:45 * sliv3r did not 14:01:38 what is that 14:01:40 \ 14:02:19 well, it is an 'algorithm' used to allocate the available memory 14:02:39 oh, so that mysterious mm is memory management? 14:02:40 it is one of the most efficient one, based on caches 14:03:30 and also it prevents CPU cache to get 'dirty' while searching available blocks 14:03:33 yea 14:04:00 has anyone ever used those 4mb blocks that the pentium processor started supporting? 14:04:23 correction 4mb pages 14:04:40 not me 14:05:18 is there support for other page sizes other than 4k and 4mb? 14:05:20 as far as i know the only os that use this feature is SCO UnixWare 7 14:05:31 1K 14:06:11 1k blocks would be evilish 14:06:11 yep 14:06:32 using 4mb pages would ease record keeping I think 14:06:42 i gues 4k is the best alternative 14:07:11 the linux kernel uses 4mb pages to map the kernel itself 14:07:25 and I use a slab memory manager in my OS 14:07:43 witten :: may i take a look to your code ? 14:07:45 considering I want to have device drivers as separate processes 4mb would get crowded easily (even with my 512mb ram) 14:07:56 i have difficulties in implementing slab 14:08:02 sliv3r: sure.. look at CVS on http://torsion.org 14:08:13 i have difficulties printing to the screen 14:08:17 okay, witten, thanks 14:08:28 sliv3r: sure, no prob. email me if you have any questions 14:08:41 witten :: i guess i will :) 14:08:49 jdrake :: you do ? 14:09:33 its my global variable access 14:09:48 yes 14:09:50 i am converting over to grub instead of the boot2f boot sector 14:10:16 witten, is that gnu savannah site good compared to sourceforge? 14:11:48 jdrake: it's running about the same software 14:11:54 I've got projects on both 14:12:02 I just don't like VA much anymore 14:12:32 what is wrong with VA 14:12:52 they went proprietary 14:13:01 and they made parts of sourceforge proprietary 14:15:36 so? 14:17:04 free software activist vs. commercial interest argument approaching 14:17:48 :) 14:17:53 warning warning 14:18:30 DANGER WILL ROBINSON! DANGER! 14:18:50 all I know is I personally know people that worked at valinux and linuxcare and a few others around here in silicon valley 14:18:52 and they're fucked 14:19:04 the lucky ones got laid off before the job market crashed 14:19:17 geist, how is that lucky? 14:19:26 because they were able to get a new job 14:19:38 thats good :-) 14:19:48 moo 14:20:13 geist, have you ever heard of an honest job that can be had over the internet that is not extremely programming related, but more general? 14:20:31 'can be had over the internet'? 14:20:35 what does that mean? 14:21:13 a job you do over the internet 14:23:05 i just 'installed' grub according to the instructions for a floppy, but I am not sure how to get my kernel on to the floppy now 14:23:26 i can seem to mount it with 'msdos' or 'ext2' 14:25:11 --- quit: jbreker ("Client Exiting") 14:27:19 you may have the read the directions 14:27:27 I know it's hard 14:27:31 but you can do it 14:27:35 I know you can 14:27:38 :) 14:27:49 actually, I dicked around with grub a bit and didn't like it 14:27:53 * sliv3r is back 14:28:30 i was reading how to make a floppy boot disk, but then in the faq it had what I really needed - how to make one with a menu interface 14:30:48 geist, (as somebody who has been out there), what do you see happening within 5 to 10 years with the 'desktop', 'microsoft', and alternative os? 14:31:02 windows will continue to dominate 14:31:08 people will continue to hack on alternative stuff 14:31:21 the wildcard is apple 14:31:44 I highly doubt it'll be suddenly popular, but what will they do? how much of a niche will they have? 14:32:22 --- part: EtherNet left #osdev 14:32:55 can you see (as an example) linux becoming something that people will be able to use (considering the last 5 years it has come quite far) 14:33:28 I dont 14:34:08 at the same time, windows and macos will become something that people will be able to use that much more 14:34:22 I think the war for the os is over, that was decided a few years ago 14:34:38 geeks can continue to use what they want, and servers can be what they want 14:34:38 really? 14:34:46 but the desktop war is over 14:35:02 I fought it hard when I worked at Be 14:35:05 geist: any views on the embedded market? 14:35:22 but then I took a step back and it was obvious that normal people dont care 14:35:39 Joey_: not really. I work in the embedded market 14:35:49 you do? 14:35:57 tell me more 14:36:08 well, I work at a company doing a product that can be termed 'embedded' 14:36:17 and I work on the os that we wrote for the product 14:36:59 geist, do you like monolithic or microkernels (or insert other here) (on x86 at least) 14:37:06 neither 14:37:10 well 14:37:25 lemme do the usual spiel that I give with respect to monolith vs micro 14:37:32 sure 14:37:42 there is almost no such thing as a pure monolith or a pure micro in the real work 14:37:43 world 14:37:47 it's a continuum 14:37:58 both are design philosophies, not design patterns 14:38:08 the trick is finding a good combination of the two 14:38:27 lots of times it boils down to flexibility vs efficiency 14:39:05 i have heard the term macrokernel, never seen anything on it though 14:39:09 --- join: pavlovski (TimRobinso@modem-604.alakazam.dialup.pol.co.uk) joined #osdev 14:39:19 --- join: kapple (karingo@56.portland-13-14rs.or.dial-access.att.net) joined #osdev 14:39:31 hi pavlovski 14:39:36 hey 14:39:41 hey pav daddy ;) 14:39:45 what's interesting is how the terms have entered the mass conciousness 14:40:08 it is isn't it 14:40:09 most of the time the people who are talking about microkernel vs monolith have no idea about what they really are 14:40:21 I like the idea of a javaos, something in that direction 14:40:25 they just have a vague idea that 'microkernel is better' 14:40:42 i saw a simple diagram of the two 14:40:42 it probably entered the mass conciousness when companies decided they can use it as a marketing term 14:40:42 "I'm building a microkernel because all the drivers are in different files rofl lol" 14:41:01 case in point: beos. beos was always marketed as a microkernel though it wasn't at all 14:41:12 --- quit: sliv3r ("BrB") 14:41:17 my general impression is the monolith has most things running inside of itself, and micro has more stuff outside itself 14:41:25 in general that's right 14:41:31 and the quintessential Windows NT 14:41:33 move more system services outside the kernel 14:41:45 right, NT is marketed as a microkernel, or was for a while 14:41:58 technically speaking it has some microkernel features 14:42:03 it is in a sense, but it's not a pure microkernel 14:42:12 in NT, supervisor code = kernel + executive 14:42:13 in a microkernel can a device driver crash the kernel? 14:42:14 --- join: sliv3r (doc@phenix.rootshell.be) joined #osdev 14:42:15 but it's probably a 7 on a scale from 1 to 10 where 1 == microkernel 14:42:23 jdrake: you even seen a blue screen? 14:42:24 beos was probably 8 14:42:24 what do you call the kernel? everything that runs in ring 0, everything in the one kernel process, anything else? 14:42:42 Joey_: that's one of the tricks that people can use to call anything a microkernel 14:42:44 what is the kernel? 14:42:57 NT has a kernel and an executive, and both live in kernel space 14:43:05 that's how they can get aroudn it 14:43:13 pavlovski, the only blue screens I see are when starting up or shutting down 14:43:14 geist: I define the kernel to be whatever runs in ring 0 on an x86 14:43:28 jdrake: you're lucky ;)... actually, I haven't seen any in a while 14:43:36 for the most part what it is is there core kernel functionality (which typically is non reentrant and quite small), is physicall seperated from the rest of the 'kernel' 14:43:38 I've only had a couple since I've been running w2k 14:43:45 so that part is technically the microkernel 14:43:46 counter strike got my xp to blue screen on me!!! 14:43:53 geist, what would you define win9x as (other than the usually hack blurb) 14:43:57 well, 2k it was. 14:44:01 win9x is a hack 14:44:12 it doesn't fit much of any pattern 14:44:13 Win9x isn't either 14:44:23 it's a DPMI host running on top of DOS 14:44:26 actually what win9x is is a virtual machine running a bunch of little virtual machines 14:44:37 so actually it's quite a technical feat 14:44:50 well, it would have been if it had worked :P 14:44:55 geist, a positive point! 14:44:55 which I suppose it did/does, 14:45:11 in that Microsoft's goal with Win95 was to run *all* Win 3.1 and DOS programs 14:45:16 pavlovski: but it's actually not running on dos, it runs around dos 14:45:22 which is technically different 14:45:23 hmm 14:45:34 it's a collection of dos machines and 32-bit virtual machines running together 14:45:43 is .NET build on the winapi? 14:45:44 granted, it runs directly on the hardware a lot more than 3.1 did 14:45:48 Joey_: yes 14:45:58 hence why there are different types of drivers (like .vxd, which is a driver for the underlying VM architecture) 14:46:02 ah, okay, then I was right 14:46:05 you explained to me yesterday about physical address space - is it possible to have a pci card that sole purpose is to map (say 512mb it has) into physical space to compliment the real ram? 14:46:21 jdrake: yes, but it would be slow 14:46:24 jdrake: no reason why not 14:46:30 pci in a pc is typically 33mhz, 32-bit 14:46:34 I have 32mb on my video card that I could access as very slow RAM 14:47:00 agp helps a bit, but it's definitely optimized to do burst transfer 14:47:10 Can I use my compact flash as ram? 14:47:15 no 14:47:18 jdrake: that's how EMS cards worked in the old days 14:47:21 compact flash has an ata interface 14:47:26 bah! 14:47:42 you had an EMS window in the space between 640KB and 1MB, through which you could access memory on this addon card 14:47:42 when we go into 64 bit x86 are we going to have some sort of bios option for a memory hole at 3.5gb (or insert pci memory map common area) or something like that like we have for 15 to 16mb 14:47:55 jdrake: probably 14:48:03 why? 14:48:09 --- join: trash (~trash@pd93.zgora.cvx.ppp.tpnet.pl) joined #osdev 14:48:10 you already have that problem 14:48:27 can you tell the cards where to map? 14:48:27 since cpus since the pentium pro can actually address 36-bits of physical memory 14:48:38 --- join: Kurt (~kmw@gc-nas-01-s125.cinergycom.net) joined #osdev 14:48:40 yes, you can, if you know how to program the pci controller 14:49:00 "Map me! Map me!" 14:49:00 what function does the memory hole fulfil? 14:49:03 but there's a problem with pci and dma and memory > 4GB 14:49:17 IIRC, pci can only address 32-bits of memory when doing dma transfers 14:49:30 so I think your pci cards can't dma into physical memory > 4GB 14:49:50 --- nick: Joey_ -> Rico 14:50:01 when is hypertransport or whatever supposted to be out? 14:50:10 so you have to make sure your buffers that you have to take data from the ide drives or usb or whatever are < 4GB 14:50:19 basically it's the same old problem that floppies have 14:50:36 where the dma engine that the floppy uses can only dma to/from memory <1MB 14:50:42 pci stuff has the same problem at 4GB 14:50:46 * pavlovski still doesn't what jdrake means when he refers to memory windows 14:50:51 *know 14:51:16 I think he's talking about the fact that pci stuff is mapped into physical address space somewhere 14:51:28 pavlovski, your bios has a 1mb hole at 15mb option 14:51:33 or maybe he's talking about the 640k-1MB hole or 15MB-16MB 14:51:37 throw back from 286 if I recall 14:51:49 15MB-16MB is from eisa if I recall correctly 14:51:55 yes, the ones I've seen refer to OS/2 support 14:51:59 which is why it basically doesn't really show up 14:52:04 or maybe itw as a product of MCA 14:52:09 is that because ISA devices mapped their memory at the top of the 286's address space? 14:52:19 EISA devices 14:52:22 like my PCI devices seem to do in the 4GB PCI space? 14:52:26 at 15MB-16MB 14:52:33 and ISA mapped 640k-1MB 14:52:45 and PCI at ~3.5GB-4GB 14:52:47 so a system with more than 4GB of RAM will need omit a range for PCI cards to show through? 14:52:50 yes 14:53:07 hmm... if you have a gigantic address space on the CPU, you can put PCI elsewhere 14:53:17 not really 14:53:20 or give PCI a limited range, and map it somewhere else out of the way 14:53:21 PCI needs to be <4GB 14:53:25 I recall some other system does that 14:53:39 where PCI memory doesn't 'line up with' RAM 14:53:50 and you have to address e.g. video RAM with an offset 14:54:06 but having non-contiguous physical memory is nothing new 14:54:17 practically every machine I've looked at that's not a PC does it 14:54:22 yep, the 640KB to 1MB space :) 14:54:48 no, I mean mapping your memory chips from say 0 - 128MB 256-384MB, etc 14:54:53 we're going to end up with three holes on the x86-64, for compatibility 14:54:59 oh 14:55:34 so probably the memory controller does something like map 0-3.5GB then 4GB-8.5GB or something 14:55:38 if you had 8GB of ram 14:55:51 but that would actually be quite complex for the memory controller to do 14:56:11 so it may either burn that 512MB of ram that pci covers 14:56:18 or maybe 0-2GB, 4GB-10GB 14:56:40 anyway, that's been going on for years, since ia-32 can address 36-bits of address space 14:56:51 you can buy machiens that take more than 4GB of ram now 14:57:07 you have to switch the cpu into a different paging mode, and it uses three levels of page table 14:57:18 x86-64 just extended that to go to 4 levels of page tables 14:57:33 yuk 14:57:37 that lets you address I believe 48 bits of virtual addres space to I think 52-bits of physical address space 14:57:52 they aren't going to implement more than 48 bits of virtual space yet 14:58:07 I remember reading in Tanenbaum that certain 64-bit workstations (HP?) use inverse page tables, 14:58:14 in fact, I dont know of any 64-bit cpu that actually lets you map all of 64-bit virtual space to 64-bits of physical space 14:58:24 pavlovski: powerpc and power 14:58:24 that is, mapping (small) physical memory to (large) virtual memory 14:58:43 this strikes me as a far better idea than using more and more levels of indirection in the page tables 14:58:51 I think it's quite dumb 14:58:58 i am trying to run grub but when I exit it says Segmentation fault (core dumped) 14:59:00 well, it's an interesting design, but it has some problems 14:59:01 in fact, x86-64 is looking more and more like a hack 14:59:12 I thin kthe best way to do it is to do the explicit tlb fill routine 14:59:18 jdrake: are you running the command-line version or the boot disk version? 14:59:28 that lets the os designer store their paging data in whatever format they like 14:59:33 command line (i am trying to setup for the floppy) 14:59:35 geist: you mean, invoking an exception on a TLB miss? 14:59:50 jdrake: you're not running the boot disk version from the command line by mistake? ;) 14:59:51 pavlovski: I'm not sure why you thought it wouldn't have been a hack to start with 15:00:01 heh 15:00:03 pavlovski: yes, that's how a lot of cpus work and it's quite flexible 15:00:20 yes, RISC 15:00:24 yup 15:00:35 to make sure I am explicit: http://www.gnu.org/manual/grub/html_node/FAQ.html#FAQ How to create a GRUB boot floppy with the menu interface? 15:00:36 in fact, isn't IA-64 and x86-64 about the first CISC architectures to do 64 bits? 15:00:51 depends on if you could powerpc as cisc or not 15:00:54 count that is 15:01:00 jdrake: ok, I don't know 15:01:14 but yes, it's the first pure cisc architecture 15:01:17 to do 64-bits 15:01:26 when I do root (fd0) it says that the selected disk does not exist 15:01:27 hmm 15:01:31 it's not a big deal, you just extend the registers out 15:01:40 yep 15:01:40 and come up with some new mmu scheme 15:02:10 another x86-64 hack: retaining all the segment registers, but ignoring them 15:02:14 right 15:02:23 well, not true actually 15:02:26 but making FS and GS dummy segment registers containing bases 15:02:35 fs and gs are quite useful 15:02:50 they are used for stuff like thread local storage and whatnot 15:02:54 yes, sure 15:02:58 and thats why they left em in 15:02:59 --- quit: sliv3r ("My damn controlling terminal disappeared!") 15:03:04 but wouldn't it be better to use some GPRs for that? 15:03:22 when IBM releases their desktop power4 thingy will there be any motherboards and such that are available for it? 15:03:29 --- join: sliv3r (doc@phenix.rootshell.be) joined #osdev 15:03:32 pavlovski: why invent somethign tnew when you have it already 15:03:40 if you're extending the x86 architecture, the first thing you'd do would be to make some more general-purpose registers for things like this 15:03:49 why? 15:03:51 ok, so they invent two new registers and call them 'FS' and 'GS' 15:03:58 because the x86 doesn't have many GPRs :) 15:04:00 ah but that's not the same thing 15:04:11 you can't just invent new GPRs 15:04:18 there isn't really any space in the opcodes 15:04:26 grr 15:04:28 I'm suprised they could create r8-r15 15:04:36 so they're going for maximum compatibility with the 386 instruction set? 15:04:46 it *is* the same instruction set 15:04:49 c'mon, Intel broke more rules going 286->386! 15:04:57 we got a nice new SIB system for the 386 15:05:03 in 64-bit mode it operates just like before 15:05:05 new registers on the x86-64 wouldn't hurt 15:05:11 --- quit: sliv3r (Client Quit) 15:05:22 you have to put a prefix byte before the instruction for it to operate on 64-bit register and 64-bit operands 15:05:29 a previously unused prefix 15:05:33 AMD: 'people won't bother to learn how to program our chip so we won't change anything' 15:05:42 k, nm :) 15:05:46 which is fine, because when you do 64-bit coding you probably want to still use 32-bit for most of your int needs 15:05:51 true 15:06:10 pavlovski: go learn how to design an incredibly complex chip like that first, then come back and diss it 15:06:11 geist: know any instruction set references for this thing? or specs? 15:06:25 geist: right, which is why I said, "k, nm :)" 15:06:27 sure, I ordered a set of books from AMD and I got em 15:06:34 that's why I know so much about it, I read the books 15:06:39 ah 15:06:43 --- join: sliv3r (doc@phenix.rootshell.be) joined #osdev 15:06:48 basically they just extended the previous architecture 15:06:51 I'm suprised they could 15:06:53 of course, /me is neglecting the IA-64 15:06:59 so am I 15:06:59 the main thigns you get out of it, it's 64-bit 15:07:09 they extended the gprs by adding r8-r15 15:07:16 so there are now 16 general purpose regs 15:07:26 ok, cool 15:07:28 they also extended the SIMD regs and there are xmm8-xmm15 15:07:48 they basically removed segmentation 15:07:56 I like the PC architecture, but the one thing that gets me is how much of a backwards-compatible hack everything is 15:08:06 only a limited fs and gs (used to do stuff like tlb) 15:08:14 they also changed the tss totally 15:08:20 really? 15:08:24 now they dont pretend to do hardware task switching 15:08:28 good. 15:08:35 I have a problem. When I use a single address space, software multitasking and using only ring 0. How can I control stack overflow, what method should I use? 15:08:41 do they keep the old TSS behaviour for 32-bit OSes? 15:08:45 it's used pretty much for what people use it for now, to store the stack pointer to switch to when you take an interrupt 15:08:59 yes, it's fully backwards compatible with ia-32 15:09:04 Rico: I take it you're not using segmentation 15:09:11 you basically set a bit in a control register that makes it go to 64-bit mode 15:09:12 pav: no 15:09:27 Rico: you can't control ring 0 stack overflow very well 15:09:43 because as soon as the stack hits an unmapped page, you can't run a page fault handler to map it, because the stack is broken 15:09:53 --- quit: eirikn ("Segmentation fault") 15:09:59 yes, that's what I noticed... 15:10:01 ring 3 stack overflow is a matter of keeping the page at the end of the stack unmapped 15:10:17 they did also do some stuff to the tss to allow for switching to different stacks per interrupt level 15:10:19 IIRC the stack fault is an abort, which means you theoretically can't recover from it 15:10:19 which is kind of neat 15:10:27 so you can very easily do irq threads 15:10:41 geist: you mean, for nesting interrupts? 15:11:05 no 15:11:09 hold on, lemme find it 15:11:13 or do you mean IRQ levels in the NT/VMS sense? 15:11:20 hold on 15:11:23 pav: so even in ring 3, the task which was using the stack is not usable anymore? 15:11:23 no 15:11:34 Rico: no, that's ok 15:12:03 the reason you get a double fault on a non-present ring 0 stack page is that the CPU causes an exception in handling the page-not-present exception 15:12:21 --- nick: kapple -> karingo 15:12:27 CPU accesses stack as normal -> page not present fault -> CPU accesses stack for page fault -> page not present fault -> double fault 15:12:45 which results in a triple fault, since it neither can handle a double fault, right? 15:12:48 unless you have a dedicated #DF handler with a different TSS, the CPU will access the stack again and cause a triple fault 15:12:52 rihg t:) 15:13:04 GRRer!f 15:13:11 AMD only ship to US or Canada 15:13:22 decadent American imperialists! 15:13:34 shit, where did I see that 15:14:05 so you don't know a way to handle stack overflow using no tss, segmentation and ring 0 only code? 15:14:12 no 15:14:14 damn 15:14:28 if you don't have a separate #DF handler with its own TSS you can't recover from a ring 0 stack fault 15:14:48 would this be the case on other architectures too? 15:14:48 if you set up another double fault TSS with its own stack, you can at least print an error message and kill the process 15:14:53 no idea 15:15:08 okay I see it now 15:15:29 geist, you have any sollution to my problem? 15:16:04 basically the tss in 64-bit just has a list of 8 different stacks that the system can switch to when taking an interrupt of any kind 15:16:12 Rico: another way: run your kernel in ring 1 and put the #DF handler in ring 0 15:16:27 --- join: corsairk8 (~Stealthy@pc-62-30-121-110-cr.blueyonder.co.uk) joined #osdev 15:16:29 in the interrupt descriptor entry in the idt, there is a 3 bit field that selects which one to switch to 15:16:31 --- quit: corsairk8 (Remote closed the connection) 15:16:33 then assign different ring 1 and ring 0 stacks in the TSS 15:16:46 so basically instead of only having a single ring 0 stack to switch to 15:16:49 you can have 8 15:17:02 ok 15:17:13 so you could have one kernel stack per thread for syscalls 15:17:20 right 15:17:21 one for the timer interrupt, and one for other hardware 15:17:24 sure 15:17:30 and they wouldn't interfere with each other 15:17:34 right 15:17:48 and you could schedule the scheduler and the hardware more flexibly with user threads 15:17:50 hmm, nice 15:17:51 there's only 8 so it's not as general purpose as it could be 15:18:04 like you couldn't put a seperate one per interrupt and have interrupt tasks 15:18:06 still, you could group them sensibly 15:18:28 right 15:18:46 so basically the tss just exists for that purpose 15:18:52 15:18:57 ok 15:19:12 well, you could emulate that on IA-32 by putting different handlers in different rings 15:19:22 the structure is just filled with those 8 pointers, and 3 segment registers (for ring 0-2 stack segment to switch to) 15:19:40 --- quit: Aardappel ("http://wouter.fov120.com/") 15:19:49 basically all segments do in 64-bit mode is just determine what ring you are at 15:20:03 geist: given that they've redone the page tables somewhat, can you make execute-only and write-only pages on the x86-64? 15:20:17 they removed execute only 15:20:18 can you even assign ring numbers on a per-page basis? 15:20:32 write only I think they removed as well 15:20:40 reused those bits for something else 15:20:41 of course, because they removed segmentation 15:20:54 but did they add extra bits for that to the PDE/PTE flags? 15:20:57 basically the page entries look pretty much identical to what they did in with PAE on 15:21:05 bah 15:21:06 hold on 15:22:14 one interesting side effect of it is in 32-bit mode with PAE on, the PDP (the little page directory that points to other page directories) is now 512 entries long 15:22:29 how long is each entry? 15:22:34 so even in 32-bit mode, you can now get to 40 bits of external address space instead of 36 15:22:40 ah 15:22:43 64-bits long 15:22:52 * pavlovski hasn't played with PAE 15:22:53 pretty much the same as they are in PAE 15:23:12 which is why each level has 512 entries per table, instead of 1024 15:23:22 since the entries are twice as long 15:23:43 so each 64-bit entry contains a pointer into physical memory, plus some flags? 15:23:51 right 15:23:53 and it's still page-granular, so you only get 12 bits of flags? 15:23:59 s/page/4KB/ 15:24:05 yes 15:24:11 hmpf 15:24:35 http://www.sandpile.org/aa64/index.htm 15:24:36 --- join: _Bradd_ (~bbobak@d57-53-89.home.cgocable.net) joined #osdev 15:24:37 * pavlovski visits the Intel site to check if they did anything more interesting with IA-64 15:24:46 shows you the layout 15:24:56 <_Bradd_> Hi, I have a question.. say I load my kernel at 0x10000, then I want to load a module that was compiled at org 0.. but I'm loading this module at say 0x10100.. how do I get to the data since it was compiled with offeset 0?? 15:24:59 www.sandpile.org is a great reference site anyway 15:25:18 compile it with offset 0x10100 15:25:19 geist: thanks, looks useful 15:25:50 _Bradd_: if it's a non-relocatable binary, you have to compile it with whatever org it's gonna be loaded at 15:25:51 _Bradd_: or you could link a relocatable module and get the loader to look at the relocations 15:25:58 it's easier to change the org though :) 15:26:10 right, or you can relocate it, which is not terribly hard, but kind of tricky if you dont know how 15:26:40 <_Bradd_> k, becuase I might have some modules not loaded so that'll change the offset of the ones that are loaded.. 15:27:03 well, if you are getting into loading arbitrary modules then you'll need a relocator pretty soon 15:27:17 _Bradd_: enable paging and give each module a unique origin within the kernel's address space 15:27:20 what I did for my os was load the kernel at a fixed address, and it's linked to be non-relocatable 15:27:27 and then it loads other modules, and relocates them 15:27:57 it's not incredibly hard, but it took a few days to get it working right 15:28:15 <_Bradd_> so the relocator only has to change references to data? 15:28:21 and instructions 15:28:30 I assume you're using elf 15:28:44 <_Bradd_> actually I'm using raw nasm.. 15:28:48 elf has enough data structures to describe exactly how to patch a binary to run at any address 15:29:03 okay, you need to use elf or some other binary format that supports relocation if you're gonna do that 15:29:07 otherwise you're totally screwed 15:29:23 <_Bradd_> k. 15:29:34 so what modules are you loading? 15:29:44 geist: do you know what the x86-64 I/D flag in the page fault exception code does? 15:29:45 are you designing your system to be incredibly modular from the get-go? 15:30:00 <_Bradd_> heh, nothing yet, I just started a small kernel.. just thinking ahead.. 15:30:04 pavlovski: my guess is instruction vs data 15:30:06 lemme see 15:30:11 mine too 15:30:19 _Bradd_: good to think ahead 15:30:27 "but how does the CPU distinguish between instructions and data...?" 15:30:42 in the future you'll for sure need to go to a different binary format 15:30:56 <_Bradd_> k. 15:31:51 pavlovski: what bit? 15:31:56 erm 15:32:03 4 15:32:15 for that matter, what is RSV? 15:32:27 yep, that's what it is 15:32:37 if it's set, it was an instruction fetch 15:32:40 I'm familiar with user/supervisor, read/write and present, but not these other two 15:32:41 otherwise it was a data fetch 15:32:42 ah 15:32:49 rsv means reserved 15:32:54 ok :) 15:33:01 oh wai 15:33:04 not true 15:33:18 interesting 15:33:50 "if this bit is set to 1, the page fault is a result of the processor reading a 1 from a reserved field within a page-translation-table entry." 15:34:19 now why the hell would that be necessary? 15:34:24 so you set a 1 in a reserved field, the CPU accesses the page, and gives you a #PF for you? 15:34:28 yeah 15:34:39 for debugging naughty OS code that sets 1's in reserved fields? :) 15:34:53 I guess, that's strange 15:35:04 there is no more data about it 15:35:24 oh I think I know why 15:35:30 hey, you could implement execute-only pages slowly in software using the I/D bit 15:35:43 correct, and I think that's why they put it there 15:35:46 wait, that would be very slow 15:36:13 there's a feature to turn on with regard to the no-execute bit or something 15:36:27 I kind of wish I had a pdf of this 15:36:28 ? 15:36:31 me too 15:36:37 the book takes a while to search through 15:36:54 they won't ship those manuals behind the Iron Curtain :/ 15:37:23 hey, we get access to the bottom halves of DI, SI, BP and SP now 15:37:29 DIL, SIL, BPL and SPL 15:38:01 guess it's easier to give you those than deny access to the bottom 8 bits of certain registers 15:38:06 right 15:38:44 okay so there's a bit in a control register that enables the no-execute page-protection mechanism (page 173) 15:38:46 hmm... sandpile.org describes the segment registers as being unchanged, apart from the 64-bit base addresses on FS and GS 15:38:48 * geist goes to page 173 15:39:04 pavlovski: they are for 32-bit mode 15:39:19 ok 15:39:47 okay so there is a NX bit in the page structures 15:40:09 ...but you can program the top halves of the FS and GS base addresses so that 32-bit programs can see the 64-bit OS's FS and GS 15:40:17 if you enable the feature, it'll produce a page fault when the page entry is loaded into the instruction TLB and the NX bit is set 15:40:35 which bit? I can't see it on these sandpile pages 15:40:42 look at the page structures 15:40:52 yep 15:40:55 see it? 15:41:04 ...no 15:41:11 --- join: file (joshnet@65.166.122.14) joined #osdev 15:41:11 first bit 15:41:16 on the second word 15:41:22 or first word listed 15:41:29 I guess it's new to x86-64 15:41:34 I dont remember if the ia-32 had it 15:41:36 so bit 16? 15:41:42 http://www.sandpile.org/aa64/paging.htm 15:41:46 see the NX bit? 15:41:48 I'm there 15:41:51 lord... this ISP is stupid 15:41:53 look for NX 15:41:54 they don't limit how many IPs you assign yourself 15:41:55 * pavlovski searches for NX 15:42:08 you're gonna totally slap yourself in the forehead when you see it 15:42:12 it's not where the other bits are 15:42:14 heh 15:42:24 ok, it's in one of the PTEs, right? 15:42:30 it's in all of them 15:42:50 except the PDPTE 15:42:59 ah! it's at the top! 15:43:03 bit 63 15:43:11 great :) 15:43:16 * pavlovski gets the NX bit he always wanted 15:43:20 anyway, I guess that's new 15:43:39 given that it's bit 63, I'd say it was new :p 15:44:20 hmm, you get 16+20 bits for the page base 15:44:43 ok, a 48-bit physical address space 15:44:44 that's why they have the reserved bit set 15:44:51 assuming 4KB pages 15:44:55 the cpu can support up to 52-bits of physical 15:44:59 you added it wrong 15:45:22 but it may support less, in which case if you write a 1 to the unused top bits, it'll produce a reserved page fault exception 15:45:49 36 bits in the page base fields, shifted left 12 bits for 4KB pages, equals 48 bits 15:45:58 or did I miss some other base fields? 15:46:06 you missed some 15:46:18 the base goes all the way over to bit 51 15:46:41 I'm seeing AVL bits on the sandpile page 15:46:42 but bit 36-51 are optional 15:46:47 dont look at AVL 15:46:52 look at base 15:47:07 ok, bits 12 to 31 as per the IA-32 15:47:14 ignore the flags, since they take up 12 bits and the base has to be shifted over 12 15:47:18 then bits 36 to 51 15:47:21 right 15:47:32 therfore 52 bits of physical address 15:47:43 but bits 36-51 are optional per hardware 15:47:51 somewhere you can read how many physical address pins the cpu supports 15:48:00 so the real line is somewhere between those two 15:48:12 ok... there are 16 bits between 51 and 36, and 20 in the first doubleword 15:48:26 bah! 15:48:30 * pavlovski slaps his forehead 15:48:40 and writing a 1 to an area that's unsupported produces a page fault with the reserved but when someone accesses it 15:48:45 bits 12 to 51 are all base 15:48:50 right 15:48:56 just some of them have a different colour 15:49:05 ok, sure 15:49:25 that's because the ones in white were basically the same as in ia-32 with PAE on 15:49:37 yes... the base bits that go beyond the supported address lines of the CPU are reserved 15:49:46 correct 15:49:54 so you can run an OS designed for 52-bit hardware on a 36-bit CPU 15:50:09 I guess 15:50:59 so obviously they dont plan on going past 52-bits any time soon 15:51:05 fair enough 15:51:10 because they'd have to change the entire paging system 15:51:17 since the unused bits are marked AVL 15:51:21 instead of reserved 15:51:32 but 52-bits is pretty good, and I really dont know of any other cpus that can access more 15:51:37 presumably 2^64 bytes of memory would require all the silicon in the universe :) 15:51:48 pretty much all cpus I've ever seen stop at some point 15:51:52 like 52 or 48 or something 15:52:21 52 bits gives you 4 exabytes, if my SI prefixes are correct 15:52:30 this system can also 'only' translate 48 bits of virtual addres space 15:52:41 also the 48th bit is always sign extended 15:52:43 4 mega gigabytes 15:53:03 so you get the bottom 2 mega gigabytes, and the top 2 mege gigabytes of a 64-bit address space 15:53:09 and the space in the middle is unusable 15:53:27 which I think the other 64-bit cpus do as well 15:53:49 bah, the address decoding logic can handle that 15:53:53 makes sense, in the traditional 'stick the kernel up top and user space at bottom' 15:54:19 actually it's not sign extended, it has to be sign extended I think 15:54:36 heh, according to the datatypes page on sandpile, the x86-64 uses 1s complement integers :) 15:54:37 ie, a pointer has to have bit 47-63 all 1's or 0's 15:55:21 heh, bug in the page I guess 15:55:41 "Hey! If I toggle the sign bit, the number goes positive, but it goes really big!" 15:56:00 where does it say one's compliment? 15:56:13 it doesn't, but it implies it 15:56:23 it gives signed integers separate sign and value bits 15:56:28 well, the sign bit pretty much applies for one and twos 15:56:36 I think people understand what that really means. :) 15:57:10 effectively if the top bit is set it's negative 15:57:18 it's just how the rest of the word is interpreted 15:57:25 yes 15:57:48 ah, I get canonical addresses 15:58:07 make sense? that's pretty much the same for other 64-bit cpus if I recall correctly 15:58:09 it lets you put the kernel (or the user) at the top regardless of the address space of the processor 15:58:17 right 15:59:26 --- quit: trash ("leaving") 15:59:32 anyway, I'm sure they have a pdf of the manual you can get somewhere 15:59:40 and I only got volume 1 and 2 15:59:47 3 is the instruction set reference 15:59:58 I might search some more on the AMD site 16:00:50 well, to work for me 16:01:11 now that my console supports vt100, I'm gonna write a quick and dirty terminal lib and do an irc app 16:01:20 speaking of which... 16:01:26 I got my consoled working 16:01:46 programs talk to the console server over pipes 16:01:56 before, everything was implemented in kernel mode 16:02:25 oh wow, looks like we did the same design 16:02:45 heh 16:02:47 I did a little tty implementation, but it's all pseudo-ttys 16:03:03 so the consoled just opens the keyboard and the master end of the tty and moves data back and forth 16:03:07 the reason I didn't do this sooner was because I apparently had a really stupid bug in the kernel 16:03:20 it wasn't switching CR3 properly (!) when delivering kernel APCs 16:03:21 then I changed the keyboard driver to spit out keyboard-neutral codes 16:03:30 and consoled does the keymap stuff 16:03:32 that's exactly what mine does 16:03:51 the keyboard driver puts out 32-bit codes, with Unicode + special keys + flags 16:03:57 --- quit: Kurt ("Connection reset by queer") 16:04:01 and the consoled relays it to the pipe for the current console 16:04:01 a contributor whom I trust a lot is gonna rewirite it again to move more functionality into consoled 16:04:13 by making the console driver super stupid 16:04:15 good 16:04:29 is this the Kees J. Bot of the newos world? :) 16:04:35 bah... it's too late for this 16:04:37 and support a set of stateless commands 16:04:40 I've started making Tanenbaum jokes 16:04:59 so e.g. the escape code handling goes into user mode? 16:05:10 that way I can do multiple virtual consoles easily and have their state stored in consoled 16:05:10 yes 16:05:36 newos and Mobius sound quite similar underneath 16:05:41 for example, I was thinking of making the stream you feed the console drivers be x,y,attr,char 16:05:44 it would be good to eventually support each others' drivers and programs 16:06:05 I was thinking of having consoled talk to the video driver, and put text-mode support into the video driver 16:06:07 and maybe a few ioctls to do stuff like scroll a region of the console (so it can use some hardware features) 16:06:38 hmm 16:07:13 hmm, maybe I should make my consoled graphical and use the video card for scrolling 16:07:28 bah -- VESA has no effective acceleration support so it would only work on my S3 card 16:11:37 Rico: you might want to set the From: name and address in your newsreader :p 16:15:23 I did, after I read my own post :) 16:16:02 anyway, I still say the only way to handle ring 0 stack problems is to install a separate double fault handler which uses a different stack 16:16:25 yes, that's what I read when I googled aod. 16:16:28 neither Linux nor NT handle this automatically 16:16:44 afaik on either of those, a stack overflow in kernel mode is a blue screen or a panic 16:17:07 but read the KOS page -- apparently they handle it, and you can grow the ring 0 stack like you can a ring 3 stack 16:17:19 too bad hardware can't handle it good enough :( 16:17:34 http://kos.enix.org/ 16:17:34 ...interesting 16:17:44 what they say is: 16:17:58 you always get a #DF from an unmapped stack page in ring 0 -- that is a fact of life 16:18:08 ideally, you could grow the stack in the #DF handler and continue 16:18:32 but the Intel manuals say that #DF is an abort, meaning that you can't resume from it -- the previous state of the CPU is undefined 16:18:35 but the problem is you have to have at least a stack to take the #DF 16:18:41 but they did some experiments, and it works 16:18:54 geist: ok, so you have a small permanently-resident stack for the #DF handler 16:19:09 make #DF a task gate, to a different TSS 16:19:15 oh interesting 16:19:18 didn't think about that 16:19:30 that's what I do, but I just print a message and halt the kernel 16:19:41 x64-64 would let you do it directly I guess, since you could have a different stack for it directly 16:19:46 I commit 2 kernel pages per thread with a guard page between stacks 16:20:03 yeah I need to do that 16:20:06 yes, but it would still handle it via #DF 16:20:26 one of the things I want to change is have a concept of uncommitted areas in a region 16:20:34 in which case I can create a region of say 4 pages 16:20:36 ah, it's good 16:20:40 and only commit the middle two 16:20:59 currently, if an app makes an allocation, all the physical memory is allocated at once? 16:21:15 not allocated, but committed 16:21:27 ie, it subtracts from the total amount of virtual memory available 16:21:44 are you implementing working sets? 16:21:55 that guarantees that it can satisfy any future page 16:21:58 yes 16:22:03 neat 16:22:17 total virtual memory == physical memory + swap space 16:22:36 so the total_commit var starts off equalling that value 16:22:42 hmm 16:22:43 what's a nice translator to translate the "Dynamically expandable CPL0 stacks in KOS" doc? 16:23:06 Rico: babelfish.altavista.net 16:23:09 btw, what's the URL to that page? 16:23:10 and when you want to commit some memory (which currently happens when you create a new region with backing store that is virtual memory), it subtracts from the total_commit 16:23:23 http://kos.enix.org/~d2/snapshots/kos_current/doc/kstack-html/ 16:23:36 ah, I was looking in the wrong bit 16:24:11 I have a l33t Google toolbar with a Translate option :) 16:24:20 the google toolbar rules 16:24:26 except it translates 'stacks' to 'piles' 16:24:31 the google toolbar does, indeed, rule 16:24:38 weird, when I try babelfish, it just shows an empty page... 16:24:43 This document explains the choice of implementation of piles CPL0 (level kernel). 16:24:47 This document aims to explain the choice carried out, in the teaching optics of KOS. 16:25:11 Rico: me too, but http://babelfish.altavista.com/translate.dyn seems to work 16:25:36 oh, I have it already, maybe it was a bit slow 16:26:02 --- quit: sliv3r ("My damn controlling terminal disappeared!") 16:26:09 brb 16:26:12 --- quit: pavlovski ("reconnecting") 16:26:54 bah 16:27:18 --- join: pavlovski (TimRobinso@modem-1255.ballistic.dialup.pol.co.uk) joined #osdev 16:29:16 lol: Butt this document... 16:29:24 at the bottom of the doc :) 16:30:09 --- join: Javanx (~javanx@213.45.18.185) joined #osdev 16:30:18 huh... it says "butt" 16:31:26 "Thus, the passage of a pointer towards a cpu_context_t does not have any more any smell" 16:31:34 pav: when I would run ring 0 only, I know that a stack interrupt will in return a double fault, cause it can't save the data on the stack for the stack interrupt. so when I run ring 0 only, it's logical to make the stack interrupt a task gate itself, right? 16:32:00 the stack fault doesn't get used in flat model 16:32:09 not? 16:32:18 the CPU issues a stack fault when something tries to go beyond the SS limit 16:32:27 but the SS limit, as with everything else, is 4GB 16:32:45 the CPU gives you a normal page fault if you try to access an unmapped stack page 16:33:05 oh yes, it's a page fault which is called.. 16:33:43 so the double fault is the only place to do some stuff about the ring 0 stack overflow. 16:33:48 geist: ever though of implementing structure exception handling in newos? 16:33:55 Rico: yes 16:35:19 damn! 16:37:56 that's fucked 16:41:55 --- join: geist99 (~geist@dsl-65-191-44-105.telocity.com) joined #osdev 16:42:00 --- nick: geist99 -> geist-mac 16:42:42 --- quit: geist () 16:42:48 --- nick: geist-mac -> geist 16:46:29 oh man 16:46:41 this irc app on macosx speaks 16:46:42 connetion problems? 16:46:56 heh, mIRC has an option for that :) 16:47:00 does it? 16:47:14 yeah, there's some integration with the Microsoft Agent DLLs 16:47:18 * pavlovski uses xchat now 16:47:21 oh 16:47:33 why xchat? 16:47:40 because mIRC was too annoying 16:47:44 I'm working on the first app for newos 16:47:48 and you can guess what it does 16:47:56 what's annoying about mirc? 16:47:58 :D 16:48:10 geist: pr0n viewer? 16:48:13 Rico: too many things don't work the way they should 16:48:30 oh, well, it works fine for me :) 16:48:40 Rico: that's the second app 16:48:50 geist: not even the first?!? 16:49:23 geist: ever though of implementing structure exception handling in newos? 16:49:37 maybe 16:49:44 haven't really thought about it much 16:49:59 *structured 16:50:41 --- join: c0degrrl (~mrng@CPE00a0c5e5b433.cpe.net.cable.rogers.com) joined #osdev 16:50:43 hi 16:51:16 hey c0degrrl 16:51:36 i hear this is a pretty active chan for osdev? 16:52:03 yeah, it's pretty active 16:52:18 if not OS discussion then something else :p 16:52:39 --- quit: Ubel () 16:52:59 quite a few of us are working on OS 16:53:08 I've just started with a friend 16:53:12 cool 16:53:23 c0degrrl: any web page yet? 16:53:34 no 16:53:58 we're working on design right now 16:54:09 --- join: bono (~bono@modemcable171.3-202-24.mtl.mc.videotron.ca) joined #osdev 16:54:14 * geist is a little curious if my current video card supports multiple monitors at the same time 16:54:18 and need a small framework to use to start developing from 16:54:22 it has dvi out and rgb out 16:54:37 maybe, but they'd probably show the same picture 16:54:52 I guess you'd know if you had a dual head card 16:54:56 you're probably right 16:55:10 however, having more than one monitor on the same PC is very cool 16:55:19 each with its own video card, that is 16:55:32 not necessarilly. my experience has been that windows doesn't show you the ui until a second monitor is plugged in 16:55:52 what does everyone develop under? 16:55:56 so the real question is does geforce3's support mutiple heads 16:56:16 geist: my S3 Trio isn't clever enough to tell Windows whether there's a monitor plugged in 16:56:20 c0degrrl: Windows 2000 16:56:23 it's great :) 16:56:32 what compiler? 16:56:33 c0degrrl: I do most of my dev under cygwin on winxp, but I also compile on freebsd and solaris a lot 16:56:47 --- quit: karingo (Read error: 113 (No route to host)) 16:56:48 I do all dev using gcc and make 16:56:52 does cygwin let you output flat binary files? 16:57:08 not directly 16:57:18 ld --oformat binary is broken 16:57:19 cygwin just lets you run the standard unix stuff 16:57:29 the tools let 16:57:37 the tools may or may not work right 16:57:49 emphasis on the "may not", IME 16:58:09 if he's using it it must work though? 16:58:18 I dont use raw binaries 16:58:19 ELF 16:58:35 I use PE 16:58:43 you can make PE look like flat binary if you set the options right 16:58:57 right, same thing with ELF 16:59:09 if you're careful, you can basically jump into an ELF binary and run it in-place 16:59:41 what's the easiest way to start off? 16:59:42 --- join: sleep- (~ivan@adsl-68-20-176-57.dsl.chcgil.ameritech.net) joined #osdev 17:00:01 use GRUB as a boot loader and link to ELF 17:00:11 that is, if you're developing on Linux 17:00:15 grub has never ever worked for me 17:00:19 i'm using Windows XP 17:00:27 GRUB saves you a lot of effort and time 17:00:37 but bootloaders are fun 17:00:42 writing them i mean 17:01:10 so is eating ice lollies, but lollies don't contribute to OS development 17:01:13 neither does writing a boot loader 17:01:16 hmm 17:01:18 i have gazos, but it requires linux to compile 17:01:34 i disagree 17:01:38 it's apparently possible to get Cygwin to compile/link to ELF, but it will take some persuading 17:01:40 its at just the right stage of development though, basically starts you off. i need something like that i can work with for windows 17:01:40 sometime you want reliability 17:01:45 where you dont want third party code 17:01:54 I argue the same point 17:02:06 why spend ages on boot loader code when you can get someone else to write and debug it for you? 17:02:12 ic 17:02:12 well 17:02:19 mine is not two stage 17:02:22 so its cooler :) 17:02:30 with GRUB you have the advantage of a lot of pre-written and pre-debugged code 17:02:34 as well as a lot of other features 17:02:35 sleep: depends on what you want to do 17:02:39 if you are a newbie to osdev 17:02:40 sleep-: ah, so it's three-stage? 17:02:46 starting with the bootloader is *not* a good idea 17:02:46 pav: no, one 17:02:51 most people get stuck on it 17:02:55 sleep-: how is one-stage cooler than three-stage? 17:03:03 s/three/two/ 17:03:05 pav: because its 512 bytes exactly 17:03:11 GRUB has never worked for me 17:03:22 i cant use that 17:03:23 sleep-: exactly 17:03:34 if you dont see my point, you wont understand 17:03:40 anwyay, I suggest grabbing a third party bootsector 17:03:40 you have only 512 bytes to do what every other boot loader does: load the kernel, switch to pmode and jump to it 17:03:51 sleep-: I do see your point, I've been there and learned from it 17:03:55 pav: no, i also checksum the kernel 17:04:02 whee! :) 17:04:05 ;) 17:04:11 why do you need more code than tha? 17:04:18 all the lame gfx and shit are useless 17:04:21 you can grab mine if you want. It loads the rest of the floppy at 0x100000 (1MB), switches into protected mode, and jumps into it 17:04:24 I've written one- and two-stage loaders, and after a lot of debugging, I realised I was only doing the same thing as GRUB, so I switched to using that 17:04:28 and it's been *far* more reliable 17:04:28 that's all you need to get started 17:04:42 with GRUB, I can boot from FAT, ext2 and network without any special effort 17:04:52 pav: but i dont have the will to audit grubs code 17:05:01 you shouldn't need to 17:05:02 pav: and I need total assurance of the reliability 17:05:04 i do 17:05:12 i must know every line of code 17:05:13 why should you need to audit it? 17:05:21 because i dont trust other developers 17:05:21 are you afraid of someone dropping a trojan into it? 17:05:26 c0degrrl: it has some additional functionality to switch into vesa mode, but you can ditch that 17:05:27 no 17:05:28 so do you trust the BIOS? 17:05:30 no 17:05:36 or do you talk to the hardware directly from your boot sector? 17:05:44 do you even trust the hardware? 17:05:45 i dont trust the bios 17:05:48 no 17:05:48 does anyone know of a really simple small os project you can compile under windows? 17:05:56 i use fault tolerance across a PCI backplane 17:06:01 because i dont trust the hardware either :) 17:06:16 sleep-: do you trust the laws of physics? 17:06:16 this shit has to be *reliable* 17:06:20 pav: no 17:06:30 pav: I just wanted to ask him that 17:06:31 but then again, neither do physicists :) 17:06:45 remember, your OS is running on a thin veneer of physics, which could slip and crash at any time :) 17:06:50 c0degrrl: hmm, well my project is not simple, so that doesn't really count. 17:06:59 codegrrl: there are a few out there. 17:06:59 something around the level of gazos 17:07:05 just think! unless you implement your own universe, your OS could be sucked into a black hole at any time 17:07:15 c0degrrl: mine compiles under Windows, but it's not simple 17:07:23 code: lots of viruses are small and good places to start learning assembly 17:07:25 sleep: yes, what if I come by and throw a bottle of beer over you cpu, I bet your os can't handle that!!! 17:07:32 c0degrrl: a lot of simple OSes compile using DJGPP though 17:07:33 which is DOS 17:07:45 sleep-: if you're a virus coder, get out of my channel! 17:07:49 i need something to compile and a bootsector too 17:07:49 rico: that's why i have multiple machines in fault tolerant configuration 17:07:51 sleep-: ok, so it's not my channel 17:07:56 pav: its not your channel 17:08:00 I know :) 17:08:03 pavlovski: I second that 17:08:09 ummm 17:08:09 there is *nothing* good in virus code 17:08:14 reading viruses is a good thing 17:08:14 coding viruses is *not* cool 17:08:19 virus is the *worst* possible code 17:08:23 coders must understand how systems are broken 17:08:28 and also 17:08:28 not because it's morally wrong (although it is) 17:08:32 there are lots of cool tricks in there 17:08:38 for checksum hiding and small size, etc 17:08:40 so the code is cool 17:08:42 but because virus coders as a rule do not write good code! 17:08:45 like that dude that came in here a while back talking about how he brought down someone elses web server 17:08:47 im not talking word macdro virus bullshit 17:08:51 they don't care if the code crashes the machine 17:08:54 old school COM viruses :) 17:09:10 --- nick: pavlovski -> pavlovskii 17:09:20 ii!!!! 17:09:33 Rico: it's the only nick ChanServ recognises :) 17:09:44 * pavlovskii is pavlovski's evil twin 17:09:58 c0degrrl: anyway, if you want to dev under windows, you'll probably have to install cygwin or djgpp 17:10:14 as far as I know, no one has compiled with visual C or anything like that 17:10:17 the tools aren't flexible enough 17:10:19 c0degrrl: right, DJGPP in the short term (because it works), Cygwin in the long term (because it's more capable) 17:10:30 but neither of those can export to a flat binary though, can they? 17:10:30 codegrrl: you should switch to linux if you want to do os development 17:10:35 or VC++ if you want a challenge 17:10:43 c0degrrl: DJGPP handles it nicely 17:10:56 DJGPP can do flat binary? 17:10:57 sleep-: and why should she switch to linux? 17:10:58 Cygwin ld should handle flat binary, but last time I checked, it would crash 17:11:02 c0degrrl: sure 17:11:14 but using a predefined format is good too 17:11:22 so she can use an os with real functionality 17:11:24 COFF is simple to parse 17:11:31 sleep-: explain 17:11:39 sleep-: you're going the right way for a kicking, unless you can back up your statements 17:11:42 you are a windows user? 17:11:48 listen, :) 17:11:55 this is what i said when i got in here 17:11:57 * pavlovskii uses w2k and Linux 17:11:59 i think the realization that windows time is nearly over 17:12:04 sleep-: you sure are being irritating today 17:12:07 is a good reason to start using linux or something else 17:12:08 ;) 17:12:10 geist: agreed 17:12:10 sorry 17:12:16 its [gazos] at just the right stage of development though, basically starts you off. i need something like that i can work with for windows 17:12:17 im just stating my oppinion 17:12:28 i think ms cant keep up with the open source movement 17:12:33 sigh 17:12:35 its not their fault, they just have less resources 17:12:42 but im a server engineer 17:12:44 c0degrrl: have you seen Cosmos 17:12:46 ? 17:12:50 so i probably have different priorities than you 17:12:52 no, whats that like? 17:12:55 c0degrrl: http://www.execpc.com/~geezer/ 17:13:07 anyway, to dev under windows, it takes a bit more work to get the standard unix toolchains set up 17:13:09 it's at the 'right' stage of development (probably better than GazOS) 17:13:12 and compiles under DJGPP 17:13:22 it's how I started :) 17:13:24 I had to build my own copies of gcc and binutils to get it to output ELF 17:13:31 geist: blurgh 17:13:41 Cygwin seems to support ELF by default now though 17:13:45 gcc is a pile of dung 17:13:52 sleep-: agreed :) 17:13:54 but that's okay, I also wanted to output elf for sh4 and ppc, etc 17:14:06 at least we agree on something :) 17:14:10 do you have a link to Cosmos? 17:14:19 i hate linux too, but its better than most other things :) 17:14:20 and I can be assured I have a single version that doesn't change core thing 17:14:20 c0degrrl: yep, the ~geezer link 17:14:30 c0degrrl: specifically, http://www.execpc.com/~geezer/os/ 17:14:42 thanks 17:14:44 I've had tons of problems supporting a wide variety of versions and builds of gcc 17:14:45 let me take a peek 17:14:52 so I patched gcc to produce -newos 17:15:00 and those all act exactly the same 17:15:09 ahh 17:15:14 and standardized on one version of it 17:15:20 its not using grub is it? 17:15:23 i can't use it, member? 17:15:29 older versions don't 17:15:30 why not? 17:15:35 in fact, Cosmos 7 runs from DOS 17:15:40 I dont use it, but I'm curious why you cant 17:15:59 geist: me too -- why doesn't GRUB work for you? 17:16:00 i tried to get it to work lots, no matter what it was always messed up it wouldn't work 17:16:18 guiness 17:16:27 pavlovskii: because I already had my stuff working before I ever discovered grub 17:16:31 I see no reason to change now 17:16:35 c0degrrl: "it wouldnt' work" isn't very helpful 17:17:10 I'll actually probably redo it eventually when I get into booting from hard drives with my filesystem 17:17:14 geist: what FS do you use on your disk images? 17:17:19 grub may be a choice 17:17:22 my own 17:17:27 thought so 17:17:28 geist: whats it like? 17:17:35 for now it's a simple back to back file system 17:17:45 that maps into memory later on 17:18:04 I'm working on a disk based fs, but I haven't put much work into it lately 17:18:10 same here 17:18:12 imo GRUB's best feature is the ability to load arbitrary files from anywhere in the file system 17:18:18 that, and netboot support 17:18:29 geist: a NewFS? 17:18:39 I dont want to design too much into using grub, since it's not portable across platforms 17:18:45 true 17:18:52 who has an old version of cosmos on them? :) 17:19:00 but if I can come up with something that is generic enough to work with grub and work with multiple platforms, I'll look at it 17:19:04 code: what do you need it for? 17:19:12 c0degrrl: Giese used to have old zips on his site, but I can't see them 17:19:20 but anyway, for now I'm still booting from floppies, and my current system works fine 17:19:21 I can dcc you Cosmos 7 if you can't find it 17:19:31 geist: EFI :) 17:19:35 since it basically just loads the floppy image into memory, which is a simple filesystem 17:19:39 or is that Intel-only? 17:19:41 later on, that gets mapped to /boot 17:19:52 EFI? 17:20:01 like a BIOS-64 17:20:05 also, for the most part I just do my own thing when it comes to developing newos 17:20:20 I dont really look around too much to see what else I can pull into it. I'm just hacking at it for fun 17:20:22 thats the right way to do it 17:20:39 geist: fair enough, it's not as if you've spent all your time on a boot loader and not got anywhere with the kernel :p 17:20:45 :) 17:20:56 it's basically more fun that way, but I dont necessarilly advocate that as a way for newbies to start 17:21:05 I've spent all mytime on the kernel and not got anywhere with the GUI 17:21:11 is geist the guy who made cosmos? 17:21:11 i started with the boot loader - and it took a looong time 17:21:24 c0degrrl: no, Cosmos was Chris Giese, who doesn't IRC 17:21:26 for the most part, I knew enough about how to design and build the system before I got started 17:21:36 ok, thanks 17:21:37 so doing something like writing a bootloader and getting the system up and running is pretty easy 17:21:48 geist 17:21:51 but if you dont know how to do it, it can totally get you stuck 17:21:54 what kind of kernel is it? 17:22:13 for the most part, if you have to go to an irc channel to ask how to boot, you probably dont know enough to do it yourself 17:22:13 I guess you knew how to talk to int 13h, and switch to protected mode, and what the A20 was, already 17:22:30 so I suggest using something premade and work on the real stuff 17:22:46 hey, PIC programming is real :P 17:22:47 c0degrrl: I'm working on newos 17:22:50 http://newos.sf.net/ 17:23:03 are we doing web site plugs? 17:23:04 sleep-: PIC programming? in the bootloader? 17:23:18 quick, get your plug in! 17:23:19 well yeah 17:23:31 whats a plug? 17:23:32 http://www.themoebius.org.uk/ 17:23:34 hrm, okay 17:23:37 did anyone get that? :) 17:24:11 hmm? 17:24:13 i have cosmos 9 :) 17:24:20 is that old enough to not use grub? 17:24:31 not sure 17:24:40 codegrrl: does the os require grub? 17:24:43 c0degrrl: look at newos if you want. I dont use grub, and I have a pretty generic bootloade ryou can steal if you want 17:24:43 I have cosmos8.zip, and I'm pretty sure that doesn't use grub 17:24:46 cant you load it some other way? 17:25:06 one of these days I'm going to write a Multiboot-compliant loader for DOS 17:25:13 so you can boot a GRUB kernel from the command line 17:25:14 codegrrl: what are you trying to do? 17:25:26 * geist goes to grab something to eat 17:25:37 I can't believe I'm sitting on my ass right now when it's a beautiful day out 17:25:38 what are you developing it under? 17:25:45 (newos) 17:25:57 I do most of my work on windows under cygwin 17:26:05 geist: it's starting to feel autumnal here, even though it's still sunny 17:26:06 but I also compile on freebsd, solaris, linux 17:26:10 and its portable to dreamcast? 17:26:23 yeah, I ported it to dreamcast once 17:26:33 thats cool 17:26:34 one of these days I'll finish the mac port 17:26:50 since then the port has broken, and I have to go back and fix it 17:26:58 do you host the compile on your os? 17:27:13 nah, getting gcc to work on your os is not trivial 17:27:17 ic 17:27:19 and it would't fit on the floppy. :) 17:27:24 :) 17:27:32 i'm not terribly interested in doing a full posix layer 17:27:32 SkyOS and Ozone managed it 17:27:34 im trying to get my mac to netboot somehow 17:27:34 ok, who has the oldest version of Cosmos? :) 17:27:40 is that possible? 17:27:44 sleep-: totally 17:27:45 I have 9 right now 17:27:50 geist: from it's ROM? 17:27:54 sleep-: is it a pci based mac? 17:27:55 I have 7 17:27:59 hang on.. 17:27:59 c0degrrl: you want dcc? 17:28:04 break into the openfirmware, it should let you netboot 17:28:10 I can boot my imac 17:28:15 its a powermac 7100/80 17:28:18 anything earlier then 7? 17:28:20 I have a ton of machines, and they can all netboot 17:28:27 can i stick a regular intel ethernet in there and PXE boot? 17:28:38 imac, ultrasparc, sgi indy, next slab, dec alpha 17:28:39 oc 17:28:40 ic 17:28:47 geist, are you doing newos alone? 17:28:50 yes 17:28:52 do you think I can set the ROM to always netboot unattended? 17:28:57 well, a few people have helped 17:29:05 geist, impressive 17:29:11 an old bud of mine did the user space loader 17:29:14 geist, congrats 17:29:19 and a few folks have contributed to various parts of the kernel 17:29:33 sleep-: it has to have openfirmware on it 17:29:39 my laptop rocks! 17:29:39 how do I tell? 17:29:40 that model may be too old 17:29:46 does it have pci slots inside? 17:29:47 * sleep- doesnt know shit about macs 17:30:07 checking... 17:30:09 also, I found some decent docs about how to netboot a mac on the netbsd page under the macppc port in the FAQ section 17:30:33 when they went to pci, they started using openfirmware based on sun's openfirmware 17:30:41 thanks for cosmos 7 17:30:42 :) 17:30:55 you can usually break into it by holding alt-symbol-O-F 17:30:58 c0degrrl: np :) 17:31:00 no 17:31:00 when it boots 17:31:01 good luck 17:31:11 sleep-: no pci? then it's too old. sorry 17:31:14 the bus connectors are not card edges at all 17:31:18 is that NuBUS? 17:31:21 I think so 17:31:21 bah... it's 0133 and I'm starting a graphical console 17:31:25 oh well 17:31:44 so PCI based macs are openfirmware, which can netboot?> 17:31:55 the first mac I ever owned I got about a year ago, am using it right now, and I got it explicitly so I can port newos to it 17:32:06 sleep-: pretty much 17:32:44 at the same time I picked up a bunch of machines of various architectures, with the idea to port newos to each of them 17:32:58 do you have an alpha? 17:33:02 after a bit of tinkering with that, I decided that my time would be better spent adding functionality to the system instead of porting it 17:33:11 working upwards instead of outwards 17:33:15 :) 17:33:17 yes I have an alpha 17:33:28 i want to get one before they stop making them 17:34:02 --- join: sbk_ (~kbs@dsl-65-184-98-221.telocity.com) joined #osdev 17:34:09 but I ported to the dreamcast early on, because it's very different from a pc, and it helped me flush out the architectural-independance layer I built into the system 17:34:37 one day I'll port it to a playstation2 17:34:53 is it easy to get specs on console platforms? 17:34:56 not really 17:35:12 the dreamcast was largely reverse engineered by a bunch of guys 17:35:34 sony pretty much gives you the full documentation for the ps2 if you get the linux kit (which you need to boot on it anyway) 17:36:05 get = buy? 17:36:11 yeah 17:36:23 --- quit: Javanx ("I don't feel a thing, and i stopped remembering. The days are just like moments tourned to hours") 17:37:23 well, I need to get some work done 17:37:36 I've been setting out to write an irc app for newos, and this channel is eating up too much of my time 17:37:43 hopefully I can get it done in a few hours 17:37:54 so you'll probably see me pop in occasionally testing it out 17:38:14 oh no 17:40:17 hey, you could join from NewOS and your Hiptop and the same time :D 17:40:23 yeah 17:40:32 or run a web server on the hiptop and browse from newos 17:40:47 oh that would be fucked 17:40:51 portable server 17:40:55 that is messed up 17:40:57 ex-*act*-ly 17:41:17 @_@ 17:41:24 have you actually looked at the COSMOS code? 17:41:30 nope 17:41:35 yes 17:41:46 ... 17:41:49 that is hard to look at 17:42:05 his coding style is weird, yes? 17:42:05 home-brew oses are not known for their clarity 17:42:10 yeah 17:42:23 except mine :D 17:42:25 he comments things like /* this */ where // would be easier 17:42:33 he's coding in C 17:42:36 well, that's pretty minor 17:42:38 it's c code 17:42:51 virtually all c compilers let you use // 17:42:56 it's part of c99 17:42:59 true 17:43:08 but emacs still defaults to /* */ 17:43:20 I always use /* */ in C code 17:43:25 I only use /* if it's gonna be multiline 17:43:35 or I want it to stand out a little more 17:43:50 well 17:43:51 .// for single line 17:43:57 ./* for multiline */ 17:44:00 i use /** for javadoc style comments 17:44:02 so i have to 17:44:03 .//## to stand out 17:44:15 it's all about the flow. I dont follow too many hard rules if it goes against the flow of a function or module 17:44:26 what's important is that it looks right in the given context 17:44:52 and having the comments tab aligned is nice too 17:44:56 its also important that the scripts can parse the comments :) 17:44:58 and the code lining up 17:45:12 i agree 17:45:23 i hate reading mixed style code 17:45:45 do what you like, as long as you're consistent 17:45:56 yes, and after working with other people's code, it's good to be able to switch styles 17:46:17 the general rule is to follow whatever the style is in the module you're in 17:46:20 im usually the guy who annoyingly tries to make everyone use my style ) 17:46:25 ;) 17:46:31 yes, that will tend to piss a lot of people off 17:46:37 well 17:46:39 ./* 11 is left Ctrl; 12 is left Shift; 14 is CapsLock */ 17:46:39 /* 10 */0, 0, 0, 0, 0, 'q', '1', KEY_F3, 17:46:39 /* 19 is left Alt */ 17:46:39 /* 18 */0, 0, 'z', 's', 'a', 'w', '2', KEY_F4, 17:46:39 /* 20 */0, 'c', 'x', 'd', 'e', '4', '3', KEY_F5, 17:46:39 /* 28 */0, ' ', 'v', 'f', 't', 'r', '5', KEY_F6, 17:46:39 i agree 17:46:41 /* 30 */0, 'n', 'b', 'h', 'g', 'y', '6', KEY_F7, 17:46:47 what the hell is that?! 17:46:48 it very much pisses me off 17:46:56 its a lookup table 17:47:02 for the keyboard 17:47:08 it looks horrible 17:47:13 okay 17:47:15 that's what C looks like 17:47:21 it may look ugly, but its fast :) 17:47:25 it's also more-or-less what C++ looks like 17:47:29 the tabs don't even line up when you look at it in an editor 17:47:35 @_@ 17:47:38 c0degrrl: it depends on your tab setting 17:47:46 c0degrrl: as much as it's fun to make fun of 'poor coding style' someone spent a lot of time on it 17:47:56 step back and realize that that's a working OS 17:48:23 i think i will clean it up though 17:48:24 c0degrrl: it looks fine on 8-character tabs 17:48:25 I think we get permission to diss something else *after* we've done something comperable . :) 17:48:41 geist: and a well-working OS 17:48:52 okay, this channel is officially spending too much of my time. If you want to ask me a question or chat, come to #newos 17:48:54 later 17:48:55 Cosmos is one of the few simple operating systems that supports paging properly 17:48:56 i've written enough code and been coding long enough to be able to critique code :) 17:49:03 --- part: geist left #osdev 17:49:05 --- quit: sbk_ ("Leaving") 17:49:14 hating bad code is a sign of a good developer 17:49:31 hating your own code six months later is a sign of an even better coder 17:49:38 so is being able to appreciate code that's not obviously good on first glance 17:49:52 no, that's just the sign of a bad memory :) 17:49:55 ;) 17:50:04 --- quit: tirloni ("trying newos floppy") 17:50:10 people should improve over time 17:50:19 yes 17:51:11 * sleep- leaves to write more painful pxe crap 17:51:12 --- quit: sleep- ("Leaving") 17:51:38 * pavlovskii leaves to sleep 17:51:43 --- quit: pavlovskii ("Client Exiting") 17:56:22 Is doing "cli" or "sti" different from manually setting the eflags register? 18:01:33 --- join: Kurt (~kmw@gc-nas-01-s201.cinergycom.net) joined #osdev 18:03:15 does grub load up elf images? (rather than the binary i am using now) 18:03:40 yup 18:03:46 * ctkrohn uses it to load elf kernels 18:04:27 good that will be better than binary 18:04:54 --- join: nbsp (g@ip68-14-60-55.no.no.cox.net) joined #osdev 18:06:32 mooo 18:06:34 ugh 18:06:39 thanks for the help 18:06:40 * indigo feels like a cow 18:06:54 probably back later ... lol 18:06:56 --- quit: c0degrrl () 18:08:34 gcc 3.3 looks good 18:09:30 What's due in gcc 3.3? 18:10:39 http://www.gnu.org/software/gcc/gcc-3.3/changes.html 18:10:59 its mostly cleaning up 18:11:43 in the linker script what is the OUTPUT_FORMAT that I can use to output elf? I have tried 'elf' and 'ELF' but both don't work 18:12:30 eg. ld: target elf not found 18:14:47 i found elf32-i386 works 18:14:53 (thanx to the newos script) 18:15:11 you need elf-somearch 18:15:15 try elf-i386 18:16:03 indigo: you are a cow 18:16:54 how can i type then? 18:19:47 hum 18:19:51 i think i'm crashing gdb... 18:19:57 Cannot find user-level thread for LWP 20803: generic error 18:20:12 grmph 18:20:33 --- quit: nbsp ("brb") 18:23:17 ack 18:25:44 how do you set a breakpoint at a memory location in gdb? 18:25:51 you'd think 'break' would do it... 18:25:58 but that expects a function tame 18:25:59 name 18:26:24 ahh... 18:26:25 * 18:26:28 of course.. 18:26:34 * indigo grumbles 18:27:30 * file waves to indigo 18:27:35 indigo: how's the Helio? 18:28:10 file: good, just as it was a week ago :) 18:29:10 indigo: sitting there collecting dust already? 18:29:15 --- join: geist-hiptop (~ircuser@199.106.69.194) joined #osdev 18:29:20 well, it's waiting for io 18:29:25 Oh damn I am lame 18:29:26 and io is waiting for gnomecanvasmm 18:29:32 geist-hiptop: I see the commercials and I want one... 18:29:42 Oh? 18:29:49 Commercials for hiptop? 18:29:53 yes 18:30:01 Wow 18:30:10 Didn't know they started em 18:30:11 not in Canada, on the US stations 18:30:20 Right 18:30:28 Catherine zeta jones I guess 18:30:35 I forget who's doing it... but it looked sweet 18:30:47 Yay 18:30:56 I'll never get one though 18:30:57 Anyway, waiting for the train 18:31:06 I just missed the last one 18:31:13 lol 18:31:46 Gonna head over to lower haight 18:32:00 geist-hiptop: how are you going through your work? wouldn't it go through the local provider... 18:32:26 ahuoehtns 18:32:28 ()#!@()*#() 18:32:30 We have a bunch of unlimited sims 18:32:40 ic 18:32:54 * file grabs one 18:33:49 I forget which apn im using, what ip address do you see? 18:33:53 O never mind 18:33:59 Train here 18:34:37 Bout to enter tunnel 18:34:41 k 18:34:42 ttyl 18:36:32 --- quit: geist-hiptop (Remote closed the connection) 18:37:35 --- join: geist-hiptop (~ircuser@199.106.69.194) joined #osdev 18:37:51 Out of tunnel 18:37:56 wb 18:38:09 after using elf32-i386 I get an error 13: unsupported executable format 18:38:44 geist-hiptop: what do people think when they see you with that? 18:38:48 geist-hiptop: do they say anything? 18:42:04 moo :( 18:42:07 * indigo goes to bed 18:42:10 indigo: goodnight 18:42:16 well, it's night 18:42:20 i don't know about the good part :) 18:43:41 uh oh 18:43:42 what happened? 18:46:41 Mmm pizza 18:46:52 * file is hungry again now 18:47:26 Escape from new york pizza 18:47:31 Its sooooo good 18:48:18 The girl behind te counter is pretty cute too 18:48:27 lol 18:48:51 Too bad I look like a total slob 18:49:04 oh well 18:50:06 Bunch of people outside look like they're stoned out of teir gourd 18:50:23 lol 18:50:56 Im in the middle of the birthplace of the hippies in the 60's 18:51:07 Pretty counter culture 18:51:13 uh huh 18:51:18 This 5 or 6 block strip 18:51:30 stop making me want a hiptop... 18:52:05 Dude I want you to wwant a hiptop 18:52:18 but I can't get one 18:52:38 it's against the law... 18:52:46 Ask your parents or legal guardian 18:52:51 Against the law? 18:53:00 I can't sign the contract... and my mom won't 18:53:05 plus I don't have the $$$ right now :p 18:53:13 and Rogers AT&T charges too much for GPRS 18:53:55 --- join: nbsp (g@ip68-14-60-55.no.no.cox.net) joined #osdev 18:55:45 Now im over near the golden gate park 18:56:07 I'm going to buy a TiVo I think... 19:00:36 --- join: Zn4k (~zn4k@cs243169-153.jam.rr.com) joined #osdev 19:03:47 --- quit: Kurt ("Connection reset by ear") 19:09:24 --- join: jbreker (~jbreker@HSE-Ottawa-ppp236719.sympatico.ca) joined #osdev 19:10:27 Damn I love this city 19:12:11 heh 19:12:14 what city+ 19:13:43 San francisco 19:17:38 Ive never been 19:17:40 wanted to go though 19:17:56 how do you guys output your kernel so that grub can load it up? 19:18:31 binary probally ;) 19:18:45 --- quit: nbsp ("brb") 19:18:47 grub is supposted to be able to load up elf, but i haven't been able to get it to 19:22:20 anyone know how to convince iptables to allow ftp through? 19:23:45 jdrake: do you have a multiboot header? thats about the easiest way to get it to boot. 19:24:16 --- part: Zn4k left #osdev 19:24:32 --- join: adu (~andrew@dsl-64-130-166-225.telocity.com) joined #osdev 19:25:13 jbreker, how do I add a multiboot header 19:26:42 --- join: nbsp (g@ip68-14-60-55.no.no.cox.net) joined #osdev 19:26:53 somebody on usenet just told me the header to put on, and said to put it before '.text', but I am not sure how to actually do that in the linker script 19:28:21 jdrake: this is my nasm code global start 19:28:21 extern cmain 19:28:21 ; start multiboot header 19:28:21 align 4 19:28:21 dd 0x1badb002 ; mb header magic 19:28:22 dd 0x00000003 ; mb header flags 19:28:24 dd -(0x1badb005) ; checksum if i remember correctly 19:28:26 ; end multiboot header 19:28:28 start: 19:28:30 call cmain ; calling the main C function 19:28:49 jbreker: you can put it as the first thing in .text, it will work 19:29:02 eks: I've got myself a TiVo 19:29:14 eks, is there a way to put this in the linker script? 19:29:37 jdrake: probably, but I'm not enough of a linker script master to know ^-^ 19:29:41 --- quit: geist-hiptop (Remote closed the connection) 19:31:12 * file is happy 19:40:56 my kernel went from around 700 bytes to 8k after putting it into elf 19:43:17 --- join: ChillySpy (ChillySpy@ppp114.ppp3.cleveland.nccw.net) joined #osdev 19:43:45 laksdjfl;sakjdfla;dkfja;sldkfj 19:44:17 how do you calculate the checksum value? 19:45:21 jdrake: -(header magic + header flags) dont ask me what the -() does to it i know nothing of assembly :) 19:45:57 it makes it so 0 = checkum - (headermagic + header flags) 19:48:30 i get an 'error while parsing number' 19:50:07 i think it works now 19:50:47 hi 19:50:54 hi 19:57:08 hi 20:02:00 i have a lump on my ear 20:02:03 --- quit: adu () 20:06:18 after using GRUB now - I seemingly can access my global variable, but I still can't setup my own gdt yet 20:09:58 --- quit: ChillySpy () 20:30:02 --- quit: acme (Read error: 54 (Connection reset by peer)) 20:32:44 whats irq stand for? 20:33:33 Interrupt Request... something 20:33:57 it is simply an interrupt request 20:34:18 that's why I couldn't remember the Q! 20:38:12 --- join: EtherNet (~Under@lu9dcn.ampr.org) joined #osdev 20:38:57 --- mode: ChanServ set +o EtherNet 20:40:10 --- topic: set to 'Operating System DEVelopment www.osdev.org || links: qzx.com/lib , onee-san.net , www.osdev.com.ar (Under Construction) || stats/people: bespin.org/~qz/irc || http://www.osjournal.hopto.org || NRA is getting a bad rap from holywood because hollywood is run by the FAGS' by EtherNet 20:40:16 --- mode: EtherNet set -o EtherNet 21:02:37 --- part: jbreker left #osdev 21:02:38 --- quit: Spindle (Read error: 104 (Connection reset by peer)) 21:22:26 --- part: EtherNet left #osdev 21:39:37 --- join: foofoo (~ubu@cpe-24-221-255-164.ut.sprintbbd.net) joined #osdev 21:59:53 --- quit: _Bradd_ () 22:01:13 --- quit: bono ("leaving") 22:05:02 --- quit: gpf|venus ("Client Exiting") 22:37:30 --- join: gpf|venus (~ben@h0020af25039b.ne.client2.attbi.com) joined #osdev 22:48:48 --- quit: gpf|venus ("Client Exiting") 22:48:59 --- join: gpf|venus (~ben@h0020af25039b.ne.client2.attbi.com) joined #osdev 22:51:11 --- part: foofoo left #osdev 23:03:03 --- join: mrniceguy (~mrng@CPE00a0c5e5b433.cpe.net.cable.rogers.com) joined #osdev 23:03:27 --- part: mrniceguy left #osdev 23:07:05 --- join: trans (~trans@fatwire-201-121.uniserve.ca) joined #osdev 23:16:08 --- quit: muzzy (Read error: 104 (Connection reset by peer)) 23:16:13 --- join: WC-muzzy (muzzy@wc.pp.htv.fi) joined #osdev 23:19:18 fux0rs!!! 23:27:39 --- nick: WC-muzzy -> muzzy 23:50:56 --- quit: jdrake () 23:58:02 DROP tcp -- 12-254-48-152.client.attbi.com anywhere tcp dpt:http 23:58:30 why doesnt that block that host? 23:59:59 --- log: ended osdev/02.09.01