mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-18 22:44:41 +08:00
i386: Port to RTEMS
- Update imported files to compile rtems-libbsd for i386 based BSPs - Mostly commenting out parts which create compile or link errors in RTEMS, but aren't needed
This commit is contained in:

committed by
Sebastian Huber

parent
dc86c55f51
commit
a69293ca57
@@ -69,7 +69,9 @@ static const char rcsid[] =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__amd64__) || defined(__i386__)
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
|
#ifndef __rtems__
|
||||||
#include <machine/pc/bios.h>
|
#include <machine/pc/bios.h>
|
||||||
|
#endif /* __rtems__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -832,6 +834,7 @@ S_efi_map(size_t l2, void *p)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__amd64__) || defined(__i386__)
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
|
#ifndef __rtems__
|
||||||
static int
|
static int
|
||||||
S_bios_smap_xattr(size_t l2, void *p)
|
S_bios_smap_xattr(size_t l2, void *p)
|
||||||
{
|
{
|
||||||
@@ -850,6 +853,7 @@ S_bios_smap_xattr(size_t l2, void *p)
|
|||||||
(uintmax_t)smap->length);
|
(uintmax_t)smap->length);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1061,7 +1065,11 @@ show_var(int *oid, int nlen)
|
|||||||
#endif
|
#endif
|
||||||
#if defined(__amd64__) || defined(__i386__)
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
else if (strcmp(fmt, "S,bios_smap_xattr") == 0)
|
else if (strcmp(fmt, "S,bios_smap_xattr") == 0)
|
||||||
|
#ifndef __rtems__
|
||||||
func = S_bios_smap_xattr;
|
func = S_bios_smap_xattr;
|
||||||
|
#else /* __rtems__ */
|
||||||
|
func = NULL;
|
||||||
|
#endif /* __rtems__ */
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
func = NULL;
|
func = NULL;
|
||||||
|
@@ -1593,6 +1593,7 @@ pcib_attach_common(device_t dev)
|
|||||||
sc->flags |= PCIB_SUBTRACTIVE;
|
sc->flags |= PCIB_SUBTRACTIVE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS))
|
#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS))
|
||||||
/* Compaq R3000 BIOS sets wrong subordinate bus number. */
|
/* Compaq R3000 BIOS sets wrong subordinate bus number. */
|
||||||
case 0x00dd10de:
|
case 0x00dd10de:
|
||||||
@@ -1620,6 +1621,7 @@ pcib_attach_common(device_t dev)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* __rtems__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pci_msi_device_blacklisted(dev))
|
if (pci_msi_device_blacklisted(dev))
|
||||||
|
@@ -233,11 +233,13 @@ fls(int mask)
|
|||||||
|
|
||||||
#define HAVE_INLINE_FLSL
|
#define HAVE_INLINE_FLSL
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
static __inline __pure2 int
|
static __inline __pure2 int
|
||||||
flsl(long mask)
|
flsl(long mask)
|
||||||
{
|
{
|
||||||
return (fls((int)mask));
|
return (fls((int)mask));
|
||||||
}
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
|
@@ -744,7 +744,9 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct grouptask *gtask,
|
|||||||
__func__, gtask->gt_name, error);
|
__func__, gtask->gt_name, error);
|
||||||
} else
|
} else
|
||||||
#else /* __rtems__ */
|
#else /* __rtems__ */
|
||||||
|
#ifndef __i386__
|
||||||
BSD_ASSERT(irq == -1);
|
BSD_ASSERT(irq == -1);
|
||||||
|
#endif /* __i386__ */
|
||||||
#endif /* __rtems__ */
|
#endif /* __rtems__ */
|
||||||
mtx_unlock(&qgroup->tqg_lock);
|
mtx_unlock(&qgroup->tqg_lock);
|
||||||
}
|
}
|
||||||
@@ -776,7 +778,9 @@ taskqgroup_attach_deferred(struct taskqgroup *qgroup, struct grouptask *gtask)
|
|||||||
|
|
||||||
}
|
}
|
||||||
#else /* __rtems__ */
|
#else /* __rtems__ */
|
||||||
|
#ifndef __i386__
|
||||||
BSD_ASSERT(gtask->gt_irq == -1);
|
BSD_ASSERT(gtask->gt_irq == -1);
|
||||||
|
#endif /* __i386__ */
|
||||||
#endif /* __rtems__ */
|
#endif /* __rtems__ */
|
||||||
qgroup->tqg_queue[qid].tgc_cnt++;
|
qgroup->tqg_queue[qid].tgc_cnt++;
|
||||||
LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list);
|
LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list);
|
||||||
|
2
rtemsbsd/i386/include/machine/clock.h
Normal file
2
rtemsbsd/i386/include/machine/clock.h
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
extern int tsc_is_invariant;
|
||||||
|
extern uint64_t tsc_freq;
|
0
rtemsbsd/include/rtems/bsd/local/opt_acpi.h
Normal file
0
rtemsbsd/include/rtems/bsd/local/opt_acpi.h
Normal file
Reference in New Issue
Block a user