Unmask second disk controller's IRQ
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
parent
8e0fbfe263
commit
b60ec92388
@ -106,10 +106,7 @@ impl ATABus {
|
||||
fn discover_atapi_drive() -> Option<Self> {
|
||||
let mut primary_bus = ATABus::new(ATA_BUS_PRIMARY);
|
||||
|
||||
unsafe {
|
||||
primary_bus.dcr.write(ATA_SRST);
|
||||
primary_bus.dcr.write(0);
|
||||
}
|
||||
primary_bus.software_reset();
|
||||
|
||||
primary_bus.select_drive(ATA_DRIVE_MASTER);
|
||||
if primary_bus.is_atapi() {
|
||||
@ -123,10 +120,7 @@ impl ATABus {
|
||||
|
||||
let mut secondary_bus = ATABus::new(ATA_BUS_SECONDARY);
|
||||
|
||||
unsafe {
|
||||
secondary_bus.dcr.write(ATA_SRST);
|
||||
primary_bus.dcr.write(0);
|
||||
}
|
||||
secondary_bus.software_reset();
|
||||
|
||||
secondary_bus.select_drive(ATA_DRIVE_MASTER);
|
||||
if secondary_bus.is_atapi() {
|
||||
@ -140,6 +134,13 @@ impl ATABus {
|
||||
None
|
||||
}
|
||||
|
||||
fn software_reset(&mut self) {
|
||||
unsafe {
|
||||
self.dcr.write(ATA_SRST);
|
||||
self.dcr.write(0);
|
||||
}
|
||||
}
|
||||
|
||||
fn new(port: u16) -> Self {
|
||||
ATABus {
|
||||
base_port: port,
|
||||
|
@ -35,5 +35,8 @@ pub static PICS: spin::Mutex<ChainedPics> =
|
||||
|
||||
pub fn init_pic() {
|
||||
println!("Initializing PIC");
|
||||
unsafe { PICS.lock().initialize() };
|
||||
unsafe {
|
||||
PICS.lock().initialize();
|
||||
PICS.lock().write_masks(0b10111000, 0b00001110);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user