Skip to content
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3acc83e
Foundational stuff
DixelU Dec 29, 2025
e95b34c
rust+asm only
DixelU Dec 29, 2025
64d0508
And test stuff - am not sure these changes are really needed aside sp…
DixelU Dec 29, 2025
2a5edcf
...
DixelU Jan 11, 2026
f51b4da
...
DixelU Jan 11, 2026
54eaa7f
Update cpu.rs
DixelU Jan 11, 2026
347be5a
RSVD Faults
DixelU Jan 11, 2026
c1b70e4
Update instructions_0f.rs
DixelU Jan 11, 2026
793ce63
clear tlb only upon efer change
DixelU Jan 11, 2026
32bf805
add efer reset
DixelU Jan 11, 2026
c459d9b
Merge branch 'master' into nx-support-v2
DixelU Mar 19, 2026
5826d86
Build fix with updated dev container + possible PAE misuse
DixelU May 17, 2026
cc21f68
Funny mistake
DixelU May 17, 2026
52693a3
Merge branch 'master' into nx-support-v2
DixelU May 17, 2026
6c7866a
Revery nasm run
DixelU May 17, 2026
2e56c4d
READ_LOG_EXT for windows 8.1 boot up
DixelU May 17, 2026
ce9f183
Fixes for linux with PAE support enabled?
DixelU Jun 3, 2026
fe55a80
Minor style issues
DixelU Jun 3, 2026
c21844d
Fix unintnended changes (squash)
DixelU Jun 8, 2026
9e5be1c
Merge remote-tracking branch 'upstream/master' into nx-support-v2
DixelU Sep 4, 2026
6ecba73
Seems fine now;
DixelU Sep 15, 2026
a199564
Merge branch 'master' into nx-support-v2
DixelU Sep 15, 2026
d019f7e
Merge branch 'nx-support-v2' of https://github.com/DixelU/v86 into nx…
DixelU Sep 16, 2026
13d2544
restore skip parameters, reset nasmtest cache upon source change
DixelU Sep 16, 2026
992b84c
Several fixes, including:
DixelU Sep 24, 2026
1607852
rustfmt rerun
DixelU Sep 30, 2026
2f6a9ac
The NX branch adds TLB_NO_EXEC (bit 6, 0x40)
DixelU Sep 30, 2026
c1c9fe3
Merge pull request #2 from DixelU/nx-support-post-review-changes
DixelU Sep 30, 2026
ff57958
Merge branch 'master' into nx-support-v2
DixelU Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
id: cache-nasmtests
with:
path: tests/nasm/build/
key: ${{ runner.os }}-nasmtests
key: ${{ runner.os }}-nasmtests-${{ hashFiles('gen/x86_table.js', 'tests/nasm/*.js', 'tests/nasm/*.asm', 'tests/nasm/*.inc', 'tests/nasm/gdb-extract-def') }}

- name: Run nasmtests
run: MAX_PARALLEL_TESTS=1 make nasmtests
Expand Down
4 changes: 4 additions & 0 deletions src/cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export function CPU(bus, wm, stop_idling)
this.dreg = view(Int32Array, memory, 684, 8);

this.reg_pdpte = view(Int32Array, memory, 968, 8);
this.efer = view(Uint32Array, memory, 1280, 2);

this.svga_dirty_bitmap_min_offset = view(Uint32Array, memory, 716, 1);
this.svga_dirty_bitmap_max_offset = view(Uint32Array, memory, 720, 1);
Expand Down Expand Up @@ -570,6 +571,7 @@ CPU.prototype.get_state = function()
state[89] = this.devices.vmware;
state[90] = this.devices.parallel0;
state[91] = this.devices.parallel1;
state[92] = this.efer;

return state;
};
Expand Down Expand Up @@ -687,6 +689,8 @@ CPU.prototype.set_state = function(state)
this.sreg.set(state[40]);
this.dreg.set(state[41]);
state[42] && this.reg_pdpte.set(state[42]);
this.efer.fill(0);
state[92] && this.efer.set(state[92]);

this.set_tsc(state[43][0], state[43][1]);

Expand Down
16 changes: 16 additions & 0 deletions src/ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const ATA_CMD_WRITE_MULTIPLE = 0x39; // see [ATA8-ACS] 7.64
const ATA_CMD_WRITE_MULTIPLE_EXT = 0xC5; // see [ATA8-ACS] 7.65
const ATA_CMD_WRITE_SECTORS = 0x30; // see [ATA8-ACS] 7.67
const ATA_CMD_WRITE_SECTORS_EXT = 0x34; // see [ATA8-ACS] 7.68
const ATA_CMD_READ_LOG_EXT = 0x2F; // see [ACS-3] 7.42
const ATA_CMD_10h = 0x10; // command obsolete/unknown, see [ATA-6] Table E.2
const ATA_CMD_F0h = 0xF0; // vendor-specific

Expand Down Expand Up @@ -166,6 +167,7 @@ const ATA_CMD_NAME =
[ATA_CMD_WRITE_MULTIPLE_EXT]: "WRITE MULTIPLE EXT",
[ATA_CMD_WRITE_SECTORS]: "WRITE SECTORS",
[ATA_CMD_WRITE_SECTORS_EXT]: "WRITE SECTORS EXT",
[ATA_CMD_READ_LOG_EXT]: "READ LOG EXT",
[ATA_CMD_10h]: "<UNKNOWN 10h>",
[ATA_CMD_F0h]: "<VENDOR-SPECIFIC F0h>",
};
Expand Down Expand Up @@ -1327,6 +1329,20 @@ IDEInterface.prototype.ata_command = function(cmd)
this.push_irq();
break;

case ATA_CMD_READ_LOG_EXT:
{
// Return zeroed log page(s); sector_count_reg pages of 512 bytes each.
// Zero content means empty log (no errors, no self-test entries).
const page_count = this.sector_count_reg & 0xFF || 0x100;
const byte_count = page_count * 512;
this.data_allocate(byte_count);
this.data_end = this.data_length;
this.sector_count_reg -= page_count; // mirror what ata_advance does for disk reads
this.status_reg = ATA_SR_DRDY|ATA_SR_DSC|ATA_SR_DRQ;
this.push_irq();
break;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you send this as a separate PR?

case ATA_CMD_READ_DMA:
case ATA_CMD_READ_DMA_EXT:
do_dbg_log = false;
Expand Down
Loading