Date: Tue, 24 Jul 2001 16:45:11 -0500 From: Bob Van Valzah <Bob@Talarian.Com> To: John Baldwin <jhb@FreeBSD.org> Cc: FreeBSD-Mobile@FreeBSD.org, Doug Ambrisko <ambrisko@ambrisko.com> Subject: Re: ThinkPad 600X: Can't work out which disk we are booting from Message-ID: <3B5DEC67.3060204@Talarian.Com> References: <XFMail.010724143824.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--------------050104030700090006040405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ok, that's kind of what I thought. So how about from the "top down"? I don't know what sort of pseudo ops and expression evaluation this assembler has, but I remember once doing an expression that'd find the first address past the end of a block and then subtracting the size of the jmp so I could .org up there leaving a variable-sized gap at the end. That sort of thing might work unless you're right up against the wall on space. But I can also see where it might be tricky to detect a block overflow with this kind of scheme. Bob John Baldwin wrote: >On 24-Jul-01 Bob Van Valzah wrote: > >>Doug, Glad you're aware of the problem and have already formulated a fix. >> >>John, I agree that the header file approach might be cleaner. >> >>But here's another idea: Could the "jmp main" at the start of boot1.s be >>followed immediately by a "jmp xread"? This'd create a sort of entry >>point table at the start of boot1 that could be used by boot2 without >>fear of things moving around. But I have to say that I haven't written >>any substantial amounts of assembler since the 8080 days (dating myself >>there) and I've never looked at the x86 boot sequence, so I may be way >>out of my league with this suggestion. >> > >Unfortunately, the BPB needs to be at a fixed offset and there isn't sufficient >room for another jmp at offset 0x4. > > --------------050104030700090006040405 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <html> <head> </head> <body> Ok, that's kind of what I thought.<br> <br> So how about from the "top down"? I don't know what sort of pseudo ops and expression evaluation this assembler has, but I remember once doing an expression that'd find the first address past the end of a block and then subtracting the size of the jmp so I could .org up there leaving a variable-sized gap at the end. That sort of thing might work unless you're right up against the wall on space.<br> <br> But I can also see where it might be tricky to detect a block overflow with this kind of scheme.<br> <br> Bob<br> <br> John Baldwin wrote:<br> <blockquote type="cite" cite="mid:XFMail.010724143824.jhb@FreeBSD.org"> <pre wrap="">On 24-Jul-01 Bob Van Valzah wrote:<br></pre> <blockquote type="cite"> <pre wrap="">Doug, Glad you're aware of the problem and have already formulated a fix.<br><br>John, I agree that the header file approach might be cleaner.<br><br>But here's another idea: Could the "jmp main" at the start of boot1.s be <br>followed immediately by a "jmp xread"? This'd create a sort of entry <br>point table at the start of boot1 that could be used by boot2 without <br>fear of things moving around. But I have to say that I haven't written <br>any substantial amounts of assembler since the 8080 days (dating myself <br>there) and I've never looked at the x86 boot sequence, so I may be way <br>out of my league with this suggestion.<br></pre> </blockquote> <pre wrap=""><!----><br>Unfortunately, the BPB needs to be at a fixed offset and there isn't sufficient<br>room for another jmp at offset 0x4.<br> <br></pre> </blockquote> <br> </body> </html> --------------050104030700090006040405-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B5DEC67.3060204>