* ref: restructure the trace related arch-dependent stuff to make it
less redundant
* ref: rename the boot_end/boot_start section markers so it will not
conflict with out in name (in particular the boot_end() function)
* ref: remove the reference to port-io thing from ahci driver base
* ref: only compile the pmio vairant of uart when the correspond,
arch-related feature is turned on.
* ref: temporary disable the vga module, as it is incompleted and buggy
* fix: add back a missing #include to asm/cpu.h
#include <lunaix/hart_state.h>
#include <lunaix/hart_state.h>
+static inline bool
+arch_valid_fp(ptr_t ptr) {
+ extern int __bsskstack_end[];
+ extern int __bsskstack_start[];
+ return ((ptr_t)__bsskstack_start <= ptr && ptr <= (ptr_t)__bsskstack_end);
+}
+
void
trace_print_transistion_short(struct hart_state* hstate);
void
trace_print_transistion_short(struct hart_state* hstate);
#include <hal/ahci/scsi.h>
#include <hal/pci.h>
#include <hal/ahci/scsi.h>
#include <hal/pci.h>
-#include <asm/x86_pmio.h>
-
#include <klibc/string.h>
#include <lunaix/block.h>
#include <asm-generic/isrm.h>
#include <klibc/string.h>
#include <lunaix/block.h>
#include <asm-generic/isrm.h>
}
// 如果port未响应,则继续执行重置
port_reg[HBA_RPxSCTL] = (port_reg[HBA_RPxSCTL] & ~0xf) | 1;
}
// 如果port未响应,则继续执行重置
port_reg[HBA_RPxSCTL] = (port_reg[HBA_RPxSCTL] & ~0xf) | 1;
- port_delay(100000); // 等待至少一毫秒,差不多就行了
port_reg[HBA_RPxSCTL] &= ~0xf;
}
port_reg[HBA_RPxSCTL] &= ~0xf;
}
sources([
"16x50_base.c",
sources([
"16x50_base.c",
"16x50_mmio.c",
])
if config("xt_16x50"):
"16x50_mmio.c",
])
if config("xt_16x50"):
+ sources([
+ "16x50_pmio.c",
+ "16x50_isa.c"
+ ])
- sources("16x50_pci.c")
\ No newline at end of file
+ sources([
+ "16x50_pmio.c",
+ "16x50_pci.c"
+ ])
\ No newline at end of file
type(bool)
is_x86 = v(arch) in ["i386", "x86_64"]
type(bool)
is_x86 = v(arch) in ["i386", "x86_64"]
+ if not is_x86:
+ set_value(False)
+ else:
+ default(is_x86)
struct {
struct hart_state state;
struct exec_param eret;
struct {
struct hart_state state;
struct exec_param eret;
#define reclaimable_start __section_mark(bssreclaim, start)
#define reclaimable_end __section_mark(bssreclaim, end)
#define reclaimable_start __section_mark(bssreclaim, start)
#define reclaimable_end __section_mark(bssreclaim, end)
-#define boot_start __section_mark(kboot, start)
-#define boot_end __section_mark(kboot, end)
+#define bootsec_start __section_mark(kboot, start)
+#define bootsec_end __section_mark(kboot, end)
#define kernel_start __section_mark(kexec, start)
#define kernel_load_end __section_mark(kexec, end)
#define kernel_start __section_mark(kexec, start)
#define kernel_load_end __section_mark(kexec, end)
-#define SYSCALL_ESTATUS(errno) -((errno) != 0)
+#include <lunaix/compiler.h>
-#define asmlinkage __attribute__((regparm(0)))
+#define SYSCALL_ESTATUS(errno) -((errno) != 0)
#define __PARAM_MAP1(t1, p1) t1 p1
#define __PARAM_MAP2(t1, p1, ...) t1 p1, __PARAM_MAP1(__VA_ARGS__)
#define __PARAM_MAP1(t1, p1) t1 p1
#define __PARAM_MAP2(t1, p1, ...) t1 p1, __PARAM_MAP1(__VA_ARGS__)
#include <asm/abi.h>
#include <asm/mm_defs.h>
#include <asm/abi.h>
#include <asm/mm_defs.h>
#include <klibc/string.h>
#include <klibc/string.h>
#include <lunaix/trace.h>
#include <lunaix/failsafe.h>
#include <lunaix/trace.h>
#include <lunaix/failsafe.h>
LOG_MODULE("spike")
void noret
LOG_MODULE("spike")
void noret