flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > The REAL OS construction contest Goto page Previous 1, 2, 3, 4, 5, 6, 7 Next |
Author |
|
bitRAKE 03 Mar 2009, 16:20
PIO will work with USB, HD, network, etc... Seems the broadest supported non-BIOS method (down with the floppies already). I've tested it on a few machines and it worked well. (*BIOS does intercept the port accesses to support emulation, but not in all cases. So, in some cases I think this solution doesn't comply with the rules, but in other cases it does -- I assume this is okay?)
|
|||
03 Mar 2009, 16:20 |
|
LocoDelAssembly 03 Mar 2009, 17:04
Quote:
Maybe this is a chipset feature? Was the V86 flag on? |
|||
03 Mar 2009, 17:04 |
|
edfed 03 Mar 2009, 17:57
OK for no bios INT13h, but at least, does somebody have a ready to use driver non destructive?
it would be interresting to share a common driver for beginners like me. |
|||
03 Mar 2009, 17:57 |
|
bitRAKE 04 Mar 2009, 02:56
LocoDelAssembly wrote:
_________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
04 Mar 2009, 02:56 |
|
revolution 04 Mar 2009, 03:13
bitRAKE wrote: PIO will work with USB, HD, network, etc... Seems the broadest supported non-BIOS method (down with the floppies already). I've tested it on a few machines and it worked well. (*BIOS does intercept the port accesses to support emulation, but not in all cases. So, in some cases I think this solution doesn't comply with the rules, but in other cases it does -- I assume this is okay?) |
|||
04 Mar 2009, 03:13 |
|
LocoDelAssembly 04 Mar 2009, 03:35
Quote:
Yes I was thinking the mechanism could be something around that, but still the BIOS doesn't intercept the I/O but handles it when the chipset calls the BIOS through SMM. revolution, but trying to switch to protected mode from V86 doesn't generate an exception? The BIOS could take that opportunity to end emulation and then complete the protected mode transition the boot loader was wanting to do. |
|||
04 Mar 2009, 03:35 |
|
revolution 04 Mar 2009, 03:42
LocoDelAssembly: But before entering protected mode the code needs to setup other things like GDT which will cause an exception. The BIOS might be able to catch all cases and emulate until the final write to CR0/MSW but it would be very tricky to implement.
All: So if your hardware is using the SMM mechanism to trap your I/O port access then so be it. If the hardware is so determined to emulate everything for you then I won't stop you from using that "feature". But I wonder what would happen in protected mode if you forget (or don't know how) to turn off the SMM interception? And remember that if your code fails to work on other testers PCs then you won't get many votes! |
|||
04 Mar 2009, 03:42 |
|
sinsi 04 Mar 2009, 04:02
I always thought that the BIOS will emulate this only via INTs (e.g. sata,usb keyboard) but direct i/o bypasses all of this, hence the need for pm drivers.
|
|||
04 Mar 2009, 04:02 |
|
bitRAKE 04 Mar 2009, 05:30
The controller hub converts the port access into an SMI (system management interrupt) - this is the way modern PC's boot off USB and is quite common. Protected mode does not interfere with SMM mode.
Quote: By design, the OS cannot override or disable SMIs. |
|||
04 Mar 2009, 05:30 |
|
revolution 04 Mar 2009, 05:43
bitRAKE wrote: The controller hub converts the port access into an SMI (system management interrupt) - this is the way modern PC's boot off USB and is quite common. Protected mode does not interfere with SMM mode. |
|||
04 Mar 2009, 05:43 |
|
bitRAKE 04 Mar 2009, 05:57
revolution wrote: If want to access my USB port in high-speed mode then I don't want a SMM interrupt watching everything I am doing. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup Last edited by bitRAKE on 04 Mar 2009, 06:04; edited 1 time in total |
|||
04 Mar 2009, 05:57 |
|
revolution 04 Mar 2009, 06:03
When I want to access the normal HDD (not the USB anymore) I have to tell the hardware that I need emulation turned off.
But actually, I thought what sinsi said was correct. That emulation is only for INT 13 access. bitRAKE: Do you have a reference for this behaviour of port emulation by SMM drivers? |
|||
04 Mar 2009, 06:03 |
|
sinsi 04 Mar 2009, 06:17
So if I enable "legacy" mode in the BIOS for my USB mouse, the BIOS goes into SMM and redirects I/O to port 60/64 to the correct USB port? And if I tell windows that I have a PS/2 mouse, the driver will trigger a SMI which the BIOS handles (even in windows' pmode)?
Can we split this thread, since it's a bit off-topic and I am finding this bit interesting (the intel manuals are a bit dry...) |
|||
04 Mar 2009, 06:17 |
|
bitRAKE 04 Mar 2009, 06:30
5.16.7.3 and 5.18.8 of the ICH9 manual (page 200 and 214, respectively) is what I'm currently reading, but it is quite common. The north bridge documentation has more on general SMI generation and SMM configuration. In the case of my hardware drivers access through the memory mapped addresses and have little need for port access - which are converted to memory accesses by the north bridge anyhow.
sinsi, absolutely, but a chipset driver might disable the legacy support. |
|||
04 Mar 2009, 06:30 |
|
sinsi 04 Mar 2009, 06:42
bitRAKE wrote: sinsi, absolutely, but a chipset driver might disable the legacy support. Quote: By design, the OS cannot override or disable SMIs. |
|||
04 Mar 2009, 06:42 |
|
bitRAKE 04 Mar 2009, 06:51
sinsi wrote:
That quote was from the Wikipedia article on SMM. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
04 Mar 2009, 06:51 |
|
sinsi 04 Mar 2009, 07:10
So that is basically a way to disable the SMI (as far as sata is concerned)?
Code: mov eax,wiki add eax,NaCl |
|||
04 Mar 2009, 07:10 |
|
bitRAKE 04 Mar 2009, 07:21
and byte [PCIE_BASE + ATC_APM],-16 ...should do it. Then reset the USB. |
|||
04 Mar 2009, 07:21 |
|
sinsi 04 Mar 2009, 07:24
bitRAKE wrote:
Ouch |
|||
04 Mar 2009, 07:24 |
|
Goto page Previous 1, 2, 3, 4, 5, 6, 7 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.