Skip to content

Commit

Permalink
Updated kernel test to reflect new name
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo720 committed Sep 28, 2023
1 parent edffc7f commit 44ee7cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions test/kernel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* lib86cpu cxbxrkrnl app test generator (https://github.com/ergo720/cxbxrkrnl)
* lib86cpu nboxkrnl app test generator (https://github.com/ergo720/nboxkrnl)
* Demonstrates running a kernel inside lib86cpu
*
* ergo720 Copyright (c) 2022
Expand Down Expand Up @@ -147,7 +147,7 @@ host_write_handler(addr_t addr, const uint32_t value, void* opaque)
{
case DBG_STR:
// NOTE: get_host_ptr will only work if the string is allocated with a contiguous allocation in physical memory, to avoid
// issues with allocations spanning pages; cxbxrkrnl should guarantee this
// issues with allocations spanning pages; nboxkrnl should guarantee this
std::printf("Received a new debug string from kernel:\n%s", get_host_ptr(static_cast<cpu_t *>(opaque), static_cast<addr_t>(value)));
break;

Expand All @@ -161,7 +161,7 @@ host_write_handler(addr_t addr, const uint32_t value, void* opaque)
}

bool
gen_cxbxrkrnl_test(const std::string &executable)
gen_nboxkrnl_test(const std::string &executable)
{
size_t ramsize = 64 * 1024 * 1024;

Expand Down Expand Up @@ -215,7 +215,7 @@ gen_cxbxrkrnl_test(const std::string &executable)
}

// Init lib86cpu
if (!LC86_SUCCESS(cpu_new(ramsize, cpu, nullptr, "cxbxrkrnl"))) {
if (!LC86_SUCCESS(cpu_new(ramsize, cpu, nullptr, "nboxkrnl"))) {
std::printf("Failed to create cpu!\n");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion test/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ main(int argc, char **argv)
break;

case 3:
if (gen_cxbxrkrnl_test(executable) == false) {
if (gen_nboxkrnl_test(executable) == false) {
if (cpu) {
cpu_free(cpu);
}
Expand Down
2 changes: 1 addition & 1 deletion test/run.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ inline cpu_t *cpu = nullptr;
bool gen_test386asm_test(const std::string &executable);
bool gen_hook_test();
bool gen_dbg_test();
bool gen_cxbxrkrnl_test(const std::string &executable);
bool gen_nboxkrnl_test(const std::string &executable);
void gen_test80186_test(const std::string &path, int syntax, int use_dbg);

0 comments on commit 44ee7cd

Please sign in to comment.