{"id":807,"date":"2020-12-06T18:13:00","date_gmt":"2020-12-06T18:13:00","guid":{"rendered":"https:\/\/www.ecsdump.net\/?page_id=807"},"modified":"2020-12-06T18:13:00","modified_gmt":"2020-12-06T18:13:00","slug":"miscldrnotes2","status":"publish","type":"page","link":"https:\/\/www.ecsdump.net\/?page_id=807","title":{"rendered":"MiscLdrNotes2"},"content":{"rendered":"<p><a class=\"ext\" href=\"http:\/\/mirror.href.com\/thestarman\/asm\/debug\/Segments.html\">Removing the Mystery from SEGMENT : OFFSET Addressing<\/a><\/p>\n<p>Things to do:<\/p>\n<p>1. Get freeLDR compiling and working with OW<br \/>\n2. Find out how much room I have between 0001:0000 and the start of microFSD.<br \/>\n3. Disassemble os2boot \u2013 how does it load os2ldr? Can I have more segments?<br \/>\n4. Could a new loader be compiled like a device driver (dll)?<\/p>\n<p>To reduce effort:<br \/>\n1. Use free source from linux<br \/>\n2. Not code for FAT boot<br \/>\n3. No RIPL source<br \/>\n4. i686 (and compatable) and newer \u2013 586 and older are out of luck<\/p>\n<p>0x00000000 \u2013 0x000003FF : Real mode interrupt vector table<br \/>\n0x00000400 \u2013 0x000004FF : BIOS data area<br \/>\n0x00000500 \u2013 0x00007BFF : Unused<br \/>\n0x00007C00 \u2013 0x00007DFF : Floppy boot sector is loaded in here<br \/>\n0x00007E00 \u2013 0x0009FFFF : Unused<br \/>\n0x000A0000 \u2013 0x000BFFFF : Video RAM video memory<br \/>\n0x000B0000 \u2013 0x000B7777 : Monochrome video memory (multiple pages)<br \/>\n0x000B8000 \u2013 0x000BFFFF : Color video memory (multiple pages)<br \/>\n0x000C0000 \u2013 0x000C7FFF : Video ROM video BIOS<br \/>\n0x000C8000 \u2013 0x000EFFFF : BIOS shadow area<br \/>\n0x000F0000 \u2013 0x000FFFFF : System BIOS<\/p>\n<p><a class=\"ext\" href=\"http:\/\/en.wikipedia.org\/wiki\/BIOS_interrupt_call\">http:\/\/en.wikipedia.org\/wiki\/BIOS_interrupt_call<\/a><\/p>\n<p><a class=\"ext\" href=\"http:\/\/mirror.href.com\/thestarman\/asm\/index.html\">http:\/\/mirror.href.com\/thestarman\/asm\/index.html<\/a><br \/>\n<a class=\"ext\" href=\"http:\/\/www.osdev.org\/osfaq2\/index.php\/InterruptsForDummies\">http:\/\/www.osdev.org\/osfaq2\/index.php\/InterruptsForDummies<\/a><\/p>\n<p><a class=\"ext\" href=\"http:\/\/my.execpc.com\/CE\/AC\/geezer\/osd\/boot\/\">http:\/\/my.execpc.com\/CE\/AC\/geezer\/osd\/boot\/<\/a><\/p>\n<p><a class=\"ext\" href=\"http:\/\/bioscentral.com\/\">http:\/\/bioscentral.com\/<\/a><br \/>\n<a class=\"ext\" href=\"http:\/\/perso.orange.fr\/pierrelib\/handbooks\/\">http:\/\/perso.orange.fr\/pierrelib\/handbooks\/<\/a><\/p>\n<p><a class=\"ext\" href=\"http:\/\/my.execpc.com\/~geezer\/osd\/ram\/index.htm#layout\">http:\/\/my.execpc.com\/~geezer\/osd\/ram\/index.htm#layout<\/a><\/p>\n<p>I don\u2019t remember where I found the following stuff:<\/p>\n<p>OS\/2 does care about the CPU (definitely) and the MB (to a lesser degree).<\/p>\n<p>a) The OS2LDR contains code to detect the CPU type rather precisely, and the OS2KRNL has some critical code in multiple versions for 386, 486 and P5 versions (such as copy routines).<\/p>\n<p>b) OS2LDR apparently has to switch the CPU into protected mode, and therefore must enable the A20 line. Like himem.sys (R.I.P.), the loader appears to use different methods for switching, corresponding to the mess with the A20 gate in former MB versions. OS2LDR also identifies the amount of memory available, and does this by trying out several BIOS interrupts. The function \u201cenable OS\/2 RAM &gt;16MB\u201d which is present in several BIOS versions is a clear sign that OS\/2 uses certain computer-specific properties.<\/p>\n<p>IBMINT13.I13 is a proof that even a running OS\/2 may, under certain circumstances use BIOS features.<\/p>\n<p>GENGRADD is a proof that OS\/2 still uses the Video VESA BIOS to switch certain \u201creluctant\u201d video cards into graphics mode (this does not mean that all GRADD graphics is done through the BIOS).<\/p>\n<p>The first boot disk contains several BIOS replacement versions to work around bugs in old PS\/2 BIOS code. But this is IMK only to get the system installed, because the installation uses much more BIOS services than the later running system (the running system has already a boot loader and a working mini-FSD on disk which will pretty fast take over control), so basically the only relevant services needed are INT13 services to get the whole IPL done.<\/p>\n<p>OK, &gt;2gb dumps. First of all, with exactly 2gb installed, you can probably<br \/>\nuse the standard stuff, since<br \/>\nmost systems take some memory off the top for shadowing. That said, I just<br \/>\nuploaded dumpfs.zip to testcase.<\/p>\n<p>Summary:<\/p>\n<ul>\n<li>\n<ul>\n<li>put udumpfs.* in \\os2\\dll, dumpfs.* in \\os2\\boot, and replace<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\\os2dump with \\os2dump.hd<\/p>\n<ul>\n<li>\n<ul>\n<li>Add IFS=DUMPFS.IFS to config.sys.<\/li>\n<li>Create a partition with LVM or whatever. LVM is such a terrible<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>utility that the best I can suggest is use<\/p>\n<div class=\"indent\">\n<div class=\"indent\">\u201ccreate a partition that can be made bootable\u201d and then delete it<\/div>\n<\/div>\n<p>from boot manager (if installed).<\/p>\n<div class=\"indent\">\n<div class=\"indent\">Make sure the partition is at least as large as your phyiscal RAM<\/div>\n<\/div>\n<p>size.<\/p>\n<ul>\n<li>\n<ul>\n<li>Format x: \/fs:dumpfs (x: is whatever)<\/li>\n<li>add TRAPDUMP=X:,R0 (or whatever) to point the dump at the right<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>drive.<br \/>\nThat ought to do it. Note that I was too lazy to add EA support to the IFS,<br \/>\nso the workplace shell gets upset if you try to<br \/>\nlook at the drive with a drives object. Use a command prompt or PMDF or<br \/>\nwhatever to get to the dump.<\/p>\n<p>This is beta (at best) software. I am almost certain that there is still a problem with dumpfs trapping with some configuration of partitions. I will listen to sensible and not too time-consuming suggestions and will accept bug reports (though I make no particular guarantee about response time).<\/p>\n<ul>\n<li>\n<ul>\n<li>Scott<\/li>\n<li><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Removing the Mystery from SEGMENT : OFFSET Addressing Things to do: 1. Get freeLDR compiling and working with OW 2. Find out how much room I have between 0001:0000 and the start of microFSD. 3. Disassemble os2boot \u2013 how does it load os2ldr? Can I have more segments? 4. Could a new loader be compiled&hellip;<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/www.ecsdump.net\/?page_id=807\" title=\"Continue reading &lsquo;MiscLdrNotes2&rsquo;\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/full-width.php","meta":{"footnotes":""},"categories":[],"tags":[],"wf_page_folders":[80],"class_list":["post-807","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=807"}],"version-history":[{"count":0,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=\/wp\/v2\/pages\/807\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=807"},{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/www.ecsdump.net\/index.php?rest_route=%2Fwp%2Fv2%2Fwf_page_folders&post=807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}