is the hard disk type emulated by Bochs ATA (IDE) or SATA?
or they are just the same in the sense of accessing it from assembly?
and is it possible to access SATA using AHCI in Bochs?
hard disk in Bochs
hard disk in Bochs
I'm using AMD Sempron 140 Single core 2.7GHz
Re: hard disk in Bochs
i found in bochs config file for image:
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, translation=auto, path=......
this means bochs emulating ATA (IDE).
but any example in assembly of accessing ATA (without using interrupts)?
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, translation=auto, path=......
this means bochs emulating ATA (IDE).
but any example in assembly of accessing ATA (without using interrupts)?
I'm using AMD Sempron 140 Single core 2.7GHz
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: hard disk in Bochs
Please, search the wiki before posting on the forums. All your questions are answered on the wiki
Look up the ATA PIO article.
Look up the ATA PIO article.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: hard disk in Bochs
i typed "ata pio" into the search box of osdev wiki but none found,
luckily searching that phrase by google gives me the link to that "ATA PIO Mode"
tks thepowersgang
luckily searching that phrase by google gives me the link to that "ATA PIO Mode"
tks thepowersgang
I'm using AMD Sempron 140 Single core 2.7GHz
Re: hard disk in Bochs
Hi,
However, you wouldn't need to know unless you're ready to start writing a driver for the disk controller; and if you're ready to start writing a driver for the disk controller then you must've already done code to scan PCI buses and detect which PCI devices are present, which means your own software can tell you what sort of PCI device the disk controller is.
Note: If a computer (including Bochs if configured without the i440FX PCI chipset) doesn't support PCI at all, then you'd have to probe for old ISA devices during your "hardware auto-detection" phase. PCI was introduced a long time before SATA existed, so all SATA controllers use some sort of PCI bus, and you can assume that if there's no PCI there's no SATA.
Basically, if you need to ask what sort of disk controller is present, then you don't need to ask what sort of disk controller is present yet, and you've overlooked a fundamental piece of the OS (hardware auto-detection).
Cheers,
Brendan
The "features" section of the Bochs user manual says exactly what Bochs supports.nicola wrote:is the hard disk type emulated by Bochs ATA (IDE) or SATA?
or they are just the same in the sense of accessing it from assembly?
and is it possible to access SATA using AHCI in Bochs?
However, you wouldn't need to know unless you're ready to start writing a driver for the disk controller; and if you're ready to start writing a driver for the disk controller then you must've already done code to scan PCI buses and detect which PCI devices are present, which means your own software can tell you what sort of PCI device the disk controller is.
Note: If a computer (including Bochs if configured without the i440FX PCI chipset) doesn't support PCI at all, then you'd have to probe for old ISA devices during your "hardware auto-detection" phase. PCI was introduced a long time before SATA existed, so all SATA controllers use some sort of PCI bus, and you can assume that if there's no PCI there's no SATA.
Basically, if you need to ask what sort of disk controller is present, then you don't need to ask what sort of disk controller is present yet, and you've overlooked a fundamental piece of the OS (hardware auto-detection).
SATA controllers can have 2 different modes - "legacy mode" where they emulate PATA, and "AHCI" where they don't emulate PATA. If the SATA controller doesn't support legacy mode then you have to support AHCI, and if the SATA controller does support "legacy mode" then it'd be better to switch it to "AHCI".nicola wrote:or they are just the same in the sense of accessing it from assembly?
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.