Compare commits
No commits in common. "f64f654610f79e49620710cbce80d43d4e583ea7" and "758629df0acd67d397f468cbe9d36264f944bc19" have entirely different histories.
f64f654610
...
758629df0a
27
Cargo.lock
generated
27
Cargo.lock
generated
|
@ -390,24 +390,37 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "hbbytecode"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#0e9f4402cb686da817ef876abd764676e262759a"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#8e62bd747b88a1db1d07ffa355690fac48977bb2"
|
||||
|
||||
[[package]]
|
||||
name = "hbbytecode"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/ableos/holey-bytes.git#0d118c17b2d0e770161be834c5452753eb9c34dd"
|
||||
|
||||
[[package]]
|
||||
name = "hblang"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#0e9f4402cb686da817ef876abd764676e262759a"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#8e62bd747b88a1db1d07ffa355690fac48977bb2"
|
||||
dependencies = [
|
||||
"hbbytecode",
|
||||
"hbvm",
|
||||
"hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
|
||||
"hbvm 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
|
||||
"regalloc2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hbvm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#0e9f4402cb686da817ef876abd764676e262759a"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#8e62bd747b88a1db1d07ffa355690fac48977bb2"
|
||||
dependencies = [
|
||||
"hbbytecode",
|
||||
"hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hbvm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/ableos/holey-bytes.git#0d118c17b2d0e770161be834c5452753eb9c34dd"
|
||||
dependencies = [
|
||||
"hbbytecode 0.1.0 (git+https://git.ablecorp.us/ableos/holey-bytes.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -586,7 +599,7 @@ dependencies = [
|
|||
"derive_more",
|
||||
"embedded-graphics",
|
||||
"hashbrown",
|
||||
"hbvm",
|
||||
"hbvm 0.1.0 (git+https://git.ablecorp.us/ableos/holey-bytes.git)",
|
||||
"limine",
|
||||
"log",
|
||||
"sbi",
|
||||
|
|
|
@ -6,7 +6,7 @@ version = "0.2.0"
|
|||
|
||||
[dependencies]
|
||||
embedded-graphics = "0.8"
|
||||
hbvm.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git"
|
||||
hbvm.git = "https://git.ablecorp.us/ableos/holey-bytes.git"
|
||||
log = "0.4"
|
||||
spin = "0.9"
|
||||
slab = { version = "0.4", default-features = false }
|
||||
|
|
|
@ -106,13 +106,13 @@ pub fn handler(vm: &mut Vm) {
|
|||
2 => x86_in::<u32>(addr) as u64,
|
||||
_ => panic!("Trying to read size other than: 8, 16, 32 from port."),
|
||||
};
|
||||
// info!("Read the value {} from address {}", value, addr);
|
||||
info!("Read the value {} from address {}", value, addr);
|
||||
vm.registers[1] = hbvm::value::Value(value);
|
||||
},
|
||||
1 => unsafe {
|
||||
let size = msg_vec[1];
|
||||
let addr = u16::from_le_bytes(msg_vec[2..4].try_into().unwrap());
|
||||
// info!("Setting address {}", addr);
|
||||
info!("Setting address {}", addr);
|
||||
|
||||
match size {
|
||||
0 => x86_out(addr, msg_vec[4]),
|
||||
|
@ -212,7 +212,7 @@ pub fn handler(vm: &mut Vm) {
|
|||
x86_64::instructions::port::Port::new(address).write(value);
|
||||
}
|
||||
let x = hbvm::value::Value(unsafe { x86_in(r2 as u16) } as u64);
|
||||
// info!("Read {:?} from Port {:?}", x, r2);
|
||||
info!("Read {:?} from Port {:?}", x, r2);
|
||||
vm.registers[3] = x
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,17 +89,19 @@ GetBARAddr := fn(addr: PCIAddress, index: int): u32 {
|
|||
}
|
||||
|
||||
setup_device := fn(svga_dev: ^SVGADevice): void {
|
||||
// TODO: Fix this
|
||||
// TODO: Fix this
|
||||
// refer to https://git.ablecorp.us/able/vmware-svga/src/commit/eea7ddcd0d34702f8f0a33c1933718706c6318c5/lib/refdriver/svga.c#L55
|
||||
|
||||
svga_dev.pciAddr = PCIAddress.(0, 3, 0)
|
||||
pci_dev := pci.check_device(0, 3)
|
||||
|
||||
if pci_dev.device_id.vendor != PCI_VENDOR_ID_VMWARE {
|
||||
svga_dev.pciAddr = PCIAddress.(0, 3, 0)
|
||||
/*
|
||||
pci_id := get_ids(svga_dev.pciAddr.bus, svga_dev.pciAddr.device, svga_dev.pciAddr.function)
|
||||
|
||||
if pci_id.vendor != PCI_VENDOR_ID_VMWARE | pci_id.device != PCI_DEVICE_ID_VMWARE_SVGA2 {
|
||||
log.error("SVGA device not found\0")
|
||||
return
|
||||
}
|
||||
//| pci_dev.device_id.device != PCI_DEVICE_ID_VMWARE_SVGA2 {
|
||||
*/
|
||||
|
||||
svga_dev.ioBase = config_read32(svga_dev.pciAddr.bus, svga_dev.pciAddr.device, svga_dev.pciAddr.function, 0x10) & 0xFFFFFFF0
|
||||
write_reg(svga_dev, reg.SVGA_REG_ENABLE, reg.SVGA_REG_ENABLE_ENABLE)
|
||||
|
|
|
@ -20,14 +20,14 @@ resolution = "1024x768x24"
|
|||
# [boot.limine.ableos.modules.tests]
|
||||
# path = "boot:///tests.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.serial_driver]
|
||||
# [boot.limine.ableos.modules.0serial_driver]
|
||||
# path = "boot:///serial_driver.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.diskio_driver]
|
||||
# path = "boot:///diskio_driver.hbf"
|
||||
|
||||
[boot.limine.ableos.modules.render_example]
|
||||
path = "boot:///render_example.hbf"
|
||||
# [boot.limine.ableos.modules.render_example]
|
||||
# path = "boot:///render_example.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.serial_driver_test]
|
||||
# path = "boot:///serial_driver_test.hbf"
|
||||
|
@ -41,11 +41,11 @@ path = "boot:///render_example.hbf"
|
|||
# [boot.limine.ableos.modules.dt_buffer_test]
|
||||
# path = "boot:///dt_buffer_test.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.svga_driver]
|
||||
# path = "boot:///svga_driver.hbf"
|
||||
[boot.limine.ableos.modules.svga_driver]
|
||||
path = "boot:///svga_driver.hbf"
|
||||
|
||||
[boot.limine.ableos.modules.ps2_driver]
|
||||
path = "boot:///ps2_driver.hbf"
|
||||
# [boot.limine.ableos.modules.ps2_driver]
|
||||
# path = "boot:///ps2_driver.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.filesystem_fat32]
|
||||
# path = "boot:///filesystem_fat32.hbf"
|
||||
|
|
Loading…
Reference in a new issue